aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sh/io.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-sh/io.h')
-rw-r--r--include/asm-sh/io.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/asm-sh/io.h b/include/asm-sh/io.h
index 894e64b2d5f0..ed12d38e8c00 100644
--- a/include/asm-sh/io.h
+++ b/include/asm-sh/io.h
@@ -107,6 +107,9 @@
107#define __raw_writew(v, a) __writew(v, (void __iomem *)(a)) 107#define __raw_writew(v, a) __writew(v, (void __iomem *)(a))
108#define __raw_writel(v, a) __writel(v, (void __iomem *)(a)) 108#define __raw_writel(v, a) __writel(v, (void __iomem *)(a))
109 109
110void __raw_writesl(unsigned long addr, const void *data, int longlen);
111void __raw_readsl(unsigned long addr, void *data, int longlen);
112
110/* 113/*
111 * The platform header files may define some of these macros to use 114 * The platform header files may define some of these macros to use
112 * the inlined versions where appropriate. These macros may also be 115 * the inlined versions where appropriate. These macros may also be
@@ -132,6 +135,9 @@
132# define writel(v,a) ({ __raw_writel((v),(a)); mb(); }) 135# define writel(v,a) ({ __raw_writel((v),(a)); mb(); })
133#endif 136#endif
134 137
138#define writesl __raw_writesl
139#define readsl __raw_readsl
140
135#define readb_relaxed(a) readb(a) 141#define readb_relaxed(a) readb(a)
136#define readw_relaxed(a) readw(a) 142#define readw_relaxed(a) readw(a)
137#define readl_relaxed(a) readl(a) 143#define readl_relaxed(a) readl(a)
@@ -209,8 +215,14 @@ static inline void ctrl_outl(unsigned int b, unsigned long addr)
209 *(volatile unsigned long*)addr = b; 215 *(volatile unsigned long*)addr = b;
210} 216}
211 217
218static inline void ctrl_delay(void)
219{
220 ctrl_inw(P2SEG);
221}
222
212#define IO_SPACE_LIMIT 0xffffffff 223#define IO_SPACE_LIMIT 0xffffffff
213 224
225#ifdef CONFIG_MMU
214/* 226/*
215 * Change virtual addresses to physical addresses and vv. 227 * Change virtual addresses to physical addresses and vv.
216 * These are trivial on the 1:1 Linux/SuperH mapping 228 * These are trivial on the 1:1 Linux/SuperH mapping
@@ -224,6 +236,10 @@ static inline void *phys_to_virt(unsigned long address)
224{ 236{
225 return (void *)P1SEGADDR(address); 237 return (void *)P1SEGADDR(address);
226} 238}
239#else
240#define phys_to_virt(address) ((void *)(address))
241#define virt_to_phys(address) ((unsigned long)(address))
242#endif
227 243
228#define virt_to_bus virt_to_phys 244#define virt_to_bus virt_to_phys
229#define bus_to_virt phys_to_virt 245#define bus_to_virt phys_to_virt