diff options
Diffstat (limited to 'include/asm-arm/arch-at91/io.h')
-rw-r--r-- | include/asm-arm/arch-at91/io.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/asm-arm/arch-at91/io.h b/include/asm-arm/arch-at91/io.h index 401f327ec047..80073fd36b8e 100644 --- a/include/asm-arm/arch-at91/io.h +++ b/include/asm-arm/arch-at91/io.h | |||
@@ -29,4 +29,22 @@ | |||
29 | #define __mem_pci(a) (a) | 29 | #define __mem_pci(a) (a) |
30 | 30 | ||
31 | 31 | ||
32 | #ifndef __ASSEMBLY__ | ||
33 | |||
34 | static inline unsigned int at91_sys_read(unsigned int reg_offset) | ||
35 | { | ||
36 | void __iomem *addr = (void __iomem *)AT91_VA_BASE_SYS; | ||
37 | |||
38 | return __raw_readl(addr + reg_offset); | ||
39 | } | ||
40 | |||
41 | static inline void at91_sys_write(unsigned int reg_offset, unsigned long value) | ||
42 | { | ||
43 | void __iomem *addr = (void __iomem *)AT91_VA_BASE_SYS; | ||
44 | |||
45 | __raw_writel(value, addr + reg_offset); | ||
46 | } | ||
47 | |||
48 | #endif | ||
49 | |||
32 | #endif | 50 | #endif |