Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 68237
b: refs/heads/master
c: da6b003
h: refs/heads/master
i:
  68235: da93895
v: v3
  • Loading branch information
Magnus Damm authored and Paul Mundt committed Sep 21, 2007
1 parent 43df396 commit e68e398
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9d4c82625914c31fd21e341765d476784cc74f14
refs/heads/master: da6b003adc73011fd441a89c30d4f896667e24ba
26 changes: 26 additions & 0 deletions trunk/include/asm-sh/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,32 @@ void __raw_readsl(unsigned long addr, void *data, int longlen);
# define writel(v,a) ({ __raw_writel((v),(a)); mb(); })
#endif

#define __BUILD_MEMORY_STRING(bwlq, type) \
\
static inline void writes##bwlq(volatile void __iomem *mem, \
const void *addr, unsigned int count) \
{ \
const volatile type *__addr = addr; \
\
while (count--) { \
__raw_write##bwlq(*__addr, mem); \
__addr++; \
} \
} \
\
static inline void reads##bwlq(volatile void __iomem *mem, void *addr, \
unsigned int count) \
{ \
volatile type *__addr = addr; \
\
while (count--) { \
*__addr = __raw_read##bwlq(mem); \
__addr++; \
} \
}

__BUILD_MEMORY_STRING(b, u8)
__BUILD_MEMORY_STRING(w, u16)
#define writesl __raw_writesl
#define readsl __raw_readsl

Expand Down

0 comments on commit e68e398

Please sign in to comment.