sh: Mass ctrl_in/outX to __raw_read/writeX conversion.
The old ctrl in/out routines are non-portable and unsuitable for cross-platform use. While drivers/sh has already been sanitized, there is still quite a lot of code that is not. This converts the arch/sh/ bits over, which permits us to flag the routines as deprecated whilst still building with -Werror for the architecture code, and to ensure that future users are not added. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This commit is contained in:
@@ -33,7 +33,7 @@ static int cfc_divisors[] = { 1, 1, 4, 6 };
|
||||
|
||||
static void master_clk_init(struct clk *clk)
|
||||
{
|
||||
clk->rate *= pfc_divisors[(ctrl_inl(FRQCR) >> PFC_POS) & PFC_MSK];
|
||||
clk->rate *= pfc_divisors[(__raw_readl(FRQCR) >> PFC_POS) & PFC_MSK];
|
||||
}
|
||||
|
||||
static struct clk_ops shx3_master_clk_ops = {
|
||||
@@ -42,7 +42,7 @@ static struct clk_ops shx3_master_clk_ops = {
|
||||
|
||||
static unsigned long module_clk_recalc(struct clk *clk)
|
||||
{
|
||||
int idx = ((ctrl_inl(FRQCR) >> PFC_POS) & PFC_MSK);
|
||||
int idx = ((__raw_readl(FRQCR) >> PFC_POS) & PFC_MSK);
|
||||
return clk->parent->rate / pfc_divisors[idx];
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ static struct clk_ops shx3_module_clk_ops = {
|
||||
|
||||
static unsigned long bus_clk_recalc(struct clk *clk)
|
||||
{
|
||||
int idx = ((ctrl_inl(FRQCR) >> BFC_POS) & BFC_MSK);
|
||||
int idx = ((__raw_readl(FRQCR) >> BFC_POS) & BFC_MSK);
|
||||
return clk->parent->rate / bfc_divisors[idx];
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ static struct clk_ops shx3_bus_clk_ops = {
|
||||
|
||||
static unsigned long cpu_clk_recalc(struct clk *clk)
|
||||
{
|
||||
int idx = ((ctrl_inl(FRQCR) >> IFC_POS) & IFC_MSK);
|
||||
int idx = ((__raw_readl(FRQCR) >> IFC_POS) & IFC_MSK);
|
||||
return clk->parent->rate / ifc_divisors[idx];
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ void __init arch_init_clk_ops(struct clk_ops **ops, int idx)
|
||||
|
||||
static unsigned long shyway_clk_recalc(struct clk *clk)
|
||||
{
|
||||
int idx = ((ctrl_inl(FRQCR) >> CFC_POS) & CFC_MSK);
|
||||
int idx = ((__raw_readl(FRQCR) >> CFC_POS) & CFC_MSK);
|
||||
return clk->parent->rate / cfc_divisors[idx];
|
||||
}
|
||||
|
||||
|
مرجع در شماره جدید
Block a user