diff options
author | Pali Rohár <pali@kernel.org> | 2021-09-26 01:54:41 +0300 |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2021-10-08 09:33:52 +0300 |
commit | 6b2771cb19623f7028085e47a52e30813130f61e (patch) | |
tree | 20b815138986e5ca53585714c94898ae5348bd31 /drivers/pci | |
parent | de7293043329c6d230b7f81861867c6a645f4dc7 (diff) | |
download | u-boot-6b2771cb19623f7028085e47a52e30813130f61e.tar.xz |
arm: a37xx: pci: Fix pcie_advk_link_up()
Aardvark reports Disabled and Hot Reset LTSSM states as values >= 0x20.
Link is not up in these states, so fix pcie_advk_link_up() function.
Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/pci-aardvark.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/pci/pci-aardvark.c b/drivers/pci/pci-aardvark.c index cf6e30f936..741e0431e1 100644 --- a/drivers/pci/pci-aardvark.c +++ b/drivers/pci/pci-aardvark.c @@ -145,6 +145,7 @@ #define LTSSM_SHIFT 24 #define LTSSM_MASK 0x3f #define LTSSM_L0 0x10 +#define LTSSM_DISABLED 0x20 #define VENDOR_ID_REG (LMI_BASE_ADDR + 0x44) /* PCIe core controller registers */ @@ -569,7 +570,7 @@ static int pcie_advk_link_up(struct pcie_advk *pcie) val = advk_readl(pcie, CFG_REG); ltssm_state = (val >> LTSSM_SHIFT) & LTSSM_MASK; - return ltssm_state >= LTSSM_L0; + return ltssm_state >= LTSSM_L0 && ltssm_state < LTSSM_DISABLED; } /** |