patch-2.1.125 linux/drivers/char/mac_SCC.c

Next file: linux/drivers/char/radio-sf16fmi.c
Previous file: linux/drivers/char/joystick.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.124/linux/drivers/char/mac_SCC.c linux/drivers/char/mac_SCC.c
@@ -67,6 +67,7 @@
 #include <asm/system.h>
 #include <asm/segment.h>
 #include <asm/bitops.h>
+#include <asm/hwtest.h>
 
 #include "mac_SCC.h"
 
@@ -1300,6 +1301,12 @@
 	/* testing: fix up broken 24 bit addresses (ClassicII) */
 	if ((mac_bi_data.sccbase & 0x00FFFFFF) == mac_bi_data.sccbase)
 		mac_bi_data.sccbase |= 0x50000000;
+		
+	if ( !hwreg_present((void *)mac_bi_data.sccbase))
+	{
+		printk(KERN_WARNING "z8530: Serial devices not accessible. Check serial switch.\n");
+		return;
+	}
 
 	for(n=0;n<2;n++)
 	{
@@ -1459,11 +1466,7 @@
 	printk("Mac68K Z8530 serial driver version 1.01\n");
 
 	/* SCC present at all? */
-	if (MACH_IS_ATARI || MACH_IS_AMIGA 
-#if 0
-	    || !(MACHW_PRESENT(SCC) || MACHW_PRESENT(ST_ESCC))
-#endif
-	   )
+	if (!MACH_IS_MAC)
 		return( -ENODEV );
 
 	if (zs_chain == 0)

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov