[PATCH u-boot-marvell v2 1/6] arm: a37xx: pci: Fix pcie_advk_link_up()

Stefan Roese sr at denx.de
Fri Oct 8 08:20:47 CEST 2021


On 26.09.21 00:54, Marek Behún wrote:
> From: Pali Rohár <pali at kernel.org>
> 
> 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 at kernel.org>
> Reviewed-by: Marek Behún <marek.behun at nic.cz>

Reviewed-by: Stefan Roese <sr at denx.de>

Thanks,
Stefan

> ---
>   drivers/pci/pci-aardvark.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> 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;
>   }
>   
>   /**
> 


Viele Grüße,
Stefan

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr at denx.de


More information about the U-Boot mailing list