From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bjorn Andersson Subject: Re: [PATCH v1] phy: qcom-ufs: Use iopoll.h readl_poll_timeout macro Date: Wed, 26 Dec 2018 20:03:41 -0800 Message-ID: <20181227040341.GA9651@builder> References: <88cd3a2e-2acc-02ff-9f27-284d3b679d10@free.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <88cd3a2e-2acc-02ff-9f27-284d3b679d10@free.fr> Sender: linux-kernel-owner@vger.kernel.org To: Marc Gonzalez Cc: Kishon Vijay Abraham , Andy Gross , David Brown , Yaniv Gardi , Vivek Gautam , Matt Wagantall , Mitchel Humpherys , Will Deacon , Arnd Bergmann , MSM , Linux ARM , LKML List-Id: linux-arm-msm@vger.kernel.org On Fri 21 Dec 02:13 PST 2018, Marc Gonzalez wrote: > The private copy of readl_poll_timeout is no longer needed. > Use the implementation in iopoll.h instead. > > Signed-off-by: Marc Gonzalez Reviewed-by: Bjorn Andersson Regards, Bjorn > --- > drivers/phy/qualcomm/phy-qcom-ufs-i.h | 19 +------------------ > 1 file changed, 1 insertion(+), 18 deletions(-) > > diff --git a/drivers/phy/qualcomm/phy-qcom-ufs-i.h b/drivers/phy/qualcomm/phy-qcom-ufs-i.h > index 681644e43248..f798fb64de94 100644 > --- a/drivers/phy/qualcomm/phy-qcom-ufs-i.h > +++ b/drivers/phy/qualcomm/phy-qcom-ufs-i.h > @@ -23,24 +23,7 @@ > #include > #include > #include > - > -#define readl_poll_timeout(addr, val, cond, sleep_us, timeout_us) \ > -({ \ > - ktime_t timeout = ktime_add_us(ktime_get(), timeout_us); \ > - might_sleep_if(timeout_us); \ > - for (;;) { \ > - (val) = readl(addr); \ > - if (cond) \ > - break; \ > - if (timeout_us && ktime_compare(ktime_get(), timeout) > 0) { \ > - (val) = readl(addr); \ > - break; \ > - } \ > - if (sleep_us) \ > - usleep_range(DIV_ROUND_UP(sleep_us, 4), sleep_us); \ > - } \ > - (cond) ? 0 : -ETIMEDOUT; \ > -}) > +#include > > #define UFS_QCOM_PHY_CAL_ENTRY(reg, val) \ > { \ > -- > 2.17.1