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:
@@ -28,10 +28,10 @@ static void sh2__flush_wback_region(void *start, int size)
|
||||
unsigned long addr = CACHE_OC_ADDRESS_ARRAY | (v & 0x00000ff0);
|
||||
int way;
|
||||
for (way = 0; way < 4; way++) {
|
||||
unsigned long data = ctrl_inl(addr | (way << 12));
|
||||
unsigned long data = __raw_readl(addr | (way << 12));
|
||||
if ((data & CACHE_PHYSADDR_MASK) == (v & CACHE_PHYSADDR_MASK)) {
|
||||
data &= ~SH_CACHE_UPDATED;
|
||||
ctrl_outl(data, addr | (way << 12));
|
||||
__raw_writel(data, addr | (way << 12));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -47,7 +47,7 @@ static void sh2__flush_purge_region(void *start, int size)
|
||||
& ~(L1_CACHE_BYTES-1);
|
||||
|
||||
for (v = begin; v < end; v+=L1_CACHE_BYTES)
|
||||
ctrl_outl((v & CACHE_PHYSADDR_MASK),
|
||||
__raw_writel((v & CACHE_PHYSADDR_MASK),
|
||||
CACHE_OC_ADDRESS_ARRAY | (v & 0x00000ff0) | 0x00000008);
|
||||
}
|
||||
|
||||
@@ -63,9 +63,9 @@ static void sh2__flush_invalidate_region(void *start, int size)
|
||||
local_irq_save(flags);
|
||||
jump_to_uncached();
|
||||
|
||||
ccr = ctrl_inl(CCR);
|
||||
ccr = __raw_readl(CCR);
|
||||
ccr |= CCR_CACHE_INVALIDATE;
|
||||
ctrl_outl(ccr, CCR);
|
||||
__raw_writel(ccr, CCR);
|
||||
|
||||
back_to_cached();
|
||||
local_irq_restore(flags);
|
||||
@@ -78,7 +78,7 @@ static void sh2__flush_invalidate_region(void *start, int size)
|
||||
& ~(L1_CACHE_BYTES-1);
|
||||
|
||||
for (v = begin; v < end; v+=L1_CACHE_BYTES)
|
||||
ctrl_outl((v & CACHE_PHYSADDR_MASK),
|
||||
__raw_writel((v & CACHE_PHYSADDR_MASK),
|
||||
CACHE_OC_ADDRESS_ARRAY | (v & 0x00000ff0) | 0x00000008);
|
||||
#endif
|
||||
}
|
||||
|
Reference in New Issue
Block a user