Commit 84558ff7 authored by Stephen Boyd's avatar Stephen Boyd

clk: pxa: Use __iomem properly and staticize lock variable

This function is passed an __iomem pointer but we use a u32
pointer instead which makes checkers like spare complain.
Furthermore, "lock" is a pretty poor variable name for a string
that will go into lockdep reports and the symbol isn't marked
static. Cleanup all this.
Acked-by: default avatarRobert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
parent 295face9
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
#define MDREFR_DB2_MASK (MDREFR_K2DB2 | MDREFR_K1DB2) #define MDREFR_DB2_MASK (MDREFR_K2DB2 | MDREFR_K1DB2)
#define MDREFR_DRI_MASK 0xFFF #define MDREFR_DRI_MASK 0xFFF
DEFINE_SPINLOCK(lock); static DEFINE_SPINLOCK(pxa_clk_lock);
static struct clk *pxa_clocks[CLK_MAX]; static struct clk *pxa_clocks[CLK_MAX];
static struct clk_onecell_data onecell_data = { static struct clk_onecell_data onecell_data = {
...@@ -109,7 +109,7 @@ int __init clk_pxa_cken_init(const struct desc_clk_cken *clks, int nb_clks) ...@@ -109,7 +109,7 @@ int __init clk_pxa_cken_init(const struct desc_clk_cken *clks, int nb_clks)
pxa_clk->lp = clks[i].lp; pxa_clk->lp = clks[i].lp;
pxa_clk->hp = clks[i].hp; pxa_clk->hp = clks[i].hp;
pxa_clk->gate = clks[i].gate; pxa_clk->gate = clks[i].gate;
pxa_clk->gate.lock = &lock; pxa_clk->gate.lock = &pxa_clk_lock;
clk = clk_register_composite(NULL, clks[i].name, clk = clk_register_composite(NULL, clks[i].name,
clks[i].parent_names, 2, clks[i].parent_names, 2,
&pxa_clk->hw, &cken_mux_ops, &pxa_clk->hw, &cken_mux_ops,
...@@ -155,7 +155,8 @@ void pxa2xx_core_turbo_switch(bool on) ...@@ -155,7 +155,8 @@ void pxa2xx_core_turbo_switch(bool on)
} }
void pxa2xx_cpll_change(struct pxa2xx_freq *freq, void pxa2xx_cpll_change(struct pxa2xx_freq *freq,
u32 (*mdrefr_dri)(unsigned int), u32 *mdrefr, u32 *cccr) u32 (*mdrefr_dri)(unsigned int), void __iomem *mdrefr,
void __iomem *cccr)
{ {
unsigned int clkcfg = freq->clkcfg; unsigned int clkcfg = freq->clkcfg;
unsigned int unused, preset_mdrefr, postset_mdrefr; unsigned int unused, preset_mdrefr, postset_mdrefr;
......
...@@ -155,8 +155,8 @@ void clk_pxa_dt_common_init(struct device_node *np); ...@@ -155,8 +155,8 @@ void clk_pxa_dt_common_init(struct device_node *np);
void pxa2xx_core_turbo_switch(bool on); void pxa2xx_core_turbo_switch(bool on);
void pxa2xx_cpll_change(struct pxa2xx_freq *freq, void pxa2xx_cpll_change(struct pxa2xx_freq *freq,
u32 (*mdrefr_dri)(unsigned int), u32 *mdrefr, u32 (*mdrefr_dri)(unsigned int), void __iomem *mdrefr,
u32 *cccr); void __iomem *cccr);
int pxa2xx_determine_rate(struct clk_rate_request *req, int pxa2xx_determine_rate(struct clk_rate_request *req,
struct pxa2xx_freq *freqs, int nb_freqs); struct pxa2xx_freq *freqs, int nb_freqs);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment