diff options
author | Wolfgang Denk <wd@denx.de> | 2007-12-27 00:35:03 +0100 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2007-12-27 00:35:03 +0100 |
commit | 3f523edb146c3dfbc52e7631b37e6f326e0e980d (patch) | |
tree | 8889ebbfef58c0fcddb8c0d168482df93e2f8af9 /drivers/pci/fsl_pci_init.c | |
parent | bd878eb024bf9cb351c9ce66db63558de2d0e395 (diff) | |
parent | 8ff3de61fc5f9b3b21647bce081a3b7f710f0d4d (diff) |
Merge branch 'master' of git://www.denx.de/git/u-boot-mpc85xx
Diffstat (limited to 'drivers/pci/fsl_pci_init.c')
-rw-r--r-- | drivers/pci/fsl_pci_init.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/pci/fsl_pci_init.c b/drivers/pci/fsl_pci_init.c index 1e778844a5..68e45e17b3 100644 --- a/drivers/pci/fsl_pci_init.c +++ b/drivers/pci/fsl_pci_init.c @@ -112,6 +112,29 @@ fsl_pci_init(struct pci_controller *hose) pci_hose_read_config_word(hose, dev, PCI_LTSSM, <ssm); enabled = ltssm >= PCI_LTSSM_L0; +#ifdef CONFIG_FSL_PCIE_RESET + if (ltssm == 1) { + int i; + debug("....PCIe link error. " + "LTSSM=0x%02x.", ltssm); + pci->pdb_stat |= 0x08000000; /* assert PCIe reset */ + temp32 = pci->pdb_stat; + udelay(100); + debug(" Asserting PCIe reset @%x = %x\n", + &pci->pdb_stat, pci->pdb_stat); + pci->pdb_stat &= ~0x08000000; /* clear reset */ + asm("sync;isync"); + for (i=0; i<100 && ltssm < PCI_LTSSM_L0; i++) { + pci_hose_read_config_word(hose, dev, PCI_LTSSM, + <ssm); + udelay(1000); + debug("....PCIe link error. " + "LTSSM=0x%02x.\n", ltssm); + } + enabled = ltssm >= PCI_LTSSM_L0; + } +#endif + if (!enabled) { debug("....PCIE link error. Skipping scan." "LTSSM=0x%02x\n", ltssm); |