• Johan Hovold's avatar
    phy: qcom-qmp-pcie: replace power-down delay · 51bd3306
    Johan Hovold authored
    
    
    The power-down delay was included in the first version of the QMP driver
    as an optional delay after powering on the PHY (using
    POWER_DOWN_CONTROL) and just before starting it. Later changes modified
    this sequence by powering on before initialising the PHY, but the
    optional delay stayed where it was (i.e. before starting the PHY).
    
    The vendor driver does not use a delay before starting the PHY and this
    is likely not needed on any platform unless there is a corresponding
    delay in the vendor kernel init sequence tables (i.e. in devicetree).
    
    But as the vendor kernel do have a 1 ms delay *after* starting the PHY
    and before starting to poll the status it is possible that later
    contributors have simply not noticed that the mainline power-down delay
    is not equivalent.
    
    As the current delay before even starting the PHY is pretty much
    pointless and likely a mistake, move the delay after starting the PHY
    which avoids a few iterations of polling and speeds up startup by 1 ms
    (the poll loop otherwise takes about 1.8 ms).
    
    Note that MSM8998 has never used a power-down delay so add a flag to
    skip the delay in case starting the PHY is faster on MSM8998. This can
    be removed after someone takes a measurement.
    Signed-off-by: default avatarJohan Hovold <johan+linaro@kernel.org>
    Reviewed-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
    Link: https://lore.kernel.org/r/20221012081241.18273-10-johan+linaro@kernel.org
    
    Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
    51bd3306
phy-qcom-qmp-pcie.c 94.2 KB