diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-30 03:09:17 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-30 03:09:17 -0400 |
commit | f52b69f86e27903d6896ed5fa7cd280fec8de532 (patch) | |
tree | 0b213c61386153800afb459ca33e091bdec94570 /arch/sh/include/asm/io.h | |
parent | 2f7fa1be66dce77608330c5eb918d6360b5525f2 (diff) | |
parent | b7e68d6876dfbab087bc3859211a9efc74cbe30c (diff) |
Merge tag 'sh-for-linus' of git://github.com/pmundt/linux-sh
Pull SuperH updates from Paul Mundt.
* tag 'sh-for-linus' of git://github.com/pmundt/linux-sh: (25 commits)
sh: Support I/O space swapping where needed.
sh: use set_current_blocked() and block_sigmask()
sh: no need to reset handler if SA_ONESHOT
sh: intc: Fix up section mismatch for intc_ack_data
sh: select ARCH_DISCARD_MEMBLOCK.
sh: Consolidate duplicate _32/_64 unistd definitions.
sh: ecovec: switch SDHI controllers to card polling
sh: Avoid exporting unimplemented syscalls.
sh: add platform_device for RSPI in setup-sh7757
SH: pci-sh7780: enable big-endian operation.
serial: sh-sci: fix a race of DMA submit_tx on transfer
sh: dma: Collect up CHCR of SH7763, SH7764, SH7780 and SH7785
sh: dma: Collect up CHCR of SH7723 and SH7730
sh/next: Fix build fail by asm/system.h in asm/bitops.h
arch/sh/drivers/dma/{dma-g2,dmabrg}.c: ensure arguments to request_irq and free_irq are compatible
sh: cpufreq: Wire up scaling_available_freqs support.
sh: cpufreq: notify about rate rounding fallback.
sh: cpufreq: Support CPU clock frequency table.
sh: cpufreq: struct device lookup from CPU topology.
sh: cpufreq: percpu struct clk accounting.
...
Diffstat (limited to 'arch/sh/include/asm/io.h')
-rw-r--r-- | arch/sh/include/asm/io.h | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/arch/sh/include/asm/io.h b/arch/sh/include/asm/io.h index 35fc8b077cb1..ec464a6b95fe 100644 --- a/arch/sh/include/asm/io.h +++ b/arch/sh/include/asm/io.h | |||
@@ -23,6 +23,7 @@ | |||
23 | #define __IO_PREFIX generic | 23 | #define __IO_PREFIX generic |
24 | #include <asm/io_generic.h> | 24 | #include <asm/io_generic.h> |
25 | #include <asm/io_trapped.h> | 25 | #include <asm/io_trapped.h> |
26 | #include <mach/mangle-port.h> | ||
26 | 27 | ||
27 | #define __raw_writeb(v,a) (__chk_io_ptr(a), *(volatile u8 __force *)(a) = (v)) | 28 | #define __raw_writeb(v,a) (__chk_io_ptr(a), *(volatile u8 __force *)(a) = (v)) |
28 | #define __raw_writew(v,a) (__chk_io_ptr(a), *(volatile u16 __force *)(a) = (v)) | 29 | #define __raw_writew(v,a) (__chk_io_ptr(a), *(volatile u16 __force *)(a) = (v)) |
@@ -34,21 +35,15 @@ | |||
34 | #define __raw_readl(a) (__chk_io_ptr(a), *(volatile u32 __force *)(a)) | 35 | #define __raw_readl(a) (__chk_io_ptr(a), *(volatile u32 __force *)(a)) |
35 | #define __raw_readq(a) (__chk_io_ptr(a), *(volatile u64 __force *)(a)) | 36 | #define __raw_readq(a) (__chk_io_ptr(a), *(volatile u64 __force *)(a)) |
36 | 37 | ||
37 | #define readb_relaxed(c) ({ u8 __v = __raw_readb(c); __v; }) | 38 | #define readb_relaxed(c) ({ u8 __v = ioswabb(__raw_readb(c)); __v; }) |
38 | #define readw_relaxed(c) ({ u16 __v = le16_to_cpu((__force __le16) \ | 39 | #define readw_relaxed(c) ({ u16 __v = ioswabw(__raw_readw(c)); __v; }) |
39 | __raw_readw(c)); __v; }) | 40 | #define readl_relaxed(c) ({ u32 __v = ioswabl(__raw_readl(c)); __v; }) |
40 | #define readl_relaxed(c) ({ u32 __v = le32_to_cpu((__force __le32) \ | 41 | #define readq_relaxed(c) ({ u64 __v = ioswabq(__raw_readq(c)); __v; }) |
41 | __raw_readl(c)); __v; }) | 42 | |
42 | #define readq_relaxed(c) ({ u64 __v = le64_to_cpu((__force __le64) \ | 43 | #define writeb_relaxed(v,c) ((void)__raw_writeb((__force u8)ioswabb(v),c)) |
43 | __raw_readq(c)); __v; }) | 44 | #define writew_relaxed(v,c) ((void)__raw_writew((__force u16)ioswabw(v),c)) |
44 | 45 | #define writel_relaxed(v,c) ((void)__raw_writel((__force u32)ioswabl(v),c)) | |
45 | #define writeb_relaxed(v,c) ((void)__raw_writeb(v,c)) | 46 | #define writeq_relaxed(v,c) ((void)__raw_writeq((__force u64)ioswabq(v),c)) |
46 | #define writew_relaxed(v,c) ((void)__raw_writew((__force u16) \ | ||
47 | cpu_to_le16(v),c)) | ||
48 | #define writel_relaxed(v,c) ((void)__raw_writel((__force u32) \ | ||
49 | cpu_to_le32(v),c)) | ||
50 | #define writeq_relaxed(v,c) ((void)__raw_writeq((__force u64) \ | ||
51 | cpu_to_le64(v),c)) | ||
52 | 47 | ||
53 | #define readb(a) ({ u8 r_ = readb_relaxed(a); rmb(); r_; }) | 48 | #define readb(a) ({ u8 r_ = readb_relaxed(a); rmb(); r_; }) |
54 | #define readw(a) ({ u16 r_ = readw_relaxed(a); rmb(); r_; }) | 49 | #define readw(a) ({ u16 r_ = readw_relaxed(a); rmb(); r_; }) |