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>
このコミットが含まれているのは:
@@ -24,7 +24,7 @@ static int pfc_divisors[] = { 1, 2, 4, 1, 3, 6, 1, 1 };
|
||||
|
||||
static void master_clk_init(struct clk *clk)
|
||||
{
|
||||
int frqcr = ctrl_inw(FRQCR);
|
||||
int frqcr = __raw_readw(FRQCR);
|
||||
int idx = ((frqcr & 0x2000) >> 11) | (frqcr & 0x0003);
|
||||
|
||||
clk->rate *= pfc_divisors[idx];
|
||||
@@ -36,7 +36,7 @@ static struct clk_ops sh7709_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 & 0x2000) >> 11) | (frqcr & 0x0003);
|
||||
|
||||
return clk->parent->rate / pfc_divisors[idx];
|
||||
@@ -48,7 +48,7 @@ static struct clk_ops sh7709_module_clk_ops = {
|
||||
|
||||
static unsigned long bus_clk_recalc(struct clk *clk)
|
||||
{
|
||||
int frqcr = ctrl_inw(FRQCR);
|
||||
int frqcr = __raw_readw(FRQCR);
|
||||
int idx = (frqcr & 0x0080) ?
|
||||
((frqcr & 0x8000) >> 13) | ((frqcr & 0x0030) >> 4) : 1;
|
||||
|
||||
@@ -61,7 +61,7 @@ static struct clk_ops sh7709_bus_clk_ops = {
|
||||
|
||||
static unsigned long cpu_clk_recalc(struct clk *clk)
|
||||
{
|
||||
int frqcr = ctrl_inw(FRQCR);
|
||||
int frqcr = __raw_readw(FRQCR);
|
||||
int idx = ((frqcr & 0x4000) >> 12) | ((frqcr & 0x000c) >> 2);
|
||||
|
||||
return clk->parent->rate / ifc_divisors[idx];
|
||||
|
新しいイシューから参照
ユーザーをブロックする