Date: Mon, 22 Dec 1997 11:54:42 GMT From: Roman Hodek To: linux-m68k@lists.linux-m68k.org In-reply-to: (message from Andreas Schwab on 22 Dec 1997 10:26:52 +0100) Subject: Re: L68K: 2.1.72 patch, part 2 Sender: owner-linux-m68k@phil.uni-sb.de > Here is the promised second part of my path for 2.1.72. [...] Unfortunately, this patch gives rejects in atari/config.c and in atafb.c. The first rejected is due to that I moved atari_debug_init() into atari/debug.c. Andreas obviously hadn't applied that patch yet. The other reject is a bit strange: It seems that the 'ovsc_switchmode' variable is already gone in Andreas' tree, but it's still in in my current 2.1.72. Maybe I've forgotten to redo it in my cleanup-all-forgotten-stuff patch... (originally in: 2.1.64/roman-misc.diff). The patch below fixes these two things, and also removes the now (after roman-dynamic-heartbeat.diff) obsolete mach_heartbeat_irq variable. Roman ------------------------------------------------------------------------------ diff -u --recursive --exclude-from=diff-excludes --new-file linux-2.1.72.orig/arch/m68k/amiga/config.c linux-2.1.72/arch/m68k/amiga/config.c --- linux-2.1.72.orig/arch/m68k/amiga/config.c Thu Dec 18 16:22:49 1997 +++ linux-2.1.72/arch/m68k/amiga/config.c Mon Dec 22 12:37:57 1997 @@ -384,7 +384,6 @@ #endif #ifdef CONFIG_HEARTBEAT mach_heartbeat = amiga_heartbeat; - mach_heartbeat_irq = SYS_IRQS + IRQ_AMIGA_CIAB_TA; #endif /* Fill in the clock values (based on the 700 kHz E-Clock) */ diff -u --recursive --exclude-from=diff-excludes --new-file linux-2.1.72.orig/arch/m68k/atari/config.c linux-2.1.72/arch/m68k/atari/config.c --- linux-2.1.72.orig/arch/m68k/atari/config.c Mon Dec 22 11:41:02 1997 +++ linux-2.1.72/arch/m68k/atari/config.c Mon Dec 22 12:37:50 1997 @@ -325,7 +325,6 @@ #endif #ifdef CONFIG_HEARTBEAT mach_heartbeat = atari_heartbeat; - mach_heartbeat_irq = IRQ_MFP_TIMC; #endif /* Set switches as requested by the user */ diff -u --recursive --exclude-from=diff-excludes --new-file linux-2.1.72.orig/arch/m68k/atari/debug.c linux-2.1.72/arch/m68k/atari/debug.c --- linux-2.1.72.orig/arch/m68k/atari/debug.c Thu Dec 18 16:05:32 1997 +++ linux-2.1.72/arch/m68k/atari/debug.c Mon Dec 22 12:37:17 1997 @@ -333,7 +333,7 @@ } else if (!strcmp( m68k_debug_device, "midi" )) { /* MIDI port */ - atari_init_scc_port( B9600|CS8 ); + atari_init_midi_port( B9600|CS8 ); atari_console_driver.write = atari_midi_console_write; } else if (!strcmp( m68k_debug_device, "par" )) { diff -u --recursive --exclude-from=diff-excludes --new-file linux-2.1.72.orig/arch/m68k/kernel/setup.c linux-2.1.72/arch/m68k/kernel/setup.c --- linux-2.1.72.orig/arch/m68k/kernel/setup.c Thu Dec 18 13:23:33 1997 +++ linux-2.1.72/arch/m68k/kernel/setup.c Mon Dec 22 12:38:16 1997 @@ -81,7 +81,6 @@ #endif #ifdef CONFIG_HEARTBEAT void (*mach_heartbeat) (int) = NULL; -int mach_heartbeat_irq; #endif extern void base_trap_init(void); diff -u --recursive --exclude-from=diff-excludes --new-file linux-2.1.72.orig/arch/m68k/kernel/time.c linux-2.1.72/arch/m68k/kernel/time.c --- linux-2.1.72.orig/arch/m68k/kernel/time.c Mon Dec 22 11:40:48 1997 +++ linux-2.1.72/arch/m68k/kernel/time.c Mon Dec 22 12:37:33 1997 @@ -17,10 +17,6 @@ #include #include -#ifdef CONFIG_HEARTBEAT -#include -#endif - #include diff -u --recursive --exclude-from=diff-excludes --new-file linux-2.1.72.orig/drivers/video/atafb.c linux-2.1.72/drivers/video/atafb.c --- linux-2.1.72.orig/drivers/video/atafb.c Mon Dec 22 11:41:03 1997 +++ linux-2.1.72/drivers/video/atafb.c Mon Dec 22 12:36:57 1997 @@ -93,7 +93,6 @@ static int sttt_xres=640,st_yres=400,tt_yres=480; static int sttt_xres_virtual=640,sttt_yres_virtual=400; static int ovsc_offset=0, ovsc_addlen=0; -int ovsc_switchmode=0; static struct atafb_par { unsigned long screen_base; @@ -2004,12 +2003,12 @@ #define SYNC_DELAY (mono_moni ? 1500 : 2000) /* SWITCH_ACIA may be used for Falcon (ScreenBlaster III internal!) */ -static void st_ovsc_switch(int switchmode) +static void st_ovsc_switch(void) { unsigned long flags; register unsigned char old, new; - if ((switchmode & (SWITCH_ACIA | SWITCH_SND6 | SWITCH_SND7)) == 0) + if (!(atari_switches & ATARI_SWITCH_OVSC_MASK)) return; save_flags(flags); cli(); @@ -2030,11 +2029,15 @@ mfp.tim_ct_b = 0x10; udelay(SYNC_DELAY); - if (switchmode == SWITCH_ACIA) - acia.key_ctrl = (ACIA_DIV64|ACIA_D8N1S|ACIA_RHTID|ACIA_RIE); - else { + if (atari_switches & ATARI_SWITCH_OVSC_IKBD) + acia.key_ctrl = ACIA_DIV64 | ACIA_D8N1S | ACIA_RHTID | ACIA_RIE; + if (atari_switches & ATARI_SWITCH_OVSC_MIDI) + acia.mid_ctrl = ACIA_DIV16 | ACIA_D8N1S | ACIA_RHTID; + if (atari_switches & (ATARI_SWITCH_OVSC_SND6|ATARI_SWITCH_OVSC_SND7)) { sound_ym.rd_data_reg_sel = 14; - sound_ym.wd_data = sound_ym.rd_data_reg_sel | switchmode; + sound_ym.wd_data = sound_ym.rd_data_reg_sel | + ((atari_switches&ATARI_SWITCH_OVSC_SND6) ? 0x40:0) | + ((atari_switches&ATARI_SWITCH_OVSC_SND7) ? 0x80:0); } restore_flags(flags); } @@ -2715,7 +2718,7 @@ screen_base+=pad; real_screen_base=screen_base+ovsc_offset; screen_len = (mem_req - pad - ovsc_offset) & PAGE_MASK; - st_ovsc_switch(ovsc_switchmode); + st_ovsc_switch(); if (CPU_IS_040_OR_060) { /* On a '040+, the cache mode of video RAM must be set to * write-through also for internal video hardware! */ @@ -2830,15 +2833,6 @@ if (hwscroll > 200) hwscroll = 200; } - else if (! strncmp(this_opt, "sw_",3)) { - if (! strcmp(this_opt+3, "acia")) - ovsc_switchmode = SWITCH_ACIA; - else if (! strcmp(this_opt+3, "snd6")) - ovsc_switchmode = SWITCH_SND6; - else if (! strcmp(this_opt+3, "snd7")) - ovsc_switchmode = SWITCH_SND7; - else ovsc_switchmode = SWITCH_NONE; - } #ifdef ATAFB_EXT else if (!strcmp(this_opt,"mv300")) { external_bitspercol = 8; @@ -2867,12 +2861,8 @@ if (*int_str) { /* Format to config extended internal video hardware like OverScan: - ",internal:;;;;" + "internal:;;;;" Explanation: - type to switch on higher resolution - sw_acia : via keyboard ACIA - sw_snd6 : via bit 6 of the soundchip port - sw_snd7 : via bit 7 of the soundchip port : x-resolution : y-resolution The following are only needed if you have an overscan which @@ -2902,9 +2892,9 @@ if (ovsc_offset || (sttt_yres_virtual != st_yres)) use_hwscroll=0; + int_invalid: + ; } - else - int_invalid: ovsc_switchmode = SWITCH_NONE; #ifdef ATAFB_EXT if (*ext_str) { diff -u --recursive --exclude-from=diff-excludes --new-file linux-2.1.72.orig/include/asm-m68k/machdep.h linux-2.1.72/include/asm-m68k/machdep.h --- linux-2.1.72.orig/include/asm-m68k/machdep.h Thu Dec 18 13:23:20 1997 +++ linux-2.1.72/include/asm-m68k/machdep.h Mon Dec 22 12:38:08 1997 @@ -36,7 +36,6 @@ extern void (*mach_floppy_setup)(char *, int *); extern void (*mach_floppy_eject)(void); extern void (*mach_heartbeat) (int); -extern int mach_heartbeat_irq; extern int mach_sysrq_key; extern int mach_sysrq_shift_state; extern int mach_sysrq_shift_mask;