You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
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:
@@ -89,15 +89,15 @@ static int __init polaris_initialise(void)
|
||||
printk(KERN_INFO "Configuring Polaris external bus\n");
|
||||
|
||||
/* Configure area 5 with 2 wait states */
|
||||
wcr = ctrl_inw(WCR2);
|
||||
wcr = __raw_readw(WCR2);
|
||||
wcr &= (~AREA5_WAIT_CTRL);
|
||||
wcr |= (WAIT_STATES_10 << 10);
|
||||
ctrl_outw(wcr, WCR2);
|
||||
__raw_writew(wcr, WCR2);
|
||||
|
||||
/* Configure area 5 for 32-bit access */
|
||||
bcr_mask = ctrl_inw(BCR2);
|
||||
bcr_mask = __raw_readw(BCR2);
|
||||
bcr_mask |= 1 << 10;
|
||||
ctrl_outw(bcr_mask, BCR2);
|
||||
__raw_writew(bcr_mask, BCR2);
|
||||
|
||||
return platform_add_devices(polaris_devices,
|
||||
ARRAY_SIZE(polaris_devices));
|
||||
@@ -128,13 +128,13 @@ static struct ipr_desc ipr_irq_desc = {
|
||||
static void __init init_polaris_irq(void)
|
||||
{
|
||||
/* Disable all interrupts */
|
||||
ctrl_outw(0, BCR_ILCRA);
|
||||
ctrl_outw(0, BCR_ILCRB);
|
||||
ctrl_outw(0, BCR_ILCRC);
|
||||
ctrl_outw(0, BCR_ILCRD);
|
||||
ctrl_outw(0, BCR_ILCRE);
|
||||
ctrl_outw(0, BCR_ILCRF);
|
||||
ctrl_outw(0, BCR_ILCRG);
|
||||
__raw_writew(0, BCR_ILCRA);
|
||||
__raw_writew(0, BCR_ILCRB);
|
||||
__raw_writew(0, BCR_ILCRC);
|
||||
__raw_writew(0, BCR_ILCRD);
|
||||
__raw_writew(0, BCR_ILCRE);
|
||||
__raw_writew(0, BCR_ILCRF);
|
||||
__raw_writew(0, BCR_ILCRG);
|
||||
|
||||
register_ipr_controller(&ipr_irq_desc);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user