Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Greg Ungerer and committed by
Linus Torvalds
7e6a3d40 84675716

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