diff options
author | Imre Kaloz <kaloz@openwrt.org> | 2008-01-27 21:21:03 +0000 |
---|---|---|
committer | Imre Kaloz <kaloz@openwrt.org> | 2008-01-27 21:21:03 +0000 |
commit | 2a1011628d9108f8118fdd379a90dd75998213ed (patch) | |
tree | 80d65d635be0c805dcfee2bbaf2c2fc3f2746558 /target/linux/generic-2.6/patches-2.6.23 | |
parent | 9d127a9846e26f2d6d0b289fcfd0395483aecaff (diff) | |
download | upstream-2a1011628d9108f8118fdd379a90dd75998213ed.tar.gz upstream-2a1011628d9108f8118fdd379a90dd75998213ed.tar.bz2 upstream-2a1011628d9108f8118fdd379a90dd75998213ed.zip |
add BE I/O memory accessors for arch/ppc
SVN-Revision: 10287
Diffstat (limited to 'target/linux/generic-2.6/patches-2.6.23')
-rw-r--r-- | target/linux/generic-2.6/patches-2.6.23/920-ppc_big_endian_io_memory_accessors.patch | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/target/linux/generic-2.6/patches-2.6.23/920-ppc_big_endian_io_memory_accessors.patch b/target/linux/generic-2.6/patches-2.6.23/920-ppc_big_endian_io_memory_accessors.patch new file mode 100644 index 0000000000..939e590a18 --- /dev/null +++ b/target/linux/generic-2.6/patches-2.6.23/920-ppc_big_endian_io_memory_accessors.patch @@ -0,0 +1,80 @@ +From a.othieno@bluewin.ch Tue Oct 11 07:50:21 2005 +From: Arthur Othieno <a.othieno@bluewin.ch> +Subject: Big-endian I/O memory accessors. +Date: Tue, 11 Oct 2005 07:50:21 +1000 +X-Patchwork-ID: 2759 + +From: Arthur Othieno <a.othieno@bluewin.ch> + +I/O memory accessors. Big endian version. For those busses/devices +that do export big-endian I/O memory. + +Of notable relevance/reference: + + http://lwn.net/Articles/132804/ + http://ozlabs.org/pipermail/linuxppc-embedded/2005-August/019798.html + http://ozlabs.org/pipermail/linuxppc-embedded/2005-August/019752.html + +Signed-off-by: Arthur Othieno <a.othieno@bluewin.ch> +--- + +Paulus, + +A similar patch for ppc64 made it upstream with your big ppc64 merge. +This one is still sitting in http://patchwork.ozlabs.org/linuxppc/ +and didn't make it with the ppc32 equivalent. Thanks. + + + include/asm-ppc/io.h | 20 ++++++++++++++++++++ + 1 file changed, 20 insertions(+) + + +--- +diff -uprN a/include/asm-ppc/io.h b/include/asm-ppc/io.h +--- a/include/asm-ppc/io.h 2005-08-21 17:49:44.000000000 -0400 ++++ b/include/asm-ppc/io.h 2005-08-21 20:29:55.000000000 -0400 +@@ -487,11 +487,21 @@ static inline unsigned int ioread16(void + return readw(addr); + } + ++static inline unsigned int ioread16be(void __iomem *addr) ++{ ++ return in_be16(addr); ++} ++ + static inline unsigned int ioread32(void __iomem *addr) + { + return readl(addr); + } + ++static inline unsigned int ioread32be(void __iomem *addr) ++{ ++ return in_be32(addr); ++} ++ + static inline void iowrite8(u8 val, void __iomem *addr) + { + writeb(val, addr); +@@ -502,11 +512,21 @@ static inline void iowrite16(u16 val, vo + writew(val, addr); + } + ++static inline void iowrite16be(u16 val, void __iomem *addr) ++{ ++ out_be16(addr, val); ++} ++ + static inline void iowrite32(u32 val, void __iomem *addr) + { + writel(val, addr); + } + ++static inline void iowrite32be(u32 val, void __iomem *addr) ++{ ++ out_be32(addr, val); ++} ++ + static inline void ioread8_rep(void __iomem *addr, void *dst, unsigned long count) + { + _insb(addr, dst, count); + |