q40ints.c (2850bc273776cbb1b510c5828e9e456dffb50a32) | q40ints.c (40220c1a192f51695f806d75b1f9970f0f17a6e8) |
---|---|
1/* 2 * arch/m68k/q40/q40ints.c 3 * 4 * Copyright (C) 1999,2001 Richard Zidlicky 5 * 6 * This file is subject to the terms and conditions of the GNU General Public 7 * License. See the file COPYING in the main directory of this archive 8 * for more details. --- 111 unchanged lines hidden (view full) --- 120 return; 121 } 122 /* sound itself is done in q40_timer_int */ 123 if (sound_ticks == 0) 124 sound_ticks = 1000; /* pretty long beep */ 125 sound_ticks = ticks << 1; 126} 127 | 1/* 2 * arch/m68k/q40/q40ints.c 3 * 4 * Copyright (C) 1999,2001 Richard Zidlicky 5 * 6 * This file is subject to the terms and conditions of the GNU General Public 7 * License. See the file COPYING in the main directory of this archive 8 * for more details. --- 111 unchanged lines hidden (view full) --- 120 return; 121 } 122 /* sound itself is done in q40_timer_int */ 123 if (sound_ticks == 0) 124 sound_ticks = 1000; /* pretty long beep */ 125 sound_ticks = ticks << 1; 126} 127 |
128static irqreturn_t (*q40_timer_routine)(int, void *); | 128static irq_handler_t q40_timer_routine; |
129 130static irqreturn_t q40_timer_int (int irq, void * dev) 131{ 132 ql_ticks = ql_ticks ? 0 : 1; 133 if (sound_ticks) { 134 unsigned char sval=(sound_ticks & 1) ? 128-SVOL : 128+SVOL; 135 sound_ticks--; 136 *DAC_LEFT=sval; 137 *DAC_RIGHT=sval; 138 } 139 140 if (!ql_ticks) 141 q40_timer_routine(irq, dev); 142 return IRQ_HANDLED; 143} 144 | 129 130static irqreturn_t q40_timer_int (int irq, void * dev) 131{ 132 ql_ticks = ql_ticks ? 0 : 1; 133 if (sound_ticks) { 134 unsigned char sval=(sound_ticks & 1) ? 128-SVOL : 128+SVOL; 135 sound_ticks--; 136 *DAC_LEFT=sval; 137 *DAC_RIGHT=sval; 138 } 139 140 if (!ql_ticks) 141 q40_timer_routine(irq, dev); 142 return IRQ_HANDLED; 143} 144 |
145void q40_sched_init (irqreturn_t (*timer_routine)(int, void *)) | 145void q40_sched_init (irq_handler_t timer_routine) |
146{ 147 int timer_irq; 148 149 q40_timer_routine = timer_routine; 150 timer_irq = Q40_IRQ_FRAME; 151 152 if (request_irq(timer_irq, q40_timer_int, 0, 153 "timer", q40_timer_int)) --- 178 unchanged lines hidden --- | 146{ 147 int timer_irq; 148 149 q40_timer_routine = timer_routine; 150 timer_irq = Q40_IRQ_FRAME; 151 152 if (request_irq(timer_irq, q40_timer_int, 0, 153 "timer", q40_timer_int)) --- 178 unchanged lines hidden --- |