Commit aaf87f03ad709ff9f00819ef1eb001e878ad0a54
Committed by
Tom Rini
1 parent
cb4c833b74
Exists in
v2017.01-smarct4x
and in
30 other branches
pci: pcie_imx: Fix hang on mx6qp
PCI driver currently hangs on mx6qp. Toggle the reset bit with the appropriate timings to fix the issue. Based on the FSL kernel driver implementation. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Stefano Babic <sbabic@denx.de>
Showing 2 changed files with 10 additions and 0 deletions Side-by-side Diff
arch/arm/include/asm/arch-mx6/iomux.h
drivers/pci/pcie_imx.c
... | ... | @@ -19,6 +19,7 @@ |
19 | 19 | #include <asm/io.h> |
20 | 20 | #include <linux/sizes.h> |
21 | 21 | #include <errno.h> |
22 | +#include <asm/arch/sys_proto.h> | |
22 | 23 | |
23 | 24 | #define PCI_ACCESS_READ 0 |
24 | 25 | #define PCI_ACCESS_WRITE 1 |
... | ... | @@ -430,6 +431,10 @@ |
430 | 431 | static int imx6_pcie_assert_core_reset(void) |
431 | 432 | { |
432 | 433 | struct iomuxc *iomuxc_regs = (struct iomuxc *)IOMUXC_BASE_ADDR; |
434 | + | |
435 | + if (is_mx6dqp()) | |
436 | + setbits_le32(&iomuxc_regs->gpr[1], IOMUXC_GPR1_PCIE_SW_RST); | |
437 | + | |
433 | 438 | #if defined(CONFIG_MX6SX) |
434 | 439 | struct gpc *gpc_regs = (struct gpc *)GPC_BASE_ADDR; |
435 | 440 | |
... | ... | @@ -535,6 +540,9 @@ |
535 | 540 | imx6_pcie_toggle_power(); |
536 | 541 | |
537 | 542 | enable_pcie_clock(); |
543 | + | |
544 | + if (is_mx6dqp()) | |
545 | + clrbits_le32(&iomuxc_regs->gpr[1], IOMUXC_GPR1_PCIE_SW_RST); | |
538 | 546 | |
539 | 547 | /* |
540 | 548 | * Wait for the clock to settle a bit, when the clock are sourced |