From: gene Date: Mon, 14 Apr 1997 18:47:48 +0000 (+0000) Subject: Bring our incarnation of John Wittowski's direct adb driver into compatible X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=3591d1c7f3db37ea8f1f7eb154f9beaece2386bb;p=openbsd Bring our incarnation of John Wittowski's direct adb driver into compatible state with NetBSD's. The direct-to-ADB code is now enabled by default. Using 'options MRG_ADB' will cause the kernel to revert to the 'old standby' code. --- diff --git a/sys/arch/mac68k/conf/GENERIC b/sys/arch/mac68k/conf/GENERIC index df1b62b2aef..5fd7c2f64a4 100644 --- a/sys/arch/mac68k/conf/GENERIC +++ b/sys/arch/mac68k/conf/GENERIC @@ -1,4 +1,4 @@ -# $OpenBSD: GENERIC,v 1.19 1997/04/14 00:27:28 briggs Exp $ +# $OpenBSD: GENERIC,v 1.20 1997/04/14 18:47:48 gene Exp $ # $NetBSD: GENERIC,v 1.52 1997/01/13 23:34:07 scottr Exp $ # # GENERIC @@ -61,7 +61,7 @@ options COMPAT_SUNOS options ZS_CONSOLE_ABORT options DISABLE_EXT_CACHE # Don't use IIci external cache options DISABLE_ADB_WITH_SERIAL_CONSOLE -options HWDIRECT +#options MRG_ADB # Use ROM-based ADB driver config bsd swap generic options GENERIC diff --git a/sys/arch/mac68k/conf/GENERICSBC b/sys/arch/mac68k/conf/GENERICSBC index e42e528bb57..47a91100241 100644 --- a/sys/arch/mac68k/conf/GENERICSBC +++ b/sys/arch/mac68k/conf/GENERICSBC @@ -1,4 +1,4 @@ -# $OpenBSD: GENERICSBC,v 1.5 1997/04/14 00:27:29 briggs Exp $ +# $OpenBSD: GENERICSBC,v 1.6 1997/04/14 18:47:50 gene Exp $ # $NetBSD: GENERIC,v 1.52 1997/01/13 23:34:07 scottr Exp $ # # GENERIC @@ -61,7 +61,7 @@ options COMPAT_SUNOS options ZS_CONSOLE_ABORT options DISABLE_EXT_CACHE # Don't use IIci external cache options DISABLE_ADB_WITH_SERIAL_CONSOLE -options HWDIRECT +#options MRG_ADB # Use ROM-based ADB driver config bsd swap generic options GENERIC diff --git a/sys/arch/mac68k/conf/files.mac68k b/sys/arch/mac68k/conf/files.mac68k index e072f7c143c..28070608f8c 100644 --- a/sys/arch/mac68k/conf/files.mac68k +++ b/sys/arch/mac68k/conf/files.mac68k @@ -1,4 +1,4 @@ -# $OpenBSD: files.mac68k,v 1.15 1997/03/28 12:38:57 briggs Exp $ +# $OpenBSD: files.mac68k,v 1.16 1997/04/14 18:47:51 gene Exp $ # $NetBSD: files.mac68k,v 1.61 1997/03/01 20:22:16 scottr Exp $ # mac68k-specific configuration info @@ -26,8 +26,8 @@ attach adb at obio_norm file arch/mac68k/dev/adb.c adb file arch/mac68k/dev/adbsys.c file arch/mac68k/dev/adbsysasm.s -file arch/mac68k/dev/adb_direct.c hwdirect -file arch/mac68k/dev/pm_direct.c hwdirect +file arch/mac68k/dev/adb_direct.c +file arch/mac68k/dev/pm_direct.c device asc attach asc at obio_norm diff --git a/sys/arch/mac68k/dev/adb_direct.c b/sys/arch/mac68k/dev/adb_direct.c index 885047457a6..3d1d81fb324 100644 --- a/sys/arch/mac68k/dev/adb_direct.c +++ b/sys/arch/mac68k/dev/adb_direct.c @@ -1,4 +1,4 @@ -/* $OpenBSD: adb_direct.c,v 1.4 1997/04/07 01:22:15 briggs Exp $ */ +/* $OpenBSD: adb_direct.c,v 1.5 1997/04/14 18:47:53 gene Exp $ */ /* adb_direct.c 1.91 1/20/97 jpw */ /* @@ -1936,7 +1936,7 @@ set_adb_info(ADBSetInfoBlock * info, int adbAddr) } -#ifdef HWDIRECT +#ifndef MRG_ADB long mrg_adbintr(void) { @@ -2163,7 +2163,7 @@ adb_prog_switch_disable(void) } } /* adb_prog_switch_disable */ -#ifdef HWDIRECT +#ifndef MRG_ADB int CountADBs(void) diff --git a/sys/arch/mac68k/dev/adbsys.c b/sys/arch/mac68k/dev/adbsys.c index efe5c271d92..95369269adc 100644 --- a/sys/arch/mac68k/dev/adbsys.c +++ b/sys/arch/mac68k/dev/adbsys.c @@ -1,4 +1,4 @@ -/* $OpenBSD: adbsys.c,v 1.8 1997/04/03 03:53:27 briggs Exp $ */ +/* $OpenBSD: adbsys.c,v 1.9 1997/04/14 18:47:55 gene Exp $ */ /* $NetBSD: adbsys.c,v 1.24 1997/01/13 07:01:23 scottr Exp $ */ /*- @@ -183,8 +183,9 @@ adb_init() } #endif -#ifndef HWDIRECT /* We don't care about ADB ROM driver if we are - * using the HWDIRECT method for ADB/PRAM/RTC. */ +#ifdef MRG_ADB /* We don't care about ADB ROM driver if we + * aren't using the MRG_ADB method for + * ADB/PRAM/RTC. */ if (!mrg_romready()) { printf("adb: no ROM ADB driver in this kernel for this machine\n"); return; @@ -206,10 +207,10 @@ adb_init() /* * Initialize ADB * - * If using HWDIRECT method to access ADB, then call + * If not using MRG_ADB method to access ADB, then call * ADBReInit directly. Otherwise use ADB AlternateInit() */ -#ifdef HWDIRECT +#ifndef MRG_ADB printf("adb: calling ADBReInit\n"); ADBReInit(); #else diff --git a/sys/arch/mac68k/dev/adbvar.h b/sys/arch/mac68k/dev/adbvar.h index 3070587e981..b6335ff936d 100644 --- a/sys/arch/mac68k/dev/adbvar.h +++ b/sys/arch/mac68k/dev/adbvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: adbvar.h,v 1.5 1997/02/23 06:04:55 briggs Exp $ */ +/* $OpenBSD: adbvar.h,v 1.6 1997/04/14 18:47:56 gene Exp $ */ /* $NetBSD: adbvar.h,v 1.5 1997/01/13 07:01:24 scottr Exp $ */ /*- @@ -67,7 +67,7 @@ void extdms_complete __P((void)); void adb_complete __P((caddr_t buffer, caddr_t data_area, int adb_command)); void extdms_init __P((int)); -#ifdef HWDIRECT +#ifndef MRG_ADB /* types of adb hardware that we (will eventually) support */ #define ADB_HW_UNKNOWN 0x01 /* don't know */ diff --git a/sys/arch/mac68k/mac68k/machdep.c b/sys/arch/mac68k/mac68k/machdep.c index fac1e81644b..c3384b35ce3 100644 --- a/sys/arch/mac68k/mac68k/machdep.c +++ b/sys/arch/mac68k/mac68k/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.37 1997/04/07 03:23:35 briggs Exp $ */ +/* $OpenBSD: machdep.c,v 1.38 1997/04/14 18:47:59 gene Exp $ */ /* $NetBSD: machdep.c,v 1.134 1997/02/14 06:15:30 scottr Exp $ */ /* @@ -587,8 +587,8 @@ boot(howto) if (howto & RB_HALT) { printf("halted\n\n"); via_shutdown(); -#ifdef HWDIRECT /* adb_poweroff is available only when - * the HWDIRECT ADB method is used. */ +#ifndef MRG_ADB /* adb_poweroff is available only when + * the MRG_ADB method isn't used. */ adb_poweroff(); /* Shut down machines whose power functions * are accessed via modified ADB calls. */ #endif diff --git a/sys/arch/mac68k/mac68k/macrom.c b/sys/arch/mac68k/mac68k/macrom.c index 298b57265dd..cc24244042f 100644 --- a/sys/arch/mac68k/mac68k/macrom.c +++ b/sys/arch/mac68k/mac68k/macrom.c @@ -1,4 +1,4 @@ -/* $OpenBSD: macrom.c,v 1.14 1997/04/14 02:10:21 briggs Exp $ */ +/* $OpenBSD: macrom.c,v 1.15 1997/04/14 18:48:01 gene Exp $ */ /* $NetBSD: macrom.c,v 1.31 1997/03/01 17:20:34 scottr Exp $ */ /*- @@ -394,8 +394,8 @@ mrg_jkybdtaskpanic() /* JKybdTask stopper */ panic("Agh! Called JKybdTask!\n"); } -#ifndef HWDIRECT /* mrg_adbintr and mrg_pmintr are not defined - * here if we are using the HWDIRECT method to +#ifdef MRG_ADB /* mrg_adbintr and mrg_pmintr are not defined + * here if we are using the MRG_ADB method to * access the ADB/PRAM/RTC. They are * defined in adb_direct.c */ long @@ -454,7 +454,7 @@ mrg_pmintr() /* Call ROM PM Interrupt */ } return(1); } -#endif /* ifndef HWDIRECT */ +#endif /* ifdef MRG_ADB */ void @@ -1098,7 +1098,7 @@ setup_egret(void) #endif } -#ifndef HWDIRECT +#ifdef MRG_ADB static void setup_pm __P((void)); static void @@ -1146,8 +1146,8 @@ mrg_initadbintr() HwCfgFlags, HwCfgFlags2, HwCfgFlags3); } -#ifdef HWDIRECT /* Extra Egret setup not required for the - * HWDIRECT method. */ +#ifndef MRG_ADB /* Extra Egret setup not required for the + * MRG_ADB method. */ printf("mrg: skipping egret setup\n"); #else /* @@ -1440,7 +1440,7 @@ mrg_fixupROMBase(obase, nbase) #endif } -#ifndef HWDIRECT +#ifdef MRG_ADB void ADBAlternateInit(void) { diff --git a/sys/arch/mac68k/mac68k/macrom.h b/sys/arch/mac68k/mac68k/macrom.h index 71314a66754..04db780782c 100644 --- a/sys/arch/mac68k/mac68k/macrom.h +++ b/sys/arch/mac68k/mac68k/macrom.h @@ -1,4 +1,4 @@ -/* $OpenBSD: macrom.h,v 1.7 1997/04/05 15:29:12 briggs Exp $ */ +/* $OpenBSD: macrom.h,v 1.8 1997/04/14 18:48:03 gene Exp $ */ /* $NetBSD: macrom.h,v 1.9 1996/05/25 14:45:35 briggs Exp $ */ /*- @@ -111,8 +111,8 @@ int MyOwnTrap( void KnownRTS( void); -#ifndef HWDIRECT /* These routines are NOT defined here - * if using the HWDIRECT method for accessing +#ifdef MRG_ADB /* These routines are defined here + * if using the MRG_ADB method for accessing * the ADB/PRAM/RTC. They are * defined in adb_direct.h */ /* ADB Manager */ diff --git a/sys/arch/mac68k/mac68k/macromasm.s b/sys/arch/mac68k/mac68k/macromasm.s index 76e83a4d08f..b465fb5e7db 100644 --- a/sys/arch/mac68k/mac68k/macromasm.s +++ b/sys/arch/mac68k/mac68k/macromasm.s @@ -1,4 +1,4 @@ -/* $OpenBSD: macromasm.s,v 1.7 1997/04/05 15:29:13 briggs Exp $ */ +/* $OpenBSD: macromasm.s,v 1.8 1997/04/14 18:48:04 gene Exp $ */ /* $NetBSD: macromasm.s,v 1.11 1996/05/25 14:45:37 briggs Exp $ */ /*- @@ -125,8 +125,8 @@ .global _panic .global _printf -#ifndef HWDIRECT /* These functions are NOT defined here if using the - * HWDIRECT method of accessing the ADB/PRAM/RTC. +#ifdef MRG_ADB /* These functions are defined here if using the + * MRG_ADB method of accessing the ADB/PRAM/RTC. * They are in adb_direct.c. */ /* * Most of the following glue just takes C function calls, converts @@ -222,7 +222,7 @@ _ADBOp: movl sp@(16), d0 .word 0xa07c rts -#endif /* ifndef HWDIRECT */ +#endif /* ifdef MRG_ADB */ #if 0 diff --git a/sys/arch/mac68k/mac68k/pram.c b/sys/arch/mac68k/mac68k/pram.c index 8a22388b9ad..cff3c995fa3 100644 --- a/sys/arch/mac68k/mac68k/pram.c +++ b/sys/arch/mac68k/mac68k/pram.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pram.c,v 1.5 1997/02/23 06:05:04 briggs Exp $ */ +/* $OpenBSD: pram.c,v 1.6 1997/04/14 18:48:06 gene Exp $ */ /* $NetBSD: pram.c,v 1.11 1996/10/21 05:42:29 scottr Exp $ */ /*- @@ -46,7 +46,7 @@ #include #include -#ifdef HWDIRECT +#ifndef MRG_ADB #include #endif @@ -153,9 +153,9 @@ pram_settime(unsigned long time) return setPramTime(time); } -#ifdef HWDIRECT /* These routines are defined here only - * when the HWDIRECT method for accessing - * the ADB/PRAM/RTC is enabled. */ +#ifndef MRG_ADB /* These routines are defined here only + * when the MRG_ADB method for accessing + * the ADB/PRAM/RTC isn't enabled. */ extern int adbHardware; /* from newadb.c */ @@ -219,4 +219,4 @@ setPramTime(unsigned long time) } -#endif /* ifdef HWDIRECT */ +#endif /* ifndef MRG_ADB */ diff --git a/sys/arch/mac68k/mac68k/pram.h b/sys/arch/mac68k/mac68k/pram.h index 172f5059ab9..fc0e59edfb7 100644 --- a/sys/arch/mac68k/mac68k/pram.h +++ b/sys/arch/mac68k/mac68k/pram.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pram.h,v 1.4 1997/02/23 06:05:05 briggs Exp $ */ +/* $OpenBSD: pram.h,v 1.5 1997/04/14 18:48:07 gene Exp $ */ /* $NetBSD: pram.h,v 1.3 1996/05/05 06:18:53 briggs Exp $ */ /* @@ -73,8 +73,8 @@ void setPramTime(unsigned long time); unsigned long pram_readtime __P((void)); void pram_settime __P((unsigned long)); -#ifdef HWDIRECT /* These functions exist only when ADB/PRAM/RTC - * access is done via the HWDIRECT method. */ +#ifndef MRG_ADB /* These functions exist only when ADB/PRAM/RTC + * access isn't done via the MRG_ADB method. */ unsigned long getPramTimeII(void); void setPramTimeII(unsigned long); diff --git a/sys/arch/mac68k/mac68k/pramasm.s b/sys/arch/mac68k/mac68k/pramasm.s index 11b1e0d8457..62f36158df1 100644 --- a/sys/arch/mac68k/mac68k/pramasm.s +++ b/sys/arch/mac68k/mac68k/pramasm.s @@ -1,4 +1,4 @@ -/* $OpenBSD: pramasm.s,v 1.3 1997/02/23 06:05:05 briggs Exp $ */ +/* $OpenBSD: pramasm.s,v 1.4 1997/04/14 18:48:08 gene Exp $ */ /* $NetBSD: pramasm.s,v 1.4 1995/09/28 03:15:54 briggs Exp $ */ /* @@ -47,8 +47,8 @@ * that are defined later in this file. */ -#ifndef HWDIRECT /* These routines are NOT defined at all - * if using the HWDIRECT method for accessing +#ifdef MRG_ADB /* These routines are defined at all + * if using the MRG_ADB method for accessing * the ADB/PRAM/RTC. */ .text @@ -147,8 +147,8 @@ _setPramTime: #else /* The following routines are the hardware * specific routines for the machines that * use the II-like method to access the PRAM, - * and are only defined when the HWDIRECT method - * is used to access the PRAM. */ + * and are only defined when the MRG_ADB method + * isn't used to access the PRAM. */ /* * The following are the C interface functions to RTC access functions @@ -420,5 +420,5 @@ ragain: bset #0,a1@(0x0400) | and return RTC data line to output rts | return to caller -#endif /* ifdef HWDIRECT */ +#endif /* ifndef MRG_ADB */