Skip to contentSkip to conversation

ARM: riscpc: use iomd.h everywhere and remove redundant ioc.h header

PATCH New Ethan Nelson-Moore 1 participant 1 message May 10

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: riscpc: use iomd.h everywhere and remove redundant ioc.h header

The <asm/hardware/ioc.h> header contains a subset of the definitions of the <asm/hardware/iomd.h> header, just with different names. This is because the IOC chip (used in 26-bit Acorn computers) contains a subset of the functionality of the later IOMD chip used in the Risc PC. Linux formerly supported 26-bit Acorn computers, but that support was removed in commit 99eb8a550dbc ("Remove the arm26 port") because it had bitrotted to the extent that it did not even compile.

Adjust all references to ioc.h to use iomd.h and its constants and remove the redundant ioc.h header. Also correct formatting on affected lines and remove the now-unused IOC_BASE constant.

---
 MAINTAINERS                               |  1 -
 arch/arm/include/asm/hardware/ioc.h       | 69 -----------------------
 arch/arm/include/asm/hardware/iomd.h      |  2 +-
 arch/arm/mach-rpc/fiq.S                   |  4 +-
 arch/arm/mach-rpc/include/mach/hardware.h |  1 -
 arch/arm/mach-rpc/irq.c                   |  6 +-
 arch/arm/mach-rpc/time.c                  | 18 +++---
 drivers/i2c/busses/i2c-acorn.c            | 18 +++---
 8 files changed, 24 insertions(+), 95 deletions(-)
 delete mode 100644 arch/arm/include/asm/hardware/ioc.h
MAINTAINERS +0 -1
index b865ad67fda3..211cc683e25b 100644
@@ -3398,7 +3398,6 @@ M:	Russell King <[email protected]>
 L:	[email protected] (moderated for non-subscribers)
 S:	Maintained
 W:	http://www.armlinux.org.uk/
-F:	arch/arm/include/asm/hardware/ioc.h
 F:	arch/arm/include/asm/hardware/iomd.h
 F:	arch/arm/mach-rpc/
 F:	drivers/net/ethernet/8390/etherh.c
arch/arm/include/asm/hardware/ioc.h deleted +0 -69

69 lines not on this page · raw message

arch/arm/include/asm/hardware/iomd.h +1 -1
index 53006ba5350f..e3f130345ebc 100644
@@ -15,7 +15,7 @@
 
 /*
  * We use __raw_base variants here so that we give the compiler the
- * chance to keep IOC_BASE in a register.
+ * chance to keep IOMD_BASE in a register.
  */
 #define iomd_readb(off)		__raw_readb(IOMD_BASE + (off))
 #define iomd_readl(off)		__raw_readl(IOMD_BASE + (off))
arch/arm/mach-rpc/fiq.S +2 -2
index 087bdf4bc093..a600761c3dfd 100644
@@ -3,8 +3,8 @@
 #include <asm/assembler.h>
 #include <mach/hardware.h>
 
-	.equ	ioc_base_high, IOC_BASE & 0xff000000
-	.equ	ioc_base_low, IOC_BASE & 0x00ff0000
+	.equ	ioc_base_high, IOMD_BASE & 0xff000000
+	.equ	ioc_base_low, IOMD_BASE & 0x00ff0000
 
 	.text
 	.global	rpc_default_fiq_end
arch/arm/mach-rpc/include/mach/hardware.h +0 -1
index 6f197706f979..22d62a198559 100644
@@ -48,7 +48,6 @@
 #define ECARD_IOC4_BASE		(IO_BASE + 0x00270000)
 #define ECARD_IOC_BASE		(IO_BASE + 0x00240000)
 #define IOMD_BASE		(IO_BASE + 0x00200000)
-#define IOC_BASE		(IO_BASE + 0x00200000)
 #define ECARD_MEMC8_BASE	(IO_BASE + 0x0002b000)
 #define FLOPPYDMA_BASE		(IO_BASE + 0x0002a000)
 #define PCIO_BASE		(IO_BASE + 0x00010000)
arch/arm/mach-rpc/irq.c +3 -3
index dc29384b6ef8..e924c9b813ab 100644
@@ -77,19 +77,19 @@ static int iomd_get_irq_nr(void)
 	u8 reg;
 
 	/* get highest priority first */
-	reg = readb(IOC_BASE + IOMD_IRQREQB);
+	reg = readb(IOMD_BASE + IOMD_IRQREQB);
 	irq = irq_prio_h[reg];
 	if (irq)
 		return irq;
 
 	/* get DMA  */
-	reg = readb(IOC_BASE + IOMD_DMAREQ);
+	reg = readb(IOMD_BASE + IOMD_DMAREQ);
 	irq = irq_prio_d[reg];
 	if (irq)
 		return irq;
 
 	/* get low priority */
-	reg = readb(IOC_BASE + IOMD_IRQREQA);
+	reg = readb(IOMD_BASE + IOMD_IRQREQA);
 	irq = irq_prio_l[reg];
 	if (irq)
 		return irq;
arch/arm/mach-rpc/time.c +9 -9
index 9f8edcfe9357..ad93c4dfafcd 100644
@@ -17,7 +17,7 @@
 #include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/hardware/ioc.h>
+#include <asm/hardware/iomd.h>
 
 #include <asm/mach/time.h>
 
@@ -33,15 +33,15 @@ static u64 ioc_timer_read(struct clocksource *cs)
 	u32 ticks;
 
 	local_irq_save(flags);
-	ioc_writeb (0, IOC_T0LATCH);
+	iomd_writeb(0, IOMD_T0LATCH);
 	barrier ();
-	count1 = ioc_readb(IOC_T0CNTL) | (ioc_readb(IOC_T0CNTH) << 8);
+	count1 = iomd_readb(IOMD_T0CNTL) | (iomd_readb(IOMD_T0CNTH) << 8);
 	barrier ();
-	status = ioc_readb(IOC_IRQREQA);
+	status = iomd_readb(IOMD_IRQREQA);
 	barrier ();
-	ioc_writeb (0, IOC_T0LATCH);
+	iomd_writeb(0, IOMD_T0LATCH);
 	barrier ();
-	count2 = ioc_readb(IOC_T0CNTL) | (ioc_readb(IOC_T0CNTH) << 8);
+	count2 = iomd_readb(IOMD_T0CNTL) | (iomd_readb(IOMD_T0CNTH) << 8);
 	ticks = ioc_time + RPC_LATCH - count2;
 	local_irq_restore(flags);
 
@@ -72,9 +72,9 @@ static struct clocksource ioctime_clocksource = {
 
 void __init ioctime_init(void)
 {
-	ioc_writeb(RPC_LATCH & 255, IOC_T0LTCHL);
-	ioc_writeb(RPC_LATCH >> 8, IOC_T0LTCHH);
-	ioc_writeb(0, IOC_T0GO);
+	iomd_writeb(RPC_LATCH & 255, IOMD_T0LTCHL);
+	iomd_writeb(RPC_LATCH >> 8, IOMD_T0LTCHH);
+	iomd_writeb(0, IOMD_T0GO);
 }
 
 static irqreturn_t
drivers/i2c/busses/i2c-acorn.c +9 -9
index 34bbbb8c52f6..99b6b1c3fd9e 100644
@@ -13,23 +13,23 @@
 #include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/hardware/ioc.h>
+#include <asm/hardware/iomd.h>
 
 #define FORCE_ONES	0xdc
 #define SCL		0x02
 #define SDA		0x01
 
 /*
- * We must preserve all non-i2c output bits in IOC_CONTROL.
+ * We must preserve all non-i2c output bits in IOMD_CONTROL.
  * Note also that we need to preserve the value of SCL and
  * SDA outputs as well (which may be different from the
- * values read back from IOC_CONTROL).
+ * values read back from IOMD_CONTROL).
  */
 static u_int force_ones;
 
 static void ioc_setscl(void *data, int state)
 {
-	u_int ioc_control = ioc_readb(IOC_CONTROL) & ~(SCL | SDA);
+	u_int iomd_control = iomd_readb(IOMD_CONTROL) & ~(SCL | SDA);
 	u_int ones = force_ones;
 
 	if (state)
@@ -39,12 +39,12 @@ static void ioc_setscl(void *data, int state)
 
 	force_ones = ones;
 
- 	ioc_writeb(ioc_control | ones, IOC_CONTROL);
+	iomd_writeb(iomd_control | ones, IOMD_CONTROL);
 }
 
 static void ioc_setsda(void *data, int state)
 {
-	u_int ioc_control = ioc_readb(IOC_CONTROL) & ~(SCL | SDA);
+	u_int iomd_control = iomd_readb(IOMD_CONTROL) & ~(SCL | SDA);
 	u_int ones = force_ones;
 
 	if (state)
@@ -54,17 +54,17 @@ static void ioc_setsda(void *data, int state)
 
 	force_ones = ones;
 
- 	ioc_writeb(ioc_control | ones, IOC_CONTROL);
+	iomd_writeb(iomd_control | ones, IOMD_CONTROL);
 }
 
 static int ioc_getscl(void *data)
 {
-	return (ioc_readb(IOC_CONTROL) & SCL) != 0;
+	return (iomd_readb(IOMD_CONTROL) & SCL) != 0;
 }
 
 static int ioc_getsda(void *data)
 {
-	return (ioc_readb(IOC_CONTROL) & SDA) != 0;
+	return (iomd_readb(IOMD_CONTROL) & SDA) != 0;
 }
 
 static struct i2c_algo_bit_data ioc_data = {
Signature · 1 line
2.43.0