Skip to content
  • This contributor prefers not to receive mails's avatar
    arm: a37xx: pci: Don't put link into LTSSM Recovery state during probe · 127dbec3
    This contributor prefers not to receive mails authored and Stefan Roese's avatar Stefan Roese committed
    
    
    During our debugging of the Aardvark driver in Linux we have discovered
    that the PCIE_CORE_LINK_CTRL_STAT_REG register in fact controls standard
    PCIe Link Control Register for PCIe Root Bridge. This led us to discover
    that the name of the PCIE_CORE_LINK_TRAINING macro and the corresponding
    comment by this macro's usage is misleading; this bit in fact controls
    Retrain Link, which, according to PCIe base spec is defined as:
    
      A write of 1b to this bit initiates Link retraining by directing the
      Physical Layer LTSSM to the Recovery state. If the LTSSM is already in
      Recovery or Configuration, re-entering Recovery is permitted but not
      required.
    
    Entering Recovery state is normally done from LTSSM L0, L0s and L1 states.
    But since the pci-aardvark.c driver enables Link Training just a few lines
    above, the controller is not in L0 ready state yet. So setting aardvark bit
    PCIE_CORE_LINK_TRAINING does not actually enter Recovery state at this
    place.
    
    Moreover, trying to enter LTSSM Recovery state without other configuration
    is causing issues for some cards (e.g. Atheros AR9xxx and QCA9xxx). Since
    Recovery state is not entered, these issues are not triggered.
    
    Remove code which tries to enter LTSSM Recovery state completely.
    
    Signed-off-by: default avatarPali Rohár <pali@kernel.org>
    Reviewed-by: default avatarMarek Behún <marek.behun@nic.cz>
    Reviewed-by: default avatarStefan Roese <sr@denx.de>
    127dbec3