diff options
Diffstat (limited to 'arch/arm/mach-w90x900/time.c')
-rw-r--r-- | arch/arm/mach-w90x900/time.c | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/arch/arm/mach-w90x900/time.c b/arch/arm/mach-w90x900/time.c index 5e06770e6014..4128af870b41 100644 --- a/arch/arm/mach-w90x900/time.c +++ b/arch/arm/mach-w90x900/time.c | |||
@@ -44,7 +44,7 @@ | |||
44 | 44 | ||
45 | unsigned int timer0_load; | 45 | unsigned int timer0_load; |
46 | 46 | ||
47 | static void w90p910_clockevent_setmode(enum clock_event_mode mode, | 47 | static void nuc900_clockevent_setmode(enum clock_event_mode mode, |
48 | struct clock_event_device *clk) | 48 | struct clock_event_device *clk) |
49 | { | 49 | { |
50 | unsigned int val; | 50 | unsigned int val; |
@@ -71,7 +71,7 @@ static void w90p910_clockevent_setmode(enum clock_event_mode mode, | |||
71 | __raw_writel(val, REG_TCSR0); | 71 | __raw_writel(val, REG_TCSR0); |
72 | } | 72 | } |
73 | 73 | ||
74 | static int w90p910_clockevent_setnextevent(unsigned long evt, | 74 | static int nuc900_clockevent_setnextevent(unsigned long evt, |
75 | struct clock_event_device *clk) | 75 | struct clock_event_device *clk) |
76 | { | 76 | { |
77 | unsigned int val; | 77 | unsigned int val; |
@@ -85,20 +85,20 @@ static int w90p910_clockevent_setnextevent(unsigned long evt, | |||
85 | return 0; | 85 | return 0; |
86 | } | 86 | } |
87 | 87 | ||
88 | static struct clock_event_device w90p910_clockevent_device = { | 88 | static struct clock_event_device nuc900_clockevent_device = { |
89 | .name = "w90p910-timer0", | 89 | .name = "nuc900-timer0", |
90 | .shift = 32, | 90 | .shift = 32, |
91 | .features = CLOCK_EVT_MODE_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, | 91 | .features = CLOCK_EVT_MODE_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, |
92 | .set_mode = w90p910_clockevent_setmode, | 92 | .set_mode = nuc900_clockevent_setmode, |
93 | .set_next_event = w90p910_clockevent_setnextevent, | 93 | .set_next_event = nuc900_clockevent_setnextevent, |
94 | .rating = 300, | 94 | .rating = 300, |
95 | }; | 95 | }; |
96 | 96 | ||
97 | /*IRQ handler for the timer*/ | 97 | /*IRQ handler for the timer*/ |
98 | 98 | ||
99 | static irqreturn_t w90p910_timer0_interrupt(int irq, void *dev_id) | 99 | static irqreturn_t nuc900_timer0_interrupt(int irq, void *dev_id) |
100 | { | 100 | { |
101 | struct clock_event_device *evt = &w90p910_clockevent_device; | 101 | struct clock_event_device *evt = &nuc900_clockevent_device; |
102 | 102 | ||
103 | __raw_writel(0x01, REG_TISR); /* clear TIF0 */ | 103 | __raw_writel(0x01, REG_TISR); /* clear TIF0 */ |
104 | 104 | ||
@@ -106,40 +106,40 @@ static irqreturn_t w90p910_timer0_interrupt(int irq, void *dev_id) | |||
106 | return IRQ_HANDLED; | 106 | return IRQ_HANDLED; |
107 | } | 107 | } |
108 | 108 | ||
109 | static struct irqaction w90p910_timer0_irq = { | 109 | static struct irqaction nuc900_timer0_irq = { |
110 | .name = "w90p910-timer0", | 110 | .name = "nuc900-timer0", |
111 | .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, | 111 | .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, |
112 | .handler = w90p910_timer0_interrupt, | 112 | .handler = nuc900_timer0_interrupt, |
113 | }; | 113 | }; |
114 | 114 | ||
115 | static void __init w90p910_clockevents_init(unsigned int rate) | 115 | static void __init nuc900_clockevents_init(unsigned int rate) |
116 | { | 116 | { |
117 | w90p910_clockevent_device.mult = div_sc(rate, NSEC_PER_SEC, | 117 | nuc900_clockevent_device.mult = div_sc(rate, NSEC_PER_SEC, |
118 | w90p910_clockevent_device.shift); | 118 | nuc900_clockevent_device.shift); |
119 | w90p910_clockevent_device.max_delta_ns = clockevent_delta2ns(0xffffffff, | 119 | nuc900_clockevent_device.max_delta_ns = clockevent_delta2ns(0xffffffff, |
120 | &w90p910_clockevent_device); | 120 | &nuc900_clockevent_device); |
121 | w90p910_clockevent_device.min_delta_ns = clockevent_delta2ns(0xf, | 121 | nuc900_clockevent_device.min_delta_ns = clockevent_delta2ns(0xf, |
122 | &w90p910_clockevent_device); | 122 | &nuc900_clockevent_device); |
123 | w90p910_clockevent_device.cpumask = cpumask_of(0); | 123 | nuc900_clockevent_device.cpumask = cpumask_of(0); |
124 | 124 | ||
125 | clockevents_register_device(&w90p910_clockevent_device); | 125 | clockevents_register_device(&nuc900_clockevent_device); |
126 | } | 126 | } |
127 | 127 | ||
128 | static cycle_t w90p910_get_cycles(struct clocksource *cs) | 128 | static cycle_t nuc900_get_cycles(struct clocksource *cs) |
129 | { | 129 | { |
130 | return ~__raw_readl(REG_TDR1); | 130 | return ~__raw_readl(REG_TDR1); |
131 | } | 131 | } |
132 | 132 | ||
133 | static struct clocksource clocksource_w90p910 = { | 133 | static struct clocksource clocksource_nuc900 = { |
134 | .name = "w90p910-timer1", | 134 | .name = "nuc900-timer1", |
135 | .rating = 200, | 135 | .rating = 200, |
136 | .read = w90p910_get_cycles, | 136 | .read = nuc900_get_cycles, |
137 | .mask = CLOCKSOURCE_MASK(32), | 137 | .mask = CLOCKSOURCE_MASK(32), |
138 | .shift = 20, | 138 | .shift = 20, |
139 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | 139 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, |
140 | }; | 140 | }; |
141 | 141 | ||
142 | static void __init w90p910_clocksource_init(unsigned int rate) | 142 | static void __init nuc900_clocksource_init(unsigned int rate) |
143 | { | 143 | { |
144 | unsigned int val; | 144 | unsigned int val; |
145 | 145 | ||
@@ -149,12 +149,12 @@ static void __init w90p910_clocksource_init(unsigned int rate) | |||
149 | val |= (COUNTEN | PERIOD); | 149 | val |= (COUNTEN | PERIOD); |
150 | __raw_writel(val, REG_TCSR1); | 150 | __raw_writel(val, REG_TCSR1); |
151 | 151 | ||
152 | clocksource_w90p910.mult = | 152 | clocksource_nuc900.mult = |
153 | clocksource_khz2mult((rate / 1000), clocksource_w90p910.shift); | 153 | clocksource_khz2mult((rate / 1000), clocksource_nuc900.shift); |
154 | clocksource_register(&clocksource_w90p910); | 154 | clocksource_register(&clocksource_nuc900); |
155 | } | 155 | } |
156 | 156 | ||
157 | static void __init w90p910_timer_init(void) | 157 | static void __init nuc900_timer_init(void) |
158 | { | 158 | { |
159 | struct clk *ck_ext = clk_get(NULL, "ext"); | 159 | struct clk *ck_ext = clk_get(NULL, "ext"); |
160 | unsigned int rate; | 160 | unsigned int rate; |
@@ -171,12 +171,12 @@ static void __init w90p910_timer_init(void) | |||
171 | __raw_writel(RESETINT, REG_TISR); | 171 | __raw_writel(RESETINT, REG_TISR); |
172 | timer0_load = (rate / TICKS_PER_SEC); | 172 | timer0_load = (rate / TICKS_PER_SEC); |
173 | 173 | ||
174 | setup_irq(IRQ_TIMER0, &w90p910_timer0_irq); | 174 | setup_irq(IRQ_TIMER0, &nuc900_timer0_irq); |
175 | 175 | ||
176 | w90p910_clocksource_init(rate); | 176 | nuc900_clocksource_init(rate); |
177 | w90p910_clockevents_init(rate); | 177 | nuc900_clockevents_init(rate); |
178 | } | 178 | } |
179 | 179 | ||
180 | struct sys_timer w90x900_timer = { | 180 | struct sys_timer nuc900_timer = { |
181 | .init = w90p910_timer_init, | 181 | .init = nuc900_timer_init, |
182 | }; | 182 | }; |