aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-arm/hardware
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2007-02-13 11:13:34 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2007-02-17 10:05:40 -0500
commit3668b45d46f777b0773ef5ff49531c1144efb6dd (patch)
treed9bb1a1ce8d0cce8bff99578fc0ba4bf8cdedd75 /include/asm-arm/hardware
parent4434c5c7fd61c6713de882a2272b66f32fe7cac3 (diff)
[ARM] 4187/1: iop: unify time implementation across iop32x, iop33x, and iop13xx
* architecture specific details are handled in asm/arch/time.h * ARCH_IOP13XX now selects PLAT_IOP * as suggested by Lennert use ifdef CONFIG_XSCALE to skip the cp_wait on XSC3 Signed-off-by: Dan Williams <dan.j.williams@intel.com> 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.h55
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__
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);
278
279static inline void write_tmr0(u32 val)
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}
295
296static 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
303static inline void write_trr0(u32 val)
304{
305 asm volatile("mcr p6, 0, %0, c4, c1, 0" : : "r" (val));
306}
307
308static inline void write_trr1(u32 val)
309{
310 asm volatile("mcr p6, 0, %0, c5, c1, 0" : : "r" (val));
311}
312
313static inline void write_tisr(u32 val)
314{
315 asm volatile("mcr p6, 0, %0, c6, c1, 0" : : "r" (val));
316}
282 317
283extern struct platform_device iop3xx_i2c0_device; 318extern struct platform_device iop3xx_i2c0_device;
284extern struct platform_device iop3xx_i2c1_device; 319extern struct platform_device iop3xx_i2c1_device;