• Mathias Kresin's avatar
    MIPS: ath79: get PCIe controller out of reset · 0316b053
    Mathias Kresin authored
    The ar724x pci driver expects the PCIe controller to be brought out of
    reset by the bootloader.
    
    At least the AVM Fritz 300E bootloader doesn't take care of releasing
    the different PCIe controller related resets which causes an endless
    hang as soon as either the PCIE Reset register (0x180f0018) or the PCI
    Application Control register (0x180f0000) is read from.
    
    Do the full "PCIE Root Complex Initialization Sequence" if the PCIe
    host controller is still in reset during probing.
    
    The QCA u-boot sleeps 10ms after the PCIE Application Control bit is
    set to ready. It has been shown that 10ms might not be enough time if
    PCIe should be used right after setting the bit. During my tests it
    took up to 20ms till the link was up. Giving the link up to 100ms
    should work for all cases.
    Signed-off-by: default avatarMathias Kresin <dev@kresin.me>
    Signed-off-by: default avatarJohn Crispin <john@phrozen.org>
    Signed-off-by: default avatarPaul Burton <paul.burton@mips.com>
    Patchwork: https://patchwork.linux-mips.org/patch/19916/
    Cc: James Hogan <jhogan@kernel.org>
    Cc: Ralf Baechle <ralf@linux-mips.org>
    Cc: linux-mips@linux-mips.org
    0316b053
pci-ar724x.c 10.4 KB