[PATCHv3 2/2] phy: exynos5-usbdrd: Calibrate LOS levels for exynos5420/5800
Sylwester Nawrocki
s.nawrocki at samsung.com
Thu Oct 5 05:28:24 PDT 2017
On 10/05/2017 02:11 PM, Andrzej Pietrasiewicz wrote:
> +static int crport_handshake(struct exynos5_usbdrd_phy *phy_drd,
> + u32 val, u32 cmd)
> +{
> + u32 usec = 100;
> + unsigned int result;
> +
> + writel(val | cmd, phy_drd->reg_phy + EXYNOS5_DRD_PHYREG0);
> +
> + do {
> + result = readl(phy_drd->reg_phy + EXYNOS5_DRD_PHYREG1);
> + if (result & PHYREG1_CR_ACK)
> + break;
> +
> + udelay(1);
> + } while (usec-- > 0);
It looks like you could use readl_poll_timeout_atomic() macro
instead of these polling loops.
--
Regards,
Sylwester
More information about the linux-arm-kernel
mailing list