aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bcma/driver_pci_host.c
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2012-06-29 19:44:38 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-07-09 16:36:03 -0400
commit4b4f5be2e49a604de11dee0ee9b3f151de061724 (patch)
tree147dda1b47876ba586049dbea6f5e8eaae5dd069 /drivers/bcma/driver_pci_host.c
parent00eeedcf084a21bf436ff3147f11f0923c811155 (diff)
bcma: add constants for chip ids
The chip IDs are used all over bcma and no constants where defined. This patch adds the constants and makes bcma use them. Acked-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/bcma/driver_pci_host.c')
-rw-r--r--drivers/bcma/driver_pci_host.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/bcma/driver_pci_host.c b/drivers/bcma/driver_pci_host.c
index b9a86edfec39..d6e8a37e3e5f 100644
--- a/drivers/bcma/driver_pci_host.c
+++ b/drivers/bcma/driver_pci_host.c
@@ -215,7 +215,8 @@ static int bcma_extpci_write_config(struct bcma_drv_pci *pc, unsigned int dev,
215 } else { 215 } else {
216 writel(val, mmio); 216 writel(val, mmio);
217 217
218 if (chipid == 0x4716 || chipid == 0x4748) 218 if (chipid == BCMA_CHIP_ID_BCM4716 ||
219 chipid == BCMA_CHIP_ID_BCM4748)
219 readl(mmio); 220 readl(mmio);
220 } 221 }
221 222
@@ -434,13 +435,14 @@ void __devinit bcma_core_pci_hostmode_init(struct bcma_drv_pci *pc)
434 * as mips can't generate 64-bit address on the 435 * as mips can't generate 64-bit address on the
435 * backplane. 436 * backplane.
436 */ 437 */
437 if (bus->chipinfo.id == 0x4716 || bus->chipinfo.id == 0x4748) { 438 if (bus->chipinfo.id == BCMA_CHIP_ID_BCM4716 ||
439 bus->chipinfo.id == BCMA_CHIP_ID_BCM4748) {
438 pc_host->mem_resource.start = BCMA_SOC_PCI_MEM; 440 pc_host->mem_resource.start = BCMA_SOC_PCI_MEM;
439 pc_host->mem_resource.end = BCMA_SOC_PCI_MEM + 441 pc_host->mem_resource.end = BCMA_SOC_PCI_MEM +
440 BCMA_SOC_PCI_MEM_SZ - 1; 442 BCMA_SOC_PCI_MEM_SZ - 1;
441 pcicore_write32(pc, BCMA_CORE_PCI_SBTOPCI0, 443 pcicore_write32(pc, BCMA_CORE_PCI_SBTOPCI0,
442 BCMA_CORE_PCI_SBTOPCI_MEM | BCMA_SOC_PCI_MEM); 444 BCMA_CORE_PCI_SBTOPCI_MEM | BCMA_SOC_PCI_MEM);
443 } else if (bus->chipinfo.id == 0x5300) { 445 } else if (bus->chipinfo.id == BCMA_CHIP_ID_BCM4706) {
444 tmp = BCMA_CORE_PCI_SBTOPCI_MEM; 446 tmp = BCMA_CORE_PCI_SBTOPCI_MEM;
445 tmp |= BCMA_CORE_PCI_SBTOPCI_PREF; 447 tmp |= BCMA_CORE_PCI_SBTOPCI_PREF;
446 tmp |= BCMA_CORE_PCI_SBTOPCI_BURST; 448 tmp |= BCMA_CORE_PCI_SBTOPCI_BURST;