aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-arm/hardware
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2007-02-20 05:52:01 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2007-02-20 05:52:43 -0500
commite80a0e6e7ccdf64575d4384cb4172860422f5b81 (patch)
tree8960fa71eb73d0f1185e893192411cb873362738 /include/asm-arm/hardware
parent3b0eb4a195a124567cd0dd6f700f8388def542c6 (diff)
parent3668b45d46f777b0773ef5ff49531c1144efb6dd (diff)
[ARM] Merge remaining IOP code
Conflicts: include/asm-arm/arch-at91rm9200/entry-macro.S Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'include/asm-arm/hardware')
-rw-r--r--include/asm-arm/hardware/iop3xx.h72
1 files changed, 40 insertions, 32 deletions
diff --git a/include/asm-arm/hardware/iop3xx.h b/include/asm-arm/hardware/iop3xx.h
index c91b546e20ef..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,40 +272,52 @@ extern void gpio_line_set(int line, int value);
276 272
277#ifndef __ASSEMBLY__ 273#ifndef __ASSEMBLY__
278void iop3xx_map_io(void); 274void iop3xx_map_io(void);
279void iop3xx_init_time(unsigned long);
280unsigned long iop3xx_gettimeoffset(void);
281void iop_init_cp6_handler(void); 275void iop_init_cp6_handler(void);
276void iop_init_time(unsigned long tickrate);
277unsigned long iop_gettimeoffset(void);
282 278
283extern struct platform_device iop3xx_i2c0_device; 279static inline void write_tmr0(u32 val)
284extern struct platform_device iop3xx_i2c1_device; 280{
281 asm volatile("mcr p6, 0, %0, c0, c1, 0" : : "r" (val));
282}
283
284static inline void write_tmr1(u32 val)
285{
286 asm volatile("mcr p6, 0, %0, c1, c1, 0" : : "r" (val));
287}
288
289static 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}
285 295
286extern inline void iop3xx_cp6_enable(void) 296static inline u32 read_tcr1(void)
287{ 297{
288 u32 temp; 298 u32 val;
299 asm volatile("mrc p6, 0, %0, c3, c1, 0" : "=r" (val));
300 return val;
301}
289 302
290 asm volatile ( 303static inline void write_trr0(u32 val)
291 "mrc p15, 0, %0, c15, c1, 0\n\t" 304{
292 "orr %0, %0, #(1 << 6)\n\t" 305 asm volatile("mcr p6, 0, %0, c4, c1, 0" : : "r" (val));
293 "mcr p15, 0, %0, c15, c1, 0\n\t"
294 "mrc p15, 0, %0, c15, c1, 0\n\t"
295 "mov %0, %0\n\t"
296 "sub pc, pc, #4\n\t"
297 : "=r" (temp) );
298} 306}
299 307
300extern inline void iop3xx_cp6_disable(void) 308static inline void write_trr1(u32 val)
301{ 309{
302 u32 temp; 310 asm volatile("mcr p6, 0, %0, c5, c1, 0" : : "r" (val));
311}
303 312
304 asm volatile ( 313static inline void write_tisr(u32 val)
305 "mrc p15, 0, %0, c15, c1, 0\n\t" 314{
306 "bic %0, %0, #(1 << 6)\n\t" 315 asm volatile("mcr p6, 0, %0, c6, c1, 0" : : "r" (val));
307 "mcr p15, 0, %0, c15, c1, 0\n\t"
308 "mrc p15, 0, %0, c15, c1, 0\n\t"
309 "mov %0, %0\n\t"
310 "sub pc, pc, #4\n\t"
311 : "=r" (temp) );
312} 316}
317
318extern struct platform_device iop3xx_i2c0_device;
319extern struct platform_device iop3xx_i2c1_device;
320
313#endif 321#endif
314 322
315 323