diff options
Diffstat (limited to 'arch/m68k/mac')
-rw-r--r-- | arch/m68k/mac/config.c | 4 | ||||
-rw-r--r-- | arch/m68k/mac/macboing.c | 4 | ||||
-rw-r--r-- | arch/m68k/mac/via.c | 16 |
3 files changed, 19 insertions, 5 deletions
diff --git a/arch/m68k/mac/config.c b/arch/m68k/mac/config.c index e324410ef239..c0033f885ed4 100644 --- a/arch/m68k/mac/config.c +++ b/arch/m68k/mac/config.c @@ -15,7 +15,6 @@ #include <linux/reboot.h> #include <linux/types.h> #include <linux/mm.h> -#include <linux/tty.h> #include <linux/console.h> #include <linux/interrupt.h> /* keyb */ @@ -23,7 +22,6 @@ #include <linux/delay.h> /* keyb */ #include <linux/init.h> -#include <linux/vt_kern.h> #include <linux/platform_device.h> #include <linux/ata_platform.h> #include <linux/adb.h> @@ -793,7 +791,7 @@ static void __init mac_identify(void) } macintosh_config = mac_data_table; - for (m = macintosh_config; m->ident != -1; m++) { + for (m = &mac_data_table[1]; m->ident != -1; m++) { if (m->ident == model) { macintosh_config = m; break; diff --git a/arch/m68k/mac/macboing.c b/arch/m68k/mac/macboing.c index faea2265a540..6312d5b600a5 100644 --- a/arch/m68k/mac/macboing.c +++ b/arch/m68k/mac/macboing.c @@ -183,7 +183,7 @@ void mac_mksound( unsigned int freq, unsigned int length ) local_irq_save(flags); - del_timer( &mac_sound_timer ); + timer_delete(&mac_sound_timer); for ( i = 0; i < 0x800; i++ ) mac_asc_regs[ i ] = 0; @@ -277,7 +277,7 @@ static void mac_quadra_ring_bell(struct timer_list *unused) local_irq_save(flags); - del_timer( &mac_sound_timer ); + timer_delete(&mac_sound_timer); if ( mac_bell_duration-- > 0 ) { diff --git a/arch/m68k/mac/via.c b/arch/m68k/mac/via.c index 01e6b0e37f8d..9cb813eda4fd 100644 --- a/arch/m68k/mac/via.c +++ b/arch/m68k/mac/via.c @@ -621,6 +621,22 @@ static u64 mac_read_clk(struct clocksource *cs) * These problems are avoided by ignoring the low byte. Clock accuracy * is 256 times worse (error can reach 0.327 ms) but CPU overhead is * reduced by avoiding slow VIA register accesses. + * + * The VIA timer counter observably decrements to 0xFFFF before the + * counter reload interrupt gets raised. That complicates things a bit. + * + * State | vT1CH | VIA_TIMER_1_INT | inference drawn + * ------+------------+-----------------+----------------------------- + * i | FE thru 00 | false | counter is decrementing + * ii | FF | false | counter wrapped + * iii | FF | true | wrapped, interrupt raised + * iv | FF | false | wrapped, interrupt handled + * v | FE thru 00 | true | wrapped, interrupt unhandled + * + * State iv is never observed because handling the interrupt involves + * a 6522 register access and every access consumes a "phi 2" clock + * cycle. So 0xFF implies either state ii or state iii, depending on + * the value of the VIA_TIMER_1_INT bit. */ local_irq_save(flags); |