diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2011-12-05 17:19:51 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-12-08 15:06:35 -0500 |
commit | 329456d1ffb416c220813725b7363cda9975c9aa (patch) | |
tree | 3daa1764d4839a98d9f28ef550bed295588a667d /drivers | |
parent | 91ddff8a3b9cc7ac2252aca138220939cf6cc2cf (diff) |
ssb: fix init regression with SoCs
This fixes a Data bus error on some SoCs. The first fix for this
problem did not solve it on all devices.
commit 6ae8ec27868bfdbb815287bee8146acbefaee867
Author: Rafał Miłecki <zajec5@gmail.com>
Date: Tue Jul 5 17:25:32 2011 +0200
ssb: fix init regression of hostmode PCI core
In ssb_pcicore_fix_sprom_core_index() the sprom on the PCI core is
accessed, but the sprom only exists when the ssb bus is connected over
a PCI bus to the rest of the system and not when the SSB Bus is the
main system bus. SoCs sometimes have a PCI host controller and there
this code will not be executed, but there are some old SoCs with an PCI
controller in client mode around and ssb_pcicore_fix_sprom_core_index()
should not be called on these devices too. The PCI controller on these
devices are unused, but without this fix it results in an Data bus
error when it gets initialized.
Cc: Michael Buesch <m@bues.ch>
Cc: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Cc: stable@vger.kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ssb/driver_pcicore.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/ssb/driver_pcicore.c b/drivers/ssb/driver_pcicore.c index e6ac3177fbbe..32c535f5ce31 100644 --- a/drivers/ssb/driver_pcicore.c +++ b/drivers/ssb/driver_pcicore.c | |||
@@ -516,10 +516,14 @@ static void ssb_pcicore_pcie_setup_workarounds(struct ssb_pcicore *pc) | |||
516 | 516 | ||
517 | static void __devinit ssb_pcicore_init_clientmode(struct ssb_pcicore *pc) | 517 | static void __devinit ssb_pcicore_init_clientmode(struct ssb_pcicore *pc) |
518 | { | 518 | { |
519 | ssb_pcicore_fix_sprom_core_index(pc); | 519 | struct ssb_device *pdev = pc->dev; |
520 | struct ssb_bus *bus = pdev->bus; | ||
521 | |||
522 | if (bus->bustype == SSB_BUSTYPE_PCI) | ||
523 | ssb_pcicore_fix_sprom_core_index(pc); | ||
520 | 524 | ||
521 | /* Disable PCI interrupts. */ | 525 | /* Disable PCI interrupts. */ |
522 | ssb_write32(pc->dev, SSB_INTVEC, 0); | 526 | ssb_write32(pdev, SSB_INTVEC, 0); |
523 | 527 | ||
524 | /* Additional PCIe always once-executed workarounds */ | 528 | /* Additional PCIe always once-executed workarounds */ |
525 | if (pc->dev->id.coreid == SSB_DEV_PCIE) { | 529 | if (pc->dev->id.coreid == SSB_DEV_PCIE) { |