public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Osamu Tomita <tomita@cinet.co.jp>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>, LKML <linux-kernel@vger.kernel.org>
Subject: [PATCHSET 2/17] support PC-9800 against 2.5.45-ac1
Date: Thu, 07 Nov 2002 02:35:31 +0900	[thread overview]
Message-ID: <3DC952E3.42B749E5@cinet.co.jp> (raw)
In-Reply-To: 3DC94C7B.79DE5EBC@cinet.co.jp

[-- Attachment #1: Type: text/plain, Size: 173 bytes --]

This is for already merged file, too.
Merged PC-9800 specific "#define"s into floppy98.c.
And don't change include/asm-i386/floppy.h, include/linux/fdreg.h

-- 
Osamu tomita

[-- Attachment #2: floppy.patch --]
[-- Type: text/plain, Size: 2354 bytes --]

--- linux-2.5.45-ac1/drivers/block/floppy98.c.orig	Tue Nov  5 10:16:20 2002
+++ linux-2.5.45-ac1/drivers/block/floppy98.c	Wed Nov  6 20:51:58 2002
@@ -176,7 +176,15 @@
 
 
 #include <linux/fd.h>
+#define FLOPPY98_MOTOR_MASK 0x08
+
+#define FDPATCHES
 #include <linux/hdreg.h>
+#define FD98_STATUS	(0 + FD_IOPORT )
+#define FD98_DATA	(2 + FD_IOPORT )
+#define FD_MODE		(4 + FD_IOPORT )
+#define FD_MODE_CHANGE	0xbe
+#define FD_EMODE_CHANGE	0x4be
 
 #include <linux/errno.h>
 #include <linux/slab.h>
@@ -784,10 +792,10 @@
 		fd_outb(newdor, FD_MODE);
 	}
 
-	if (newdor & FLOPPY_MOTOR_MASK)
+	if (newdor & FLOPPY98_MOTOR_MASK)
 		floppy_grab_irq_and_dma();
 
-	if (olddor & FLOPPY_MOTOR_MASK)
+	if (olddor & FLOPPY98_MOTOR_MASK)
 		floppy_release_irq_and_dma();
 
 	return olddor;
@@ -828,7 +836,7 @@
 	if (FDCS->rawcmd == 2)
 		reset_fdc_info(1);
 
-	if (fd_inb(FD_STATUS) != STATUS_READY)
+	if (fd_inb(FD98_STATUS) != STATUS_READY)
 		FDCS->reset = 1;
 }
 
@@ -1146,7 +1154,7 @@
 	if (FDCS->reset)
 		return -1;
 	for (counter = 0; counter < READY_DELAY; counter++) {
-		status = fd_inb(FD_STATUS);		
+		status = fd_inb(FD98_STATUS);		
 		if (status & STATUS_READY)
 			return status;
 	}
@@ -1167,7 +1175,7 @@
 	if ((status = wait_til_ready()) < 0)
 		return -1;
 	if ((status & (STATUS_READY|STATUS_DIR|STATUS_DMA)) == STATUS_READY){
-		fd_outb(byte,FD_DATA);
+		fd_outb(byte,FD98_DATA);
 #ifdef FLOPPY_SANITY_CHECK
 		output_log[output_log_pos].data = byte;
 		output_log[output_log_pos].status = status;
@@ -1203,7 +1211,7 @@
 			return i;
 		}
 		if (status == (STATUS_DIR|STATUS_READY|STATUS_BUSY))
-			reply_buffer[i] = fd_inb(FD_DATA);
+			reply_buffer[i] = fd_inb(FD98_DATA);
 		else
 			break;
 	}
@@ -1793,7 +1801,7 @@
 	printk("\n");
 #endif
 
-	printk("status=%x\n", fd_inb(FD_STATUS));
+	printk("status=%x\n", fd_inb(FD98_STATUS));
 	printk("fdc_busy=%lu\n", fdc_busy);
 	if (do_floppy)
 		printk("do_floppy=%p\n", do_floppy);
@@ -2344,7 +2352,7 @@
 {
 	if (end_that_request_first(req, uptodate, current_count_sectors))
 		return;
-	add_blkdev_randomness(MAJOR_NR);
+	add_disk_randomness(req->rq_disk);
 	floppy_off((int)req->rq_disk->private_data);
 	blkdev_dequeue_request(req);
 	end_that_request_last(req);
@@ -4251,6 +4259,7 @@
 	int err;
 
 	raw_cmd = NULL;
+	FDC1 = 0x90;
 
 	for (i=0; i<N_DRIVE; i++) {
 		disks[i] = alloc_disk(1);

  parent reply	other threads:[~2002-11-06 17:29 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-06 17:08 [PATCHSET 0/17] support PC-9800 against 2.5.45-ac1 Osamu Tomita
2002-11-06 17:25 ` [PATCHSET 1/17] support PC-9800 against 2.5.45-ac1 (boot) Osamu Tomita
2002-11-06 17:35 ` Osamu Tomita [this message]
2002-11-06 17:40 ` [PATCHSET 3/17] support PC-9800 against 2.5.45-ac1 (core) Osamu Tomita
2002-11-06 17:52 ` [PATCHSET 5/17] support PC-9800 against 2.5.45-ac1 (apm) Osamu Tomita
     [not found]   ` <1036600885.19924.6.camel@localhost.localdomain>
2002-11-07 15:05     ` Osamu Tomita
2002-11-06 17:59 ` [PATCHSET 4/17] support PC-9800 against 2.5.45-ac1 (console) Osamu Tomita
2002-11-11 17:18   ` Osamu Tomita
2002-11-06 18:06 ` [PATCHSET 6/17] support PC-9800 against 2.5.45-ac1 (network device) Osamu Tomita
2002-11-06 18:19 ` [PATCHSET 7/17] support PC-9800 against 2.5.45-ac1 (FS) Osamu Tomita
2002-11-06 18:22 ` [PATCHSET 8/17] support PC-9800 against 2.5.45-ac1 (IDE) Osamu Tomita
2002-11-06 18:26 ` [PATCHSET 9/17] support PC-9800 against 2.5.45-ac1 (core#2) Osamu Tomita
2002-11-06 18:31 ` [PATCHSET 10/17] support PC-9800 against 2.5.45-ac1 (input) Osamu Tomita
2002-11-08 22:24   ` Osamu Tomita
2002-11-06 18:36 ` [PATCHSET 11/17] support PC-9800 against 2.5.45-ac1 (kernel) Osamu Tomita
2002-11-06 18:42 ` [PATCHSET 12/17] support PC-9800 against 2.5.45-ac1 (parport) Osamu Tomita
2002-11-06 18:48 ` [PATCHSET 13/17] support PC-9800 against 2.5.45-ac1 (PCI) Osamu Tomita
2002-11-06 18:50 ` [PATCHSET 14/17] support PC-9800 against 2.5.45-ac1 (PNP) Osamu Tomita
2002-11-06 18:53 ` [PATCHSET 15/17] support PC-9800 against 2.5.45-ac1 (SCSI) Osamu Tomita
2002-11-06 18:56 ` [PATCHSET 16/17] support PC-9800 against 2.5.45-ac1 (serial) Osamu Tomita
2002-11-06 18:58 ` [PATCHSET 17/17] support PC-9800 against 2.5.45-ac1 (SMP) Osamu Tomita

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3DC952E3.42B749E5@cinet.co.jp \
    --to=tomita@cinet.co.jp \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox