11 #ifndef _ASM_UNIT_TIMEX_H
12 #define _ASM_UNIT_TIMEX_H
14 #include <asm/timer-regs.h>
15 #include <unit/clock.h>
16 #include <asm/param.h>
22 #define TMJCBR_MAX 0xffffff
23 #define TMJCIRQ TMTIRQ
27 #define MN10300_SRC_IOBCLK MN10300_IOBCLK
30 # error HZ undeclared.
33 #define MN10300_JCCLK (MN10300_SRC_IOBCLK)
34 #define MN10300_TSCCLK (MN10300_SRC_IOBCLK)
36 #define MN10300_JC_PER_HZ ((MN10300_JCCLK + HZ / 2) / HZ)
37 #define MN10300_TSC_PER_HZ ((MN10300_TSCCLK + HZ / 2) / HZ)
40 #if (MN10300_JC_PER_HZ - 1) > TMJCBR_MAX
41 # error MTM tick timer interval value is overflow.
44 static inline void stop_jiffies_counter(
void)
51 static inline void reload_jiffies_counter(
u32 cnt)
63 #if defined(CONFIG_SMP) && defined(CONFIG_GENERIC_CLOCKEVENTS) && \
64 !defined(CONFIG_GENERIC_CLOCKEVENTS_BROADCAST)
72 #define TMJC1IRQ TM5IRQ
90 TM4MD = TM4MD_INIT_COUNTER;
93 TM5MD = TM5MD_SRC_TM4CASCADE | TM5MD_INIT_COUNTER;
94 TM5MD = TM5MD_SRC_TM4CASCADE | TM5MD_COUNT_ENABLE;
97 TM4MD = TM4MD_COUNT_ENABLE;
108 #define TMTSCBR_MAX 0xffffffff
113 #define TMTSCMD TMSMD
114 #define TMTSCBR TMSBR
115 #define TMTSCBC TMSBC
116 #define TMTSCICR TMSICR
118 static inline void startup_timestamp_counter(
void)
137 static inline void shutdown_timestamp_counter(
void)
148 static inline cycles_t read_timestamp_counter(
void)