From: Shawn Lin Date: Mon, 20 Jun 2016 17:56:40 +0000 (-0700) Subject: phy: rockchip-emmc: give DLL some extra time to be ready X-Git-Tag: v4.8-rc1~81^2~110 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=4d54a25ba5df8d4fd1c1604d1526c9279237ac27;p=linux.git phy: rockchip-emmc: give DLL some extra time to be ready According to the databook, 10.2us is the max time for dll to be ready to work. However in testing, some chips need 20us for dll to be ready. This patch adds some extra margin for dllrdy to be ready, fixing our -ETIMEDOUT issues. Signed-off-by: Shawn Lin Signed-off-by: Brian Norris Signed-off-by: Douglas Anderson Acked-by: Kishon Vijay Abraham I Tested-by: Heiko Stuebner Signed-off-by: Ulf Hansson --- diff --git a/drivers/phy/phy-rockchip-emmc.c b/drivers/phy/phy-rockchip-emmc.c index 6ebcf3e41c46..48cbe691a889 100644 --- a/drivers/phy/phy-rockchip-emmc.c +++ b/drivers/phy/phy-rockchip-emmc.c @@ -119,10 +119,11 @@ static int rockchip_emmc_phy_power(struct rockchip_emmc_phy *rk_phy, PHYCTRL_ENDLL_MASK, PHYCTRL_ENDLL_SHIFT)); /* - * After enable analog DLL circuits, we need extra 10.2us - * for dll to be ready for work. + * After enable analog DLL circuits, we need an extra 10.2us + * for dll to be ready for work. But according to testing, we + * find some chips need more than 25us. */ - udelay(11); + udelay(30); regmap_read(rk_phy->reg_base, rk_phy->reg_offset + GRF_EMMCPHY_STATUS, &dllrdy);