switch to 2.6.38
[openwrt/staging/chunkeey.git] / target / linux / coldfire / patches / 022-Redefine-I-O-read-and-write-functions.patch
1 From f8dab3ef2c0da1c50dee07142c0b8088da61bc82 Mon Sep 17 00:00:00 2001
2 From: Alison Wang <b18965@freescale.com>
3 Date: Thu, 4 Aug 2011 09:59:45 +0800
4 Subject: [PATCH 22/52] Redefine I/O read and write functions
5
6 Redefine readb(), writeb(), readw(), writew(), readl(), write()
7 functions.
8
9 Signed-off-by: Alison Wang <b18965@freescale.com>
10 ---
11 arch/m68k/include/asm/cf_io.h | 10 ++++++++++
12 1 files changed, 10 insertions(+), 0 deletions(-)
13
14 --- a/arch/m68k/include/asm/cf_io.h
15 +++ b/arch/m68k/include/asm/cf_io.h
16 @@ -20,6 +20,16 @@
17
18 #include <asm-generic/iomap.h>
19
20 +/*
21 + * These should be valid on any ioremap()ed region
22 + */
23 +#define readb(addr) in_8(addr)
24 +#define writeb(val, addr) out_8((addr), (val))
25 +#define readw(addr) in_le16(addr)
26 +#define writew(val, addr) out_le16((addr), (val))
27 +#define readl(addr) in_le32(addr)
28 +#define writel(val, addr) out_le32((addr), (val))
29 +
30 #define readb_relaxed(addr) readb(addr)
31 #define readw_relaxed(addr) readw(addr)
32 #define readl_relaxed(addr) readl(addr)