summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitchel Humpherys <mitchelh@codeaurora.org>2014-09-30 17:25:53 -0700
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 20:41:27 -0700
commitd73e41e3caa934ee8cc6a8280ccb398e0c40dd2d (patch)
tree8adc8411761118e74453690bc585a15190f4a588
parent6e9b4cd96b31b3b63596350e3d13b74d93bcc161 (diff)
iopoll: remove overly-helpful helper macros, clarify naming
Some of the macros in iopoll.h might be a tad verbose or redundant. Several of the "verbose" macros are not used anywhere in the kernel. Based on feedback from upstream, rip out the extra "wrapper" macros and convert callers (if any) to the lower-level ones. Also change the `_noirq' suffix to the more idiomatic `_atomic'. The following semantic patch was used to help identify and make the necessary changes: @@ expression addr, val, cond, timeout_us; @@ - readl_tight_poll_timeout(addr, val, cond, timeout_us) + readl_poll_timeout(addr, val, cond, 0, timeout_us) @@ expression addr, val, cond, max_reads, time_between_us; @@ - readl_poll_timeout_noirq(addr, val, cond, max_reads, time_between_us) + readl_poll_timeout_atomic(addr, val, cond, max_reads, time_between_us) Change-Id: Ibdb054ded59d777f38f594a2f09a12c64abdb059 [veeras@codeaurora.org: As part of 3.18 upgrade, removing all non-display related code from this commit. arch/arm/mach-msm/clock-mdss-8974.c drivers/clk/msm/gdsc.c drivers/iommu/msm_iommu-v1.c include/linux/iopoll.h] Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
-rw-r--r--drivers/clk/msm/mdss/mdss-dsi-20nm-pll-util.c4
-rw-r--r--drivers/clk/msm/mdss/mdss-dsi-pll-util.c2
-rw-r--r--drivers/clk/msm/mdss/mdss-edp-pll-28hpm.c2
-rw-r--r--drivers/clk/msm/mdss/mdss-hdmi-pll-20nm.c4
-rw-r--r--drivers/clk/msm/mdss/mdss-hdmi-pll-28hpm.c6
5 files changed, 9 insertions, 9 deletions
diff --git a/drivers/clk/msm/mdss/mdss-dsi-20nm-pll-util.c b/drivers/clk/msm/mdss/mdss-dsi-20nm-pll-util.c
index 7d7d61cd6ada..340926dbd487 100644
--- a/drivers/clk/msm/mdss/mdss-dsi-20nm-pll-util.c
+++ b/drivers/clk/msm/mdss/mdss-dsi-20nm-pll-util.c
@@ -458,7 +458,7 @@ int dsi_20nm_pll_lock_status(struct mdss_pll_resources *dsi_pll_res)
int pll_locked;
/* poll for PLL ready status */
- if (readl_poll_timeout_noirq((dsi_pll_res->pll_base +
+ if (readl_poll_timeout_atomic((dsi_pll_res->pll_base +
MMSS_DSI_PHY_PLL_RESET_SM),
status,
((status & BIT(5)) > 0),
@@ -466,7 +466,7 @@ int dsi_20nm_pll_lock_status(struct mdss_pll_resources *dsi_pll_res)
DSI_PLL_POLL_TIMEOUT_US)) {
pr_debug("DSI PLL status=%x failed to Lock\n", status);
pll_locked = 0;
- } else if (readl_poll_timeout_noirq((dsi_pll_res->pll_base +
+ } else if (readl_poll_timeout_atomic((dsi_pll_res->pll_base +
MMSS_DSI_PHY_PLL_RESET_SM),
status,
((status & BIT(6)) > 0),
diff --git a/drivers/clk/msm/mdss/mdss-dsi-pll-util.c b/drivers/clk/msm/mdss/mdss-dsi-pll-util.c
index d195f676edf2..a371ce2a6c5f 100644
--- a/drivers/clk/msm/mdss/mdss-dsi-pll-util.c
+++ b/drivers/clk/msm/mdss/mdss-dsi-pll-util.c
@@ -239,7 +239,7 @@ int dsi_pll_lock_status(struct mdss_pll_resources *dsi_pll_res)
int pll_locked;
/* poll for PLL ready status */
- if (readl_poll_timeout_noirq((dsi_pll_res->pll_base +
+ if (readl_poll_timeout_atomic((dsi_pll_res->pll_base +
DSI_PHY_PLL_UNIPHY_PLL_STATUS),
status,
((status & BIT(0)) == 1),
diff --git a/drivers/clk/msm/mdss/mdss-edp-pll-28hpm.c b/drivers/clk/msm/mdss/mdss-edp-pll-28hpm.c
index 97391939d4fb..9cf115ebe86b 100644
--- a/drivers/clk/msm/mdss/mdss-edp-pll-28hpm.c
+++ b/drivers/clk/msm/mdss/mdss-edp-pll-28hpm.c
@@ -380,7 +380,7 @@ static int edp_pll_lock_status(struct mdss_pll_resources *edp_pll_res)
}
/* poll for PLL ready status */
- if (readl_poll_timeout_noirq((edp_pll_res->pll_base + 0xc0),
+ if (readl_poll_timeout_atomic((edp_pll_res->pll_base + 0xc0),
status, ((status & BIT(0)) == 1),
EDP_PLL_POLL_MAX_READS,
EDP_PLL_POLL_TIMEOUT_US)) {
diff --git a/drivers/clk/msm/mdss/mdss-hdmi-pll-20nm.c b/drivers/clk/msm/mdss/mdss-hdmi-pll-20nm.c
index 43a9aaef841d..8ae26a7ff3ee 100644
--- a/drivers/clk/msm/mdss/mdss-hdmi-pll-20nm.c
+++ b/drivers/clk/msm/mdss/mdss-hdmi-pll-20nm.c
@@ -772,7 +772,7 @@ static int hdmi_20nm_pll_lock_status(struct mdss_pll_resources *io)
pr_debug("%s: Waiting for PHY Ready\n", __func__);
/* poll for PLL ready status */
- if (!readl_poll_timeout_noirq(
+ if (!readl_poll_timeout_atomic(
(io->pll_base + QSERDES_COM_RESET_SM),
status, ((status & BIT(6)) == 1),
HDMI_PLL_POLL_MAX_READS,
@@ -785,7 +785,7 @@ static int hdmi_20nm_pll_lock_status(struct mdss_pll_resources *io)
}
/* poll for PHY ready status */
- if (pll_locked && !readl_poll_timeout_noirq(
+ if (pll_locked && !readl_poll_timeout_atomic(
(io->phy_base + HDMI_PHY_STATUS),
status, ((status & BIT(0)) == 1),
HDMI_PLL_POLL_MAX_READS,
diff --git a/drivers/clk/msm/mdss/mdss-hdmi-pll-28hpm.c b/drivers/clk/msm/mdss/mdss-hdmi-pll-28hpm.c
index 7353cda9f32e..eb23fd2a41c6 100644
--- a/drivers/clk/msm/mdss/mdss-hdmi-pll-28hpm.c
+++ b/drivers/clk/msm/mdss/mdss-hdmi-pll-28hpm.c
@@ -152,7 +152,7 @@ static int hdmi_vco_enable(struct clk *c)
/* poll for PLL ready status */
max_reads = 20;
timeout_us = 100;
- if (readl_poll_timeout_noirq(
+ if (readl_poll_timeout_atomic(
(hdmi_pll_res->pll_base + HDMI_UNI_PLL_STATUS),
status, ((status & BIT(0)) == 1), max_reads, timeout_us)) {
pr_err("hdmi phy pll status=%x failed to Lock\n", status);
@@ -166,7 +166,7 @@ static int hdmi_vco_enable(struct clk *c)
/* poll for PHY ready status */
max_reads = 20;
timeout_us = 100;
- if (readl_poll_timeout_noirq(
+ if (readl_poll_timeout_atomic(
(hdmi_pll_res->phy_base + HDMI_PHY_STATUS),
status, ((status & BIT(0)) == 1), max_reads, timeout_us)) {
pr_err("hdmi phy status=%x failed to Lock\n", status);
@@ -847,7 +847,7 @@ static int hdmi_pll_lock_status(struct mdss_pll_resources *hdmi_pll_res)
}
/* poll for PLL ready status */
- if (readl_poll_timeout_noirq(
+ if (readl_poll_timeout_atomic(
(hdmi_pll_res->phy_base + HDMI_PHY_STATUS),
status, ((status & BIT(0)) == 1),
HDMI_PLL_POLL_MAX_READS,