diff options
Diffstat (limited to 'include/asm-arm/hardware/iop3xx.h')
-rw-r--r-- | include/asm-arm/hardware/iop3xx.h | 55 |
1 files changed, 45 insertions, 10 deletions
diff --git a/include/asm-arm/hardware/iop3xx.h b/include/asm-arm/hardware/iop3xx.h index 47fcbf6f52d3..15141a9caca8 100644 --- a/include/asm-arm/hardware/iop3xx.h +++ b/include/asm-arm/hardware/iop3xx.h | |||
@@ -188,14 +188,10 @@ extern void gpio_line_set(int line, int value); | |||
188 | #define IOP3XX_TU_TRR1 (volatile u32 *)IOP3XX_TIMER_REG(0x0014) | 188 | #define IOP3XX_TU_TRR1 (volatile u32 *)IOP3XX_TIMER_REG(0x0014) |
189 | #define IOP3XX_TU_TISR (volatile u32 *)IOP3XX_TIMER_REG(0x0018) | 189 | #define IOP3XX_TU_TISR (volatile u32 *)IOP3XX_TIMER_REG(0x0018) |
190 | #define IOP3XX_TU_WDTCR (volatile u32 *)IOP3XX_TIMER_REG(0x001c) | 190 | #define IOP3XX_TU_WDTCR (volatile u32 *)IOP3XX_TIMER_REG(0x001c) |
191 | #define IOP3XX_TMR_TC 0x01 | 191 | #define IOP_TMR_EN 0x02 |
192 | #define IOP3XX_TMR_EN 0x02 | 192 | #define IOP_TMR_RELOAD 0x04 |
193 | #define IOP3XX_TMR_RELOAD 0x04 | 193 | #define IOP_TMR_PRIVILEGED 0x08 |
194 | #define IOP3XX_TMR_PRIVILEGED 0x09 | 194 | #define IOP_TMR_RATIO_1_1 0x00 |
195 | #define IOP3XX_TMR_RATIO_1_1 0x00 | ||
196 | #define IOP3XX_TMR_RATIO_4_1 0x10 | ||
197 | #define IOP3XX_TMR_RATIO_8_1 0x20 | ||
198 | #define IOP3XX_TMR_RATIO_16_1 0x30 | ||
199 | 195 | ||
200 | /* Application accelerator unit */ | 196 | /* Application accelerator unit */ |
201 | #define IOP3XX_AAU_ACR (volatile u32 *)IOP3XX_REG_ADDR(0x0800) | 197 | #define IOP3XX_AAU_ACR (volatile u32 *)IOP3XX_REG_ADDR(0x0800) |
@@ -276,9 +272,48 @@ extern void gpio_line_set(int line, int value); | |||
276 | 272 | ||
277 | #ifndef __ASSEMBLY__ | 273 | #ifndef __ASSEMBLY__ |
278 | void iop3xx_map_io(void); | 274 | void iop3xx_map_io(void); |
279 | void iop3xx_init_time(unsigned long); | ||
280 | unsigned long iop3xx_gettimeoffset(void); | ||
281 | void iop_init_cp6_handler(void); | 275 | void iop_init_cp6_handler(void); |
276 | void iop_init_time(unsigned long tickrate); | ||
277 | unsigned long iop_gettimeoffset(void); | ||
278 | |||
279 | static inline void write_tmr0(u32 val) | ||
280 | { | ||
281 | asm volatile("mcr p6, 0, %0, c0, c1, 0" : : "r" (val)); | ||
282 | } | ||
283 | |||
284 | static inline void write_tmr1(u32 val) | ||
285 | { | ||
286 | asm volatile("mcr p6, 0, %0, c1, c1, 0" : : "r" (val)); | ||
287 | } | ||
288 | |||
289 | static inline u32 read_tcr0(void) | ||
290 | { | ||
291 | u32 val; | ||
292 | asm volatile("mrc p6, 0, %0, c2, c1, 0" : "=r" (val)); | ||
293 | return val; | ||
294 | } | ||
295 | |||
296 | static inline u32 read_tcr1(void) | ||
297 | { | ||
298 | u32 val; | ||
299 | asm volatile("mrc p6, 0, %0, c3, c1, 0" : "=r" (val)); | ||
300 | return val; | ||
301 | } | ||
302 | |||
303 | static inline void write_trr0(u32 val) | ||
304 | { | ||
305 | asm volatile("mcr p6, 0, %0, c4, c1, 0" : : "r" (val)); | ||
306 | } | ||
307 | |||
308 | static inline void write_trr1(u32 val) | ||
309 | { | ||
310 | asm volatile("mcr p6, 0, %0, c5, c1, 0" : : "r" (val)); | ||
311 | } | ||
312 | |||
313 | static inline void write_tisr(u32 val) | ||
314 | { | ||
315 | asm volatile("mcr p6, 0, %0, c6, c1, 0" : : "r" (val)); | ||
316 | } | ||
282 | 317 | ||
283 | extern struct platform_device iop3xx_i2c0_device; | 318 | extern struct platform_device iop3xx_i2c0_device; |
284 | extern struct platform_device iop3xx_i2c1_device; | 319 | extern struct platform_device iop3xx_i2c1_device; |