summaryrefslogtreecommitdiffstats
path: root/drivers/phy/qualcomm
diff options
context:
space:
mode:
authorMarc Gonzalez <marc.w.gonzalez@free.fr>2018-12-21 11:13:18 +0100
committerKishon Vijay Abraham I <kishon@ti.com>2019-02-07 06:40:36 +0100
commit32fcf6fc6c71ffb29f31cffe6e93f4389757cb19 (patch)
tree89e877a1b321c222b1c9aa4e0a07a0ce74532f2c /drivers/phy/qualcomm
parentdt-bindings: rcar-gen3-phy-usb2: Add r8a774c0 support (diff)
downloadlinux-32fcf6fc6c71ffb29f31cffe6e93f4389757cb19.tar.xz
linux-32fcf6fc6c71ffb29f31cffe6e93f4389757cb19.zip
phy: qcom-ufs: Use iopoll.h readl_poll_timeout macro
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> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> Reviewed-by: Andy Gross <andy.gross@linaro.org> Reviewed-by: Vivek Gautam <vivek.gautam@codeaurora.org> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Diffstat (limited to 'drivers/phy/qualcomm')
-rw-r--r--drivers/phy/qualcomm/phy-qcom-ufs-i.h19
1 files changed, 1 insertions, 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) \
{ \