LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* Re: [PATCH] remove dead PC9800 IDE support
  2004-05-03 23:35 [PATCH] remove dead PC9800 IDE support Bartlomiej Zolnierkiewicz
@ 2004-05-03 23:32 ` Randy.Dunlap
  2004-05-15 20:23   ` Adrian Bunk
  0 siblings, 1 reply; 4+ messages in thread
From: Randy.Dunlap @ 2004-05-03 23:32 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz; +Cc: linux-ide, linux-kernel

On Tue, 4 May 2004 01:35:14 +0200 Bartlomiej Zolnierkiewicz wrote:

| 
| It was added in 2.5.66 but PC9800 subarch is still non-buildable.
| Also this is one big hack and only half-merged.
| 

It's fairly simple to make it buildable, but it's still a hack
that no one seems to want to support, so I agree, kill it.

Can we kill the rest of it too?

--
~Randy

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] remove dead PC9800 IDE support
@ 2004-05-03 23:35 Bartlomiej Zolnierkiewicz
  2004-05-03 23:32 ` Randy.Dunlap
  0 siblings, 1 reply; 4+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2004-05-03 23:35 UTC (permalink / raw)
  To: linux-ide; +Cc: linux-kernel, Randy.Dunlap


It was added in 2.5.66 but PC9800 subarch is still non-buildable.
Also this is one big hack and only half-merged.

 linux-2.6.6-rc3-bk2-bzolnier/drivers/ide/Makefile   |    1 
 linux-2.6.6-rc3-bk2-bzolnier/drivers/ide/ide-proc.c |    1 
 linux-2.6.6-rc3-bk2-bzolnier/include/asm-i386/ide.h |   34 --------
 linux-2.6.6-rc3-bk2-bzolnier/include/linux/ide.h    |    5 -
 linux-2.6.6-rc3-bk2/drivers/ide/legacy/pc9800.c     |   84 --------------------
 5 files changed, 2 insertions(+), 123 deletions(-)

diff -puN drivers/ide/ide-proc.c~ide_pc9800 drivers/ide/ide-proc.c
--- linux-2.6.6-rc3-bk2/drivers/ide/ide-proc.c~ide_pc9800	2004-05-04 01:32:52.138359128 +0200
+++ linux-2.6.6-rc3-bk2-bzolnier/drivers/ide/ide-proc.c	2004-05-04 01:32:52.161355632 +0200
@@ -352,7 +352,6 @@ static int proc_ide_read_imodel
 		case ide_cy82c693:	name = "cy82c693";	break;
 		case ide_4drives:	name = "4drives";	break;
 		case ide_pmac:		name = "mac-io";	break;
-		case ide_pc9800:	name = "pc9800";	break;
 		default:		name = "(unknown)";	break;
 	}
 	len = sprintf(page, "%s\n", name);
diff -puN -L drivers/ide/legacy/pc9800.c drivers/ide/legacy/pc9800.c~ide_pc9800 /dev/null
--- linux-2.6.6-rc3-bk2/drivers/ide/legacy/pc9800.c
+++ /dev/null	2004-01-17 00:25:55.000000000 +0100
@@ -1,84 +0,0 @@
-/*
- *  ide_pc9800.c
- *
- *  Copyright (C) 1997-2000  Linux/98 project,
- *			     Kyoto University Microcomputer Club.
- */
-
-#include <linux/config.h>
-#include <linux/kernel.h>
-#include <linux/ioport.h>
-#include <linux/ide.h>
-#include <linux/init.h>
-
-#include <asm/io.h>
-#include <asm/pc9800.h>
-
-#define PC9800_IDE_BANKSELECT	0x432
-
-#undef PC9800_IDE_DEBUG
-
-static void pc9800_select(ide_drive_t *drive)
-{
-#ifdef PC9800_IDE_DEBUG
-	byte old;
-
-	/* Too noisy: */
-	/* printk(KERN_DEBUG "pc9800_select(%s)\n", drive->name); */
-
-	outb(0x80, PC9800_IDE_BANKSELECT);
-	old = inb(PC9800_IDE_BANKSELECT);
-	if (old != HWIF(drive)->index)
-		printk(KERN_DEBUG "ide-pc9800: switching bank #%d -> #%d\n",
-			old, HWIF(drive)->index);
-#endif
-	outb(HWIF(drive)->index, PC9800_IDE_BANKSELECT);
-}
-
-void __init ide_probe_for_pc9800(void)
-{
-	u8 saved_bank;
-
-	if (!PC9800_9821_P() /* || !PC9821_IDEIF_DOUBLE_P() */)
-		return;
-
-	if (!request_region(PC9800_IDE_BANKSELECT, 1, "ide0/1 bank")) {
-		printk(KERN_ERR
-			"ide: bank select port (%#x) is already occupied!\n",
-			PC9800_IDE_BANKSELECT);
-		return;
-	}
-
-	/* Do actual probing. */
-	if ((saved_bank = inb(PC9800_IDE_BANKSELECT)) == (u8) ~0
-	    || (outb(saved_bank ^ 1, PC9800_IDE_BANKSELECT),
-		/* Next outb is dummy for reading status. */
-		outb(0x80, PC9800_IDE_BANKSELECT),
-		inb(PC9800_IDE_BANKSELECT) != (saved_bank ^ 1))) {
-		printk(KERN_INFO
-			"ide: pc9800 type bank selecting port not found\n");
-		release_region(PC9800_IDE_BANKSELECT, 1);
-		return;
-	}
-
-	/* Restore original value, just in case. */
-	outb(saved_bank, PC9800_IDE_BANKSELECT);
-
-	/* These ports are reseved by IDE I/F.  */
-	if (!request_region(0x430, 1, "ide") ||
-	    !request_region(0x435, 1, "ide")) {
-		printk(KERN_WARNING
-			"ide: IO port 0x430 and 0x435 are reserved for IDE"
-			" the card using these ports may not work\n");
-	}
-
-	if (ide_hwifs[0].io_ports[IDE_DATA_OFFSET] == HD_DATA &&
-	    ide_hwifs[1].io_ports[IDE_DATA_OFFSET] == HD_DATA) {
-		ide_hwifs[0].chipset = ide_pc9800;
-		ide_hwifs[0].mate = &ide_hwifs[1];
-		ide_hwifs[0].selectproc = pc9800_select;
-		ide_hwifs[1].chipset = ide_pc9800;
-		ide_hwifs[1].mate = &ide_hwifs[0];
-		ide_hwifs[1].selectproc = pc9800_select;
-	}
-}
diff -puN drivers/ide/Makefile~ide_pc9800 drivers/ide/Makefile
--- linux-2.6.6-rc3-bk2/drivers/ide/Makefile~ide_pc9800	2004-05-04 01:32:52.148357608 +0200
+++ linux-2.6.6-rc3-bk2-bzolnier/drivers/ide/Makefile	2004-05-04 01:32:52.162355480 +0200
@@ -26,7 +26,6 @@ ide-core-$(CONFIG_PROC_FS)		+= ide-proc.
 ide-core-$(CONFIG_BLK_DEV_IDEPNP)	+= ide-pnp.o
 
 # built-in only drivers from legacy/
-ide-core-$(CONFIG_BLK_DEV_IDE_PC9800)	+= legacy/pc9800.o
 ide-core-$(CONFIG_BLK_DEV_BUDDHA)	+= legacy/buddha.o
 ide-core-$(CONFIG_BLK_DEV_FALCON_IDE)	+= legacy/falconide.o
 ide-core-$(CONFIG_BLK_DEV_GAYLE)	+= legacy/gayle.o
diff -puN include/asm-i386/ide.h~ide_pc9800 include/asm-i386/ide.h
--- linux-2.6.6-rc3-bk2/include/asm-i386/ide.h~ide_pc9800	2004-05-04 01:32:52.152357000 +0200
+++ linux-2.6.6-rc3-bk2-bzolnier/include/asm-i386/ide.h	2004-05-04 01:32:52.164355176 +0200
@@ -26,9 +26,6 @@
 static __inline__ int ide_default_irq(unsigned long base)
 {
 	switch (base) {
-#ifdef CONFIG_X86_PC9800
-		case 0x640: return 9;
-#endif
 		case 0x1f0: return 14;
 		case 0x170: return 15;
 		case 0x1e8: return 11;
@@ -43,48 +40,17 @@ static __inline__ int ide_default_irq(un
 static __inline__ unsigned long ide_default_io_base(int index)
 {
 	switch (index) {
-#ifdef CONFIG_X86_PC9800
-		case 0:
-		case 1:	return 0x640;
-#else
 		case 0:	return 0x1f0;
 		case 1:	return 0x170;
 		case 2: return 0x1e8;
 		case 3: return 0x168;
 		case 4: return 0x1e0;
 		case 5: return 0x160;
-#endif
 		default:
 			return 0;
 	}
 }
 
-#ifdef CONFIG_X86_PC9800
-static __inline__ void ide_init_hwif_ports(hw_regs_t *hw, unsigned long data_port,
-	 unsigned long ctrl_port, int *irq)
-{
-	unsigned long reg = data_port;
-	int i;
-
-	unsigned long increment = data_port == 0x640 ? 2 : 1;
-
-	for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) {
-		hw->io_ports[i] = reg;
-		reg += increment;
-	}
-	if (ctrl_port) {
-		hw->io_ports[IDE_CONTROL_OFFSET] = ctrl_port;
-	} else if (data_port == 0x640) {
-		hw->io_ports[IDE_CONTROL_OFFSET] = 0x74c;
-	} else {
-		hw->io_ports[IDE_CONTROL_OFFSET] = hw->io_ports[IDE_DATA_OFFSET] + 0x206;
-	}
-	if (irq != NULL)
-		*irq = 0;
-	hw->io_ports[IDE_IRQ_OFFSET] = 0;
-}
-#endif
-
 #ifdef CONFIG_BLK_DEV_IDEPCI
 #define ide_init_default_irq(base)	(0)
 #else
diff -puN include/linux/ide.h~ide_pc9800 include/linux/ide.h
--- linux-2.6.6-rc3-bk2/include/linux/ide.h~ide_pc9800	2004-05-04 01:32:52.156356392 +0200
+++ linux-2.6.6-rc3-bk2-bzolnier/include/linux/ide.h	2004-05-04 01:32:52.166354872 +0200
@@ -255,7 +255,7 @@ typedef enum {	ide_unknown,	ide_generic,
 		ide_pdc4030,	ide_rz1000,	ide_trm290,
 		ide_cmd646,	ide_cy82c693,	ide_4drives,
 		ide_pmac,	ide_etrax100,	ide_acorn,
-		ide_pc9800,	ide_forced
+		ide_forced
 } hwif_chipset_t;
 
 /*
@@ -308,8 +308,7 @@ static inline void ide_std_init_ports(hw
 /*
  * ide_init_hwif_ports() is OBSOLETE and will be removed in 2.7 series.
  *
- * arm26, arm, h8300, m68k, m68knommu (broken) and i386-pc9800 (broken)
- * still have their own versions.
+ * arm{26}, h8300, m68k and m68knommu (broken) still have their own versions.
  */
 #if !defined(CONFIG_ARM) && !defined(CONFIG_H8300) && !defined(CONFIG_M68K)
 static inline void ide_init_hwif_ports(hw_regs_t *hw,

_


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] remove dead PC9800 IDE support
  2004-05-03 23:32 ` Randy.Dunlap
@ 2004-05-15 20:23   ` Adrian Bunk
  2004-05-15 22:09     ` Randy.Dunlap
  0 siblings, 1 reply; 4+ messages in thread
From: Adrian Bunk @ 2004-05-15 20:23 UTC (permalink / raw)
  To: Randy.Dunlap, tomita, a13a
  Cc: Bartlomiej Zolnierkiewicz, linux-ide, linux-kernel

On Mon, May 03, 2004 at 04:32:20PM -0700, Randy.Dunlap wrote:
> On Tue, 4 May 2004 01:35:14 +0200 Bartlomiej Zolnierkiewicz wrote:
> 
> | 
> | It was added in 2.5.66 but PC9800 subarch is still non-buildable.
> | Also this is one big hack and only half-merged.
> | 
> 
> It's fairly simple to make it buildable, but it's still a hack
> that no one seems to want to support, so I agree, kill it.
> 
> Can we kill the rest of it too?

What's the opinion of the PC-9800 people regarding this issue?

Is there any work done now or in the near future on the PC-9800 port?

> ~Randy

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] remove dead PC9800 IDE support
  2004-05-15 20:23   ` Adrian Bunk
@ 2004-05-15 22:09     ` Randy.Dunlap
  0 siblings, 0 replies; 4+ messages in thread
From: Randy.Dunlap @ 2004-05-15 22:09 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: tomita, a13a, B.Zolnierkiewicz, linux-ide, linux-kernel

On Sat, 15 May 2004 22:23:47 +0200 Adrian Bunk <bunk@fs.tum.de> wrote:

| On Mon, May 03, 2004 at 04:32:20PM -0700, Randy.Dunlap wrote:
| > On Tue, 4 May 2004 01:35:14 +0200 Bartlomiej Zolnierkiewicz wrote:
| > 
| > | 
| > | It was added in 2.5.66 but PC9800 subarch is still non-buildable.
| > | Also this is one big hack and only half-merged.
| > | 
| > 
| > It's fairly simple to make it buildable, but it's still a hack
| > that no one seems to want to support, so I agree, kill it.
| > 
| > Can we kill the rest of it too?
| 
| What's the opinion of the PC-9800 people regarding this issue?
| 
| Is there any work done now or in the near future on the PC-9800 port?

We haven't heard from them.  I have written email to them a few
times (2 or 3), but they haven't replied.

The current PC-9800 implementation is only 1/2 done, and IDE
is very hackish, according to Bart.

And currently X86_PC9800 cannot be selected at all (it's not
there!), so people cannot attempt to build/fix it either
(without fixing that, which I have done, but I don't think it's
worth submitting that patch).

--
~Randy

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-05-15 22:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-03 23:35 [PATCH] remove dead PC9800 IDE support Bartlomiej Zolnierkiewicz
2004-05-03 23:32 ` Randy.Dunlap
2004-05-15 20:23   ` Adrian Bunk
2004-05-15 22:09     ` Randy.Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).