diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2012-04-28 20:18:51 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-05-16 12:45:22 -0400 |
commit | ec00f3732129e57206e9ef9883d681ad6584f5dd (patch) | |
tree | 10428396e10003891439eba40634c4f9cb304ea7 /include/linux/bcma | |
parent | 29f6b3d823885093890b1604d8450e7b57a31281 (diff) |
bcma: add bcma_core_pci_fixcfg()
This code is based on code from pcicore_fixcfg() in brcmsmac. This
patch is part of the move of pci specific code from brcmsmac to bcma.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include/linux/bcma')
-rw-r--r-- | include/linux/bcma/bcma_driver_pci.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/bcma/bcma_driver_pci.h b/include/linux/bcma/bcma_driver_pci.h index 20c9f96d4070..5b0542c336ed 100644 --- a/include/linux/bcma/bcma_driver_pci.h +++ b/include/linux/bcma/bcma_driver_pci.h | |||
@@ -87,6 +87,9 @@ struct pci_dev; | |||
87 | #define BCMA_CORE_PCI_PCICFG2 0x0600 /* PCI config space 2 (rev >= 8) */ | 87 | #define BCMA_CORE_PCI_PCICFG2 0x0600 /* PCI config space 2 (rev >= 8) */ |
88 | #define BCMA_CORE_PCI_PCICFG3 0x0700 /* PCI config space 3 (rev >= 8) */ | 88 | #define BCMA_CORE_PCI_PCICFG3 0x0700 /* PCI config space 3 (rev >= 8) */ |
89 | #define BCMA_CORE_PCI_SPROM(wordoffset) (0x0800 + ((wordoffset) * 2)) /* SPROM shadow area (72 bytes) */ | 89 | #define BCMA_CORE_PCI_SPROM(wordoffset) (0x0800 + ((wordoffset) * 2)) /* SPROM shadow area (72 bytes) */ |
90 | #define BCMA_CORE_PCI_SPROM_PI_OFFSET 0 /* first word */ | ||
91 | #define BCMA_CORE_PCI_SPROM_PI_MASK 0xf000 /* bit 15:12 */ | ||
92 | #define BCMA_CORE_PCI_SPROM_PI_SHIFT 12 /* bit 15:12 */ | ||
90 | 93 | ||
91 | /* SBtoPCIx */ | 94 | /* SBtoPCIx */ |
92 | #define BCMA_CORE_PCI_SBTOPCI_MEM 0x00000000 | 95 | #define BCMA_CORE_PCI_SBTOPCI_MEM 0x00000000 |
@@ -202,7 +205,9 @@ struct bcma_drv_pci { | |||
202 | }; | 205 | }; |
203 | 206 | ||
204 | /* Register access */ | 207 | /* Register access */ |
208 | #define pcicore_read16(pc, offset) bcma_read16((pc)->core, offset) | ||
205 | #define pcicore_read32(pc, offset) bcma_read32((pc)->core, offset) | 209 | #define pcicore_read32(pc, offset) bcma_read32((pc)->core, offset) |
210 | #define pcicore_write16(pc, offset, val) bcma_write16((pc)->core, offset, val) | ||
206 | #define pcicore_write32(pc, offset, val) bcma_write32((pc)->core, offset, val) | 211 | #define pcicore_write32(pc, offset, val) bcma_write32((pc)->core, offset, val) |
207 | 212 | ||
208 | extern void __devinit bcma_core_pci_init(struct bcma_drv_pci *pc); | 213 | extern void __devinit bcma_core_pci_init(struct bcma_drv_pci *pc); |