Commit 7e6a3d402c97c95ca1f8dc84ad5b69f3118cd2b5

Authored by Greg Ungerer
Committed by Linus Torvalds
1 parent 846757162d

m68knommu: cleanup 68360 startup code

Clean up 68360 timer support code. Removed header includes not needed.
Remove use of old m68knommu timer function pointers. Use common function
naming for 68328 timer functions.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Showing 1 changed file with 16 additions and 35 deletions Side-by-side Diff

arch/m68knommu/platform/68360/config.c
... ... @@ -14,8 +14,6 @@
14 14 #include <linux/types.h>
15 15 #include <linux/kernel.h>
16 16 #include <linux/mm.h>
17   -#include <linux/tty.h>
18   -#include <linux/console.h>
19 17 #include <linux/interrupt.h>
20 18 #include <linux/irq.h>
21 19  
... ... @@ -40,8 +38,6 @@
40 38  
41 39 unsigned long int system_clock;
42 40  
43   -void M68360_init_IRQ(void);
44   -
45 41 extern QUICC *pquicc;
46 42  
47 43 /* TODO DON"T Hard Code this */
48 44  
49 45  
50 46  
... ... @@ -49,14 +45,24 @@
49 45 // unsigned int system_clock = 33000000l;
50 46 extern unsigned long int system_clock; //In kernel setup.c
51 47  
52   -extern void config_M68360_irq(void);
53 48  
  49 +static irqreturn_t hw_tick(int irq, void *dummy)
  50 +{
  51 + /* Reset Timer1 */
  52 + /* TSTAT &= 0; */
  53 +
  54 + pquicc->timer_ter1 = 0x0002; /* clear timer event */
  55 +
  56 + return arch_timer_interrupt(irq, dummy);
  57 +}
  58 +
54 59 static struct irqaction m68360_timer_irq = {
55   - .name = "timer",
56   - .flags = IRQF_DISABLED | IRQF_TIMER,
  60 + .name = "timer",
  61 + .flags = IRQF_DISABLED | IRQF_TIMER,
  62 + .handler = hw_tick,
57 63 };
58 64  
59   -void BSP_sched_init(irq_handler_t timer_routine)
  65 +void hw_timer_init(void)
60 66 {
61 67 unsigned char prescaler;
62 68 unsigned short tgcr_save;
... ... @@ -90,7 +96,6 @@
90 96 pquicc->timer_ter1 = 0x0003; /* clear timer events */
91 97  
92 98 /* enable timer 1 interrupt in CIMR */
93   - m68360_timer_irq.handler = timer_routine;
94 99 setup_irq(CPMVEC_TIMER1, &m68360_timer_irq);
95 100  
96 101 /* Start timer 1: */
97 102  
... ... @@ -98,17 +103,8 @@
98 103 pquicc->timer_tgcr = tgcr_save;
99 104 }
100 105  
101   -
102   -void BSP_tick(void)
  106 +unsigned long hw_timer_offset(void)
103 107 {
104   - /* Reset Timer1 */
105   - /* TSTAT &= 0; */
106   -
107   - pquicc->timer_ter1 = 0x0002; /* clear timer event */
108   -}
109   -
110   -unsigned long BSP_gettimeoffset (void)
111   -{
112 108 return 0;
113 109 }
114 110  
115 111  
... ... @@ -117,18 +113,8 @@
117 113 {
118 114 }
119 115  
120   -int BSP_hwclk(int op, struct rtc_time *t)
  116 +int BSP_set_clock_mmss(unsigned long nowtime)
121 117 {
122   - if (!op) {
123   - /* read */
124   - } else {
125   - /* write */
126   - }
127   - return 0;
128   -}
129   -
130   -int BSP_set_clock_mmss (unsigned long nowtime)
131   -{
132 118 #if 0
133 119 short real_seconds = nowtime % 60, real_minutes = (nowtime / 60) % 60;
134 120  
135 121  
... ... @@ -200,12 +186,7 @@
200 186 scc1_hwaddr = "\00\01\02\03\04\05";
201 187 #endif
202 188  
203   - mach_sched_init = BSP_sched_init;
204   - mach_tick = BSP_tick;
205   - mach_gettimeoffset = BSP_gettimeoffset;
206 189 mach_gettod = BSP_gettod;
207   - mach_hwclk = NULL;
208   - mach_set_clock_mmss = NULL;
209 190 mach_reset = BSP_reset;
210 191 }