summaryrefslogtreecommitdiffstats
path: root/drivers/phy/qualcomm/phy-qcom-ufs-i.h
diff options
context:
space:
mode:
authorStefan Schmidt <stefan@datenfreihafen.org>2019-03-19 16:25:37 +0100
committerStefan Schmidt <stefan@datenfreihafen.org>2019-03-19 16:25:37 +0100
commit86008304dc2ad41a274cdacb585c641ec6bbb558 (patch)
tree7d8fdd6d9cbba05cebb7d36c4309ea2bb48e0af0 /drivers/phy/qualcomm/phy-qcom-ufs-i.h
parentieee802154: hwsim: propagate genlmsg_reply return code (diff)
parentDocumentation: networking: Update netdev-FAQ regarding patches (diff)
downloadlinux-86008304dc2ad41a274cdacb585c641ec6bbb558.tar.xz
linux-86008304dc2ad41a274cdacb585c641ec6bbb558.zip
Merge remote-tracking branch 'net/master'
Diffstat (limited to 'drivers/phy/qualcomm/phy-qcom-ufs-i.h')
-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) \
{ \