From: Marc Gonzalez <marc.w.gonzalez@free.fr>
To: Kishon Vijay Abraham <kishon@ti.com>,
Andy Gross <andy.gross@linaro.org>,
David Brown <david.brown@linaro.org>,
Yaniv Gardi <ygardi@codeaurora.org>
Cc: Vivek Gautam <vivek.gautam@codeaurora.org>,
Matt Wagantall <mattw@codeaurora.org>,
Mitchel Humpherys <mitchelh@codeaurora.org>,
Will Deacon <will.deacon@arm.com>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
Arnd Bergmann <arnd@arndb.de>,
MSM <linux-arm-msm@vger.kernel.org>,
Linux ARM <linux-arm-kernel@lists.infradead.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH v1] phy: qcom-ufs: Use iopoll.h readl_poll_timeout macro
Date: Fri, 21 Dec 2018 11:13:18 +0100 [thread overview]
Message-ID: <88cd3a2e-2acc-02ff-9f27-284d3b679d10@free.fr> (raw)
The private copy of readl_poll_timeout is no longer needed.
Use the implementation in iopoll.h instead.
Signed-off-by: Marc Gonzalez <marc.w.gonzalez@free.fr>
---
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 <linux/platform_device.h>
#include <linux/io.h>
#include <linux/delay.h>
-
-#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 <linux/iopoll.h>
#define UFS_QCOM_PHY_CAL_ENTRY(reg, val) \
{ \
--
2.17.1
next reply other threads:[~2018-12-21 10:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-21 10:13 Marc Gonzalez [this message]
2018-12-27 4:03 ` Bjorn Andersson
2018-12-28 16:05 ` Andy Gross
2019-01-16 9:10 ` Marc Gonzalez
2019-01-16 9:24 ` Kishon Vijay Abraham I
2019-01-16 10:30 ` Marc Gonzalez
2019-01-16 11:50 ` Kishon Vijay Abraham I
2019-01-02 6:53 ` Vivek Gautam
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=88cd3a2e-2acc-02ff-9f27-284d3b679d10@free.fr \
--to=marc.w.gonzalez@free.fr \
--cc=andy.gross@linaro.org \
--cc=arnd@arndb.de \
--cc=bjorn.andersson@linaro.org \
--cc=david.brown@linaro.org \
--cc=kishon@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mattw@codeaurora.org \
--cc=mitchelh@codeaurora.org \
--cc=vivek.gautam@codeaurora.org \
--cc=will.deacon@arm.com \
--cc=ygardi@codeaurora.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®