aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ssb
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2015-04-05 12:39:27 -0400
committerKalle Valo <kvalo@codeaurora.org>2015-04-07 13:18:10 -0400
commitf56d9e23b78e311fbd992a1bd80b8bf2adaee29b (patch)
tree25a92db4ae796d33dcaeecc92284b87bb4dda6e8 /drivers/ssb
parent61b559dea40ec1712be4a0ea712a2922a8f38588 (diff)
ssb: add delay after PCI reset to fix SoC reboots
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/ssb')
-rw-r--r--drivers/ssb/driver_pcicore.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/ssb/driver_pcicore.c b/drivers/ssb/driver_pcicore.c
index d75b72ba2672..15a7ee3859dd 100644
--- a/drivers/ssb/driver_pcicore.c
+++ b/drivers/ssb/driver_pcicore.c
@@ -357,6 +357,15 @@ static void ssb_pcicore_init_hostmode(struct ssb_pcicore *pc)
357 pcicore_write32(pc, SSB_PCICORE_SBTOPCI2, 357 pcicore_write32(pc, SSB_PCICORE_SBTOPCI2,
358 SSB_PCICORE_SBTOPCI_MEM | SSB_PCI_DMA); 358 SSB_PCICORE_SBTOPCI_MEM | SSB_PCI_DMA);
359 359
360 /*
361 * Accessing PCI config without a proper delay after devices reset (not
362 * GPIO reset) was causing reboots on WRT300N v1.0.
363 * Tested delay 850 us lowered reboot chance to 50-80%, 1000 us fixed it
364 * completely. Flushing all writes was also tested but with no luck.
365 */
366 if (pc->dev->bus->chip_id == 0x4704)
367 usleep_range(1000, 2000);
368
360 /* Enable PCI bridge BAR0 prefetch and burst */ 369 /* Enable PCI bridge BAR0 prefetch and burst */
361 val = PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY; 370 val = PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY;
362 ssb_extpci_write_config(pc, 0, 0, 0, PCI_COMMAND, &val, 2); 371 ssb_extpci_write_config(pc, 0, 0, 0, PCI_COMMAND, &val, 2);