patch-2.3.40 linux/include/asm-sparc64/floppy.h

Next file: linux/include/asm-sparc64/ipcbuf.h
Previous file: linux/include/asm-sparc64/asm_offsets.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.39/linux/include/asm-sparc64/floppy.h linux/include/asm-sparc64/floppy.h
@@ -1,4 +1,4 @@
-/* $Id: floppy.h,v 1.23 1999/09/21 14:39:34 davem Exp $
+/* $Id: floppy.h,v 1.24 2000/01/09 15:16:34 ecd Exp $
  * asm-sparc64/floppy.h: Sparc specific parts of the Floppy driver.
  *
  * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
@@ -574,7 +574,6 @@
 		struct linux_ebus_device *edev = 0;
 		unsigned long config = 0;
 		unsigned long auxio_reg;
-		unsigned char cfg;
 
 		for_each_ebus(ebus) {
 			for_each_ebusdev(edev, ebus) {
@@ -669,9 +668,7 @@
 			return sun_floppy_types[0];
 
 		/* Enable PC-AT mode. */
-		cfg = ns87303_readb(config, ASC);
-		cfg |= 0xc0;
-		ns87303_writeb(config, ASC, cfg);
+		ns87303_modify(config, ASC, 0, 0xc0);
 
 #ifdef PCI_FDC_SWAP_DRIVES
 		/*
@@ -682,15 +679,9 @@
 			 * Set the drive exchange bit in FCR on NS87303,
 			 * make shure other bits are sane before doing so.
 			 */
-			cfg = ns87303_readb(config, FER);
-			cfg &= ~(FER_EDM);
-			ns87303_writeb(config, FER, cfg);
-			cfg = ns87303_readb(config, ASC);
-			cfg &= ~(ASC_DRV2_SEL);
-			ns87303_writeb(config, ASC, cfg);
-			cfg = ns87303_readb(config, FCR);
-			cfg |= FCR_LDE;
-			ns87303_writeb(config, FCR, cfg);
+			ns87303_modify(config, FER, FER_EDM, 0);
+			ns87303_modify(config, ASC, ASC_DRV2_SEL, 0);
+			ns87303_modify(config, FCR, 0, FCR_LDE);
 
 			cfg = sun_floppy_types[0];
 			sun_floppy_types[0] = sun_floppy_types[1];

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)