Commit 1159024d4c0aafecaa0c6635c55153b4b39cc1c8
1 parent
6b86bd62a5
Exists in
master
and in
39 other branches
ssb: fix pcicore build breakage
drivers/ssb/main.c:1336: error: 'SSB_PCICORE_BCAST_ADDR' undeclared (first use in this function) drivers/ssb/main.c:1337: error: 'SSB_PCICORE_BCAST_DATA' undeclared (first use in this function) drivers/ssb/main.c:1349: error: 'struct ssb_pcicore' has no member named 'dev' Reported-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Showing 1 changed file with 10 additions and 4 deletions Side-by-side Diff
drivers/ssb/main.c
... | ... | @@ -1332,21 +1332,27 @@ |
1332 | 1332 | static void ssb_broadcast_value(struct ssb_device *dev, |
1333 | 1333 | u32 address, u32 data) |
1334 | 1334 | { |
1335 | +#ifdef CONFIG_SSB_DRIVER_PCICORE | |
1335 | 1336 | /* This is used for both, PCI and ChipCommon core, so be careful. */ |
1336 | 1337 | BUILD_BUG_ON(SSB_PCICORE_BCAST_ADDR != SSB_CHIPCO_BCAST_ADDR); |
1337 | 1338 | BUILD_BUG_ON(SSB_PCICORE_BCAST_DATA != SSB_CHIPCO_BCAST_DATA); |
1339 | +#endif | |
1338 | 1340 | |
1339 | - ssb_write32(dev, SSB_PCICORE_BCAST_ADDR, address); | |
1340 | - ssb_read32(dev, SSB_PCICORE_BCAST_ADDR); /* flush */ | |
1341 | - ssb_write32(dev, SSB_PCICORE_BCAST_DATA, data); | |
1342 | - ssb_read32(dev, SSB_PCICORE_BCAST_DATA); /* flush */ | |
1341 | + ssb_write32(dev, SSB_CHIPCO_BCAST_ADDR, address); | |
1342 | + ssb_read32(dev, SSB_CHIPCO_BCAST_ADDR); /* flush */ | |
1343 | + ssb_write32(dev, SSB_CHIPCO_BCAST_DATA, data); | |
1344 | + ssb_read32(dev, SSB_CHIPCO_BCAST_DATA); /* flush */ | |
1343 | 1345 | } |
1344 | 1346 | |
1345 | 1347 | void ssb_commit_settings(struct ssb_bus *bus) |
1346 | 1348 | { |
1347 | 1349 | struct ssb_device *dev; |
1348 | 1350 | |
1351 | +#ifdef CONFIG_SSB_DRIVER_PCICORE | |
1349 | 1352 | dev = bus->chipco.dev ? bus->chipco.dev : bus->pcicore.dev; |
1353 | +#else | |
1354 | + dev = bus->chipco.dev; | |
1355 | +#endif | |
1350 | 1356 | if (WARN_ON(!dev)) |
1351 | 1357 | return; |
1352 | 1358 | /* This forces an update of the cached registers. */ |