From 204cb1ec9f2456725492d44d724d3c9d6ba865f1 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Mon, 9 Sep 2013 17:45:51 +0100 Subject: xen/arm: replace io{read,write}{l,b} with {read,write}{l,b} We appear to have invented the io versions ourselves for Xen on ARM, while x86 has the plain read/write. (and so does Linux FWIW) read/write are used in common driver code (specifically ns16550) so instead of keeping our own variant around lets replace it with the more standard ones. At the same time resync with Linux making the "based on" comment in both sets of io.h somewhat true (they don't look to have been very based on before...). Our io.h is now consistent with Linux v3.11. Note that iowrite and write take their arguments in the opposite order. Also make asm-arm/io.h useful and include it where necessary instead of picking up the include from mm.h. Remove the include from mm.h Signed-off-by: Ian Campbell Acked-by: Julien Grall --- xen/drivers/char/exynos4210-uart.c | 5 +++-- xen/drivers/char/omap-uart.c | 5 +++-- xen/drivers/char/pl011.c | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) (limited to 'xen/drivers') diff --git a/xen/drivers/char/exynos4210-uart.c b/xen/drivers/char/exynos4210-uart.c index b297ed4a83..0a2ac17037 100644 --- a/xen/drivers/char/exynos4210-uart.c +++ b/xen/drivers/char/exynos4210-uart.c @@ -27,6 +27,7 @@ #include #include #include +#include static struct exynos4210_uart { unsigned int baud, clock_hz, data_bits, parity, stop_bits; @@ -43,8 +44,8 @@ static struct exynos4210_uart { #define FORCED_CHECKED_AS_ONE (0x6) #define FORCED_CHECKED_AS_ZERO (0x7) -#define exynos4210_read(uart, off) ioreadl((uart)->regs + off) -#define exynos4210_write(uart, off, val) iowritel((uart->regs) + off, val) +#define exynos4210_read(uart, off) readl((uart)->regs + off) +#define exynos4210_write(uart, off, val) writel(val, (uart->regs) + off) static void exynos4210_uart_interrupt(int irq, void *data, struct cpu_user_regs *regs) { diff --git a/xen/drivers/char/omap-uart.c b/xen/drivers/char/omap-uart.c index ffa71db921..321e636e86 100644 --- a/xen/drivers/char/omap-uart.c +++ b/xen/drivers/char/omap-uart.c @@ -22,11 +22,12 @@ #include #include #include +#include #define REG_SHIFT 2 -#define omap_read(uart, off) ioreadl((uart)->regs + (off<regs + (off<regs + (off<regs + (off< #include #include +#include static struct pl011 { unsigned int baud, clock_hz, data_bits, parity, stop_bits; @@ -50,8 +51,8 @@ static struct pl011 { #define PARITY_MARK (PEN|SPS) #define PARITY_SPACE (PEN|EPS|SPS) -#define pl011_read(uart, off) ioreadl((uart)->regs + (off)) -#define pl011_write(uart, off,val) iowritel((uart)->regs + (off), (val)) +#define pl011_read(uart, off) readl((uart)->regs + (off)) +#define pl011_write(uart, off,val) writel((val), (uart)->regs + (off)) static void pl011_interrupt(int irq, void *data, struct cpu_user_regs *regs) { -- cgit v1.2.3