aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-iop13xx/include/mach/time.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-iop13xx/include/mach/time.h')
-rw-r--r--arch/arm/mach-iop13xx/include/mach/time.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/arch/arm/mach-iop13xx/include/mach/time.h b/arch/arm/mach-iop13xx/include/mach/time.h
index d6d52527589d..f1c00d6d560b 100644
--- a/arch/arm/mach-iop13xx/include/mach/time.h
+++ b/arch/arm/mach-iop13xx/include/mach/time.h
@@ -20,7 +20,6 @@
20#define IOP13XX_CORE_FREQ_1200 (5 << 16) 20#define IOP13XX_CORE_FREQ_1200 (5 << 16)
21 21
22void iop_init_time(unsigned long tickrate); 22void iop_init_time(unsigned long tickrate);
23unsigned long iop_gettimeoffset(void);
24 23
25static inline unsigned long iop13xx_core_freq(void) 24static inline unsigned long iop13xx_core_freq(void)
26{ 25{
@@ -66,6 +65,13 @@ static inline unsigned long iop13xx_xsi_bus_ratio(void)
66 return 2; 65 return 2;
67} 66}
68 67
68static inline u32 read_tmr0(void)
69{
70 u32 val;
71 asm volatile("mrc p6, 0, %0, c0, c9, 0" : "=r" (val));
72 return val;
73}
74
69static inline void write_tmr0(u32 val) 75static inline void write_tmr0(u32 val)
70{ 76{
71 asm volatile("mcr p6, 0, %0, c0, c9, 0" : : "r" (val)); 77 asm volatile("mcr p6, 0, %0, c0, c9, 0" : : "r" (val));
@@ -83,6 +89,11 @@ static inline u32 read_tcr0(void)
83 return val; 89 return val;
84} 90}
85 91
92static inline void write_tcr0(u32 val)
93{
94 asm volatile("mcr p6, 0, %0, c2, c9, 0" : : "r" (val));
95}
96
86static inline u32 read_tcr1(void) 97static inline u32 read_tcr1(void)
87{ 98{
88 u32 val; 99 u32 val;
@@ -90,6 +101,11 @@ static inline u32 read_tcr1(void)
90 return val; 101 return val;
91} 102}
92 103
104static inline void write_tcr1(u32 val)
105{
106 asm volatile("mcr p6, 0, %0, c3, c9, 0" : : "r" (val));
107}
108
93static inline void write_trr0(u32 val) 109static inline void write_trr0(u32 val)
94{ 110{
95 asm volatile("mcr p6, 0, %0, c4, c9, 0" : : "r" (val)); 111 asm volatile("mcr p6, 0, %0, c4, c9, 0" : : "r" (val));