2 * Copyright (c) 2010 Broadcom Corporation
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
11 * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
13 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
14 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
20 #include <linux/pci_regs.h>
22 /* PCI configuration address space size */
25 /* Everything below is BRCM HND proprietary */
27 /* Brcm PCI configuration registers */
28 #define PCI_BAR0_WIN 0x80 /* backplane address space accessed by BAR0 */
29 #define PCI_SPROM_CONTROL 0x88 /* sprom property control */
30 #define PCI_INT_MASK 0x94 /* mask of PCI and other cores interrupts */
31 #define PCI_SBIM_SHIFT 8 /* backplane core interrupt mask bits offset */
32 #define PCI_BAR0_WIN2 0xac /* backplane address space accessed by second 4KB of BAR0 */
33 #define PCI_GPIO_IN 0xb0 /* pci config space gpio input (>=rev3) */
34 #define PCI_GPIO_OUT 0xb4 /* pci config space gpio output (>=rev3) */
35 #define PCI_GPIO_OUTEN 0xb8 /* pci config space gpio output enable (>=rev3) */
37 #define PCI_BAR0_SPROM_OFFSET (4 * 1024) /* bar0 + 4K accesses external sprom */
38 #define PCI_BAR0_PCIREGS_OFFSET (6 * 1024) /* bar0 + 6K accesses pci core registers */
39 #define PCI_BAR0_PCISBR_OFFSET (4 * 1024) /* pci core SB registers are at the end of the
40 * 8KB window, so their address is the "regular"
43 #define PCI_BAR0_WINSZ (16 * 1024) /* bar0 window size Match with corerev 13 */
44 /* On pci corerev >= 13 and all pcie, the bar0 is now 16KB and it maps: */
45 #define PCI_16KB0_PCIREGS_OFFSET (8 * 1024) /* bar0 + 8K accesses pci/pcie core registers */
46 #define PCI_16KB0_CCREGS_OFFSET (12 * 1024) /* bar0 + 12K accesses chipc core registers */
48 #define PCI_SBIM_STATUS_SERR 0x4 /* backplane SBErr interrupt status */
50 #endif /* _h_pcicfg_ */