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>
这个提交包含在:
@@ -22,7 +22,7 @@ static int cfc_divisors[] = { 1, 1, 4, 1, 1, 1, 1, 1 };
|
||||
|
||||
static void master_clk_init(struct clk *clk)
|
||||
{
|
||||
clk->rate *= p0fc_divisors[(ctrl_inl(FRQCR) >> 4) & 0x07];
|
||||
clk->rate *= p0fc_divisors[(__raw_readl(FRQCR) >> 4) & 0x07];
|
||||
}
|
||||
|
||||
static struct clk_ops sh7763_master_clk_ops = {
|
||||
@@ -31,7 +31,7 @@ static struct clk_ops sh7763_master_clk_ops = {
|
||||
|
||||
static unsigned long module_clk_recalc(struct clk *clk)
|
||||
{
|
||||
int idx = ((ctrl_inl(FRQCR) >> 4) & 0x07);
|
||||
int idx = ((__raw_readl(FRQCR) >> 4) & 0x07);
|
||||
return clk->parent->rate / p0fc_divisors[idx];
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ static struct clk_ops sh7763_module_clk_ops = {
|
||||
|
||||
static unsigned long bus_clk_recalc(struct clk *clk)
|
||||
{
|
||||
int idx = ((ctrl_inl(FRQCR) >> 16) & 0x07);
|
||||
int idx = ((__raw_readl(FRQCR) >> 16) & 0x07);
|
||||
return clk->parent->rate / bfc_divisors[idx];
|
||||
}
|
||||
|
||||
@@ -68,7 +68,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) >> 20) & 0x07);
|
||||
int idx = ((__raw_readl(FRQCR) >> 20) & 0x07);
|
||||
return clk->parent->rate / cfc_divisors[idx];
|
||||
}
|
||||
|
||||
|
在新工单中引用
屏蔽一个用户