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>
这个提交包含在:
@@ -23,7 +23,7 @@ static int divisors[] = { 1, 2, 3, 4, 6 };
|
||||
|
||||
static void master_clk_init(struct clk *clk)
|
||||
{
|
||||
int frqcr = ctrl_inw(FRQCR);
|
||||
int frqcr = __raw_readw(FRQCR);
|
||||
int idx = (frqcr & 0x0300) >> 8;
|
||||
|
||||
clk->rate *= multipliers[idx];
|
||||
@@ -35,7 +35,7 @@ static struct clk_ops sh7712_master_clk_ops = {
|
||||
|
||||
static unsigned long module_clk_recalc(struct clk *clk)
|
||||
{
|
||||
int frqcr = ctrl_inw(FRQCR);
|
||||
int frqcr = __raw_readw(FRQCR);
|
||||
int idx = frqcr & 0x0007;
|
||||
|
||||
return clk->parent->rate / divisors[idx];
|
||||
@@ -47,7 +47,7 @@ static struct clk_ops sh7712_module_clk_ops = {
|
||||
|
||||
static unsigned long cpu_clk_recalc(struct clk *clk)
|
||||
{
|
||||
int frqcr = ctrl_inw(FRQCR);
|
||||
int frqcr = __raw_readw(FRQCR);
|
||||
int idx = (frqcr & 0x0030) >> 4;
|
||||
|
||||
return clk->parent->rate / divisors[idx];
|
||||
|
在新工单中引用
屏蔽一个用户