Skip to contentSkip to conversation

Changes for IDE on PREP Hardware

DISCUSSION Cort Dougan 4 participants 9 messages Jan 5, 2000 – Jan 12, 2000 1 message not in the archive Block layer

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

} Attached is a patch which allows to work Motorola PREP hardware (like } Blackhawk) to use IDE devices (disk and cdrom). The patch tries to } selectively introduce the changes for the Motorola hardware only. } IBM's can stay with their irq 13 for IDE and with their preferred } method of non swapped data stream. I have no chance to test on IBM.

How would this work if both irqs arrive at the same time?

Johnnie, Matt - can you test this out on your systems?

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#2 lore raw
Quoted 10 lines · Cort Dougan

} Attached is a patch which allows to work Motorola PREP hardware (like } Blackhawk) to use IDE devices (disk and cdrom). The patch tries to } selectively introduce the changes for the Motorola hardware only. } IBM's can stay with their irq 13 for IDE and with their preferred } method of non swapped data stream. I have no chance to test on IBM.

How would this work if both irqs arrive at the same time?

Johnnie, Matt - can you test this out on your systems?

Which two irqs do you mean?

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#3 lore raw
In reply to Cort Dougan
Quoted 10 lines · Cort Dougan

} Attached is a patch which allows to work Motorola PREP hardware (like } Blackhawk) to use IDE devices (disk and cdrom). The patch tries to } selectively introduce the changes for the Motorola hardware only. } IBM's can stay with their irq 13 for IDE and with their preferred } method of non swapped data stream. I have no chance to test on IBM.

How would this work if both irqs arrive at the same time?

Johnnie, Matt - can you test this out on your systems?

Alois' IDE patch is a subset of the functionality that has made it into 2.2.14 from our IDE patch. This patch doesn't account for the secondary IDE controller on irq 15 among other things. I'm attaching our full patch as submitted versus 2.2.14pre4 so everybody can see the code I'm talking about. Note that changes to ide-pci.c, ide-probe.c, and sl82c105.c in the patch got dropped and Alan said "maybe for 2.2.15". The full patch was tested on every board MCG has made with IDE.

As for the 8259 patch, I think it may help the problem but will probably cause some bad situations disabling interrupts like that. I will test it out and see if it can be used or made better so we can get these PReP 8259 problems behind us.

--
Matt Porter
[email protected]
This is Linux Country. On a quiet night, you can hear Windows reboot.

Index: linux/arch/ppc/kernel/prep_pci.c

arch/ppc/kernel/prep_pci.c renamed from arch/ppc/kernel/prep_pci.c:1.1.1.1.2.3 +94 -46
diff -u linux/arch/ppc/kernel/prep_pci.c:1.1.1.1.2.3 linux/arch/ppc/kernel/prep_pci.c:1.1.1.1.2.3.2.3
@@ -170,7 +170,7 @@
 	0,	/* Slot 8  - unused */
 	0,	/* Slot 9  - unused */
 	0,	/* Slot 10 - unxued */
-	0,	/* Slot 11 - unused */
+	0x1e,	/* Slot 11 - PCI-ISA/IDE/USB */
 	0,	/* Slot 12 - unused */
 	0,	/* Slot 13 - unused */
 	2,	/* Slot 14 - Ethernet */
@@ -198,7 +198,7 @@
 	0,      /* Slot 8  - unused */
 	0,      /* Slot 9  - unused */
 	0,      /* Slot 10 - unxued */
-	0,      /* Slot 11 - unused */
+	0x1e,   /* Slot 11 - PCI-ISA/IDE/USB */
 	0,      /* Slot 12 - unused */
 	0,      /* Slot 13 - unused */
 	2,      /* Slot 14 - Ethernet */
@@ -224,7 +224,7 @@
 	0,	/* Slot 8  - unused */
 	0,	/* Slot 9  - unused */
 	0,	/* Slot 10 - unused */
-	0,	/* Slot 11 - unused */
+	0x1e,	/* Slot 11 - PCI-ISA/IDE/USB */
 	3,	/* Slot 12 - SCSI */
 	0,	/* Slot 13 - unused */
 	2,	/* Slot 14 - Ethernet */
@@ -253,7 +253,7 @@
         0,      /* Slot 8  - unused */
         0,      /* Slot 9  - unused */
         0,      /* Slot 10 - unused */
-        0,      /* Slot 11 - unused */
+        0x1e,   /* Slot 11 - PCI-ISA/IDE/USB */
         3,      /* Slot 12 - SCSI */
         0,      /* Slot 13 - unused */
         2,      /* Slot 14 - Ethernet 1 */
@@ -1076,40 +1076,91 @@
 	return;
 }
 
+int motopenpic_to_irq(int n)
+{
+       if (n & 0xF0) {
+               return (n & 0x0F);
+       } else {
+               return(openpic_to_irq(n));
+       }
+}
+
+void prep_pib_init(void)
+{
+unsigned char   reg;
+unsigned short  short_reg;
+
+struct pci_dev *dev = NULL;
+
+	if (( _prep_type == _PREP_Motorola) && (OpenPIC)) {
+		/*
+		 * Perform specific configuration for the Via Tech or
+		 * or Winbond PCI-ISA-Bridge part.
+		 */
+		if ((dev = pci_find_device(PCI_VENDOR_ID_VIA, 
+					PCI_DEVICE_ID_VIA_82C586_1, dev))) {
+			/*
+			 * PPCBUG does not set the enable bits
+			 * for the IDE device. Force them on here.
+			 */
+			pcibios_read_config_byte(dev->bus->number, 
+					dev->devfn, 0x40, &reg);
+
+			reg |= 0x03; /* IDE: Chip Enable Bits */
+			pcibios_write_config_byte(dev->bus->number, 
+					dev->devfn, 0x40, reg);
+
+		} else if ((dev = pci_find_device(PCI_VENDOR_ID_WINBOND, 
+					PCI_DEVICE_ID_WINBOND_83C553, dev))) {
+			/*
+			 * Clear the PCI Interrupt Routing Control Register.
+			 */
+			short_reg = 0x0000;
+			pcibios_write_config_word(dev->bus->number, 
+					dev->devfn, 0x44, short_reg);
+		}
+	}
+}
 __initfunc(
 void
 prep_pcibios_fixup(void))
 {
-        struct pci_dev *dev;
-        extern unsigned char *Motherboard_map;
-        extern unsigned char *Motherboard_routes;
-        unsigned char i;
-
-        if ( _prep_type == _PREP_Radstone )
-        {
-                printk("Radstone boards require no PCI fixups\n");
+extern unsigned char *Motherboard_map;
+extern unsigned char *Motherboard_routes;
+unsigned char	i;
+struct pci_dev  *dev;
+
+	if (_prep_type == _PREP_Radstone) {
+		printk("Radstone boards require no PCI fixups\n");
 		return;
-        }
+	}
 
 	prep_route_pci_interrupts();
 
+	prep_pib_init();
+
 	printk("Setting PCI interrupts for a \"%s\"\n", Motherboard_map_name);
+
 	if (OpenPIC) {
-		/* PCI interrupts are controlled by the OpenPIC */
-		for(dev=pci_devices; dev; dev=dev->next) {
-			if (dev->bus->number == 0) {
-                       		dev->irq = openpic_to_irq(Motherboard_map[PCI_SLOT(dev->devfn)]);
-				pcibios_write_config_byte(dev->bus->number, dev->devfn, PCI_INTERRUPT_PIN, dev->irq);
-			} else {
-				if (Motherboard_non0 != NULL)
-					Motherboard_non0(dev);
-			}
+
+	    /* PCI interrupts are controlled by the OpenPIC */
+	    for(dev=pci_devices; dev; dev=dev->next) {
+		if (dev->bus->number == 0) {
+		    dev->irq = 
+		       motopenpic_to_irq(Motherboard_map[PCI_SLOT(dev->devfn)]);
+
+		    pcibios_write_config_byte(dev->bus->number, dev->devfn, 
+					      PCI_INTERRUPT_PIN, dev->irq);
+		} else {
+			if (Motherboard_non0 != NULL)
+				Motherboard_non0(dev);
 		}
-		return;
+
+	    }
+	return;
 	}
 
-	for(dev=pci_devices; dev; dev=dev->next)
-	{
+	for(dev=pci_devices; dev; dev=dev->next) {
 		/*
 		 * Use our old hard-coded kludge to figure out what
 		 * irq this device uses.  This is necessary on things
@@ -1118,29 +1169,26 @@
 		unsigned char d = PCI_SLOT(dev->devfn);
 		dev->irq = Motherboard_routes[Motherboard_map[d]];
 
-		for ( i = 0 ; i <= 5 ; i++ )
-		{
-		        if ( dev->base_address[i] > 0x10000000 )
-		        {
-		                printk("Relocating PCI address %lx -> %lx\n",
-		                       dev->base_address[i],
-		                       (dev->base_address[i] & 0x00FFFFFF)
-		                       | 0x01000000);
-		                dev->base_address[i] =
-		                  (dev->base_address[i] & 0x00FFFFFF) | 0x01000000;
-		                pci_write_config_dword(dev,
-		                        PCI_BASE_ADDRESS_0+(i*0x4),
-		                       dev->base_address[i] );
-		        }
+		for ( i = 0 ; i <= 5 ; i++ ) {
+			if ( dev->base_address[i] > 0x10000000 ) {
+				printk("Relocating PCI address %lx -> %lx\n",
+				dev->base_address[i],
+				(dev->base_address[i] & 0x00FFFFFF)|0x01000000);
+
+				dev->base_address[i] = (dev->base_address[i] & 
+							0x00FFFFFF)|0x01000000;
+				pci_write_config_dword(dev, 
+						PCI_BASE_ADDRESS_0+(i*0x4),
+						dev->base_address[i] );
+			}
 		}
 #if 0
-		/*
-		 * If we have residual data and if it knows about this
-		 * device ask it what the irq is.
-		 *  -- Cort
-		 */
-		ppcd = residual_find_device_id( ~0L, dev->device,
-		                                -1,-1,-1, 0);
+	/*
+	 * If we have residual data and if it knows about this
+	 * device ask it what the irq is.
+	 *  -- Cort
+	 */
+	ppcd = residual_find_device_id( ~0L, dev->device, -1,-1,-1, 0);
 #endif
 	}
 }

Index: linux/arch/ppc/kernel/prep_setup.c

arch/ppc/kernel/prep_setup.c renamed from arch/ppc/kernel/prep_setup.c:1.1.1.1.2.3 +21 -9
diff -u linux/arch/ppc/kernel/prep_setup.c:1.1.1.1.2.3 linux/arch/ppc/kernel/prep_setup.c:1.1.1.1.2.3.2.2
@@ -628,25 +628,36 @@
 void
 prep_ide_insw(ide_ioreg_t port, void *buf, int ns)
 {
-	_insw((unsigned short *)((port)+_IO_BASE), buf, ns);
+	ide_insw(((port)+(_IO_BASE)), buf, ns);
 }
 
 void
 prep_ide_outsw(ide_ioreg_t port, void *buf, int ns)
 {
-	_outsw((unsigned short *)((port)+_IO_BASE), buf, ns);
+	ide_outsw(((port)+_IO_BASE), buf, ns);
 }
 
 int
 prep_ide_default_irq(ide_ioreg_t base)
 {
-	switch (base) {
-		case 0x1f0: return 13;
-		case 0x170: return 13;
-		case 0x1e8: return 11;
-		case 0x168: return 10;
-		default:
-                        return 0;
+	if ( _prep_type == _PREP_IBM ) {
+		switch (base) {
+			case 0x1f0: return 13;
+			case 0x170: return 13;
+			case 0x1e8: return 11;
+			case 0x168: return 10;
+			default:
+				return 0;
+		}
+	} else {
+		switch (base) {
+			case 0x1f0: return 14;
+			case 0x170: return 14;
+			case 0x1e8: return 15;
+			case 0x168: return 15;
+			default:
+				return 0;
+		}
 	}
 }
 
@@ -687,6 +698,7 @@
 void
 prep_ide_fix_driveid(struct hd_driveid *id)
 {
+	ppc_generic_ide_fix_driveid(id);
 }
 
 __initfunc(void

Index: linux/drivers/block/ide-pci.c

drivers/block/ide-pci.c renamed from drivers/block/ide-pci.c:1.1.1.1 +5 -2
diff -u linux/drivers/block/ide-pci.c:1.1.1.1 linux/drivers/block/ide-pci.c:1.1.1.1.6.1
@@ -322,6 +322,7 @@
 	/*
 	 * Can we trust the reported IRQ?
 	 */
+
 	pciirq = dev->irq;
 	if ((dev->class & ~(0xfa)) != ((PCI_CLASS_STORAGE_IDE << 8) | 5)) {
 		printk("%s: not 100%% native mode: will probe irqs later\n", d->name);
@@ -381,8 +382,10 @@
 				mate->serialized = 1;
 			}
 		}
-		if (IDE_PCI_DEVID_EQ(d->devid, DEVID_UM8886A) ||
-		    IDE_PCI_DEVID_EQ(d->devid, DEVID_UM8886BF))
+		if ( (IDE_PCI_DEVID_EQ(d->devid, DEVID_UM8886A)) ||
+		     (IDE_PCI_DEVID_EQ(d->devid, DEVID_UM8886BF)) ||
+                     (IDE_PCI_DEVID_EQ(d->devid, DEVID_W82C105)) ||
+		     (IDE_PCI_DEVID_EQ(d->devid, DEVID_VP_IDE)) )
 			hwif->irq = hwif->channel ? 15 : 14;
 
 #ifdef CONFIG_BLK_DEV_IDEDMA

Index: linux/drivers/block/ide-probe.c

drivers/block/ide-probe.c renamed from drivers/block/ide-probe.c:1.1.1.1 +1 -9
diff -u linux/drivers/block/ide-probe.c:1.1.1.1 linux/drivers/block/ide-probe.c:1.1.1.1.6.1
@@ -133,15 +133,7 @@
 	 */
 	if (id->config & (1<<7))
 		drive->removable = 1;
-	/*
-	 * Prevent long system lockup probing later for non-existant
-	 * slave drive if the hwif is actually a flash memory card of some variety:
-	 */
-	if (drive_is_flashcard(drive)) {
-		ide_drive_t *mate = &HWIF(drive)->drives[1^drive->select.b.unit];
-		mate->present = 0;
-		mate->noprobe = 1;
-	}
+
 	drive->media = ide_disk;
 	printk("ATA DISK drive\n");
 	return;

Index: linux/drivers/block/sl82c105.c

drivers/block/sl82c105.c renamed from drivers/block/sl82c105.c:1.1.1.1 +66 -13

86 lines not on this page · raw message

#4 lore raw
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

"Matt" == Matt Porter <[email protected]> writes:

Quoted 10 lines · Cort Dougan
Quoted 10 lines

} Attached is a patch which allows to work Motorola PREP hardware (like } Blackhawk) to use IDE devices (disk and cdrom). The patch tries to } selectively introduce the changes for the Motorola hardware only. } IBM's can stay with their irq 13 for IDE and with their preferred } method of non swapped data stream. I have no chance to test on IBM.

How would this work if both irqs arrive at the same time?

Johnnie, Matt - can you test this out on your systems?

Matt> Alois' IDE patch is a subset of the functionality that has made it into Matt> 2.2.14 from our IDE patch. This patch doesn't account for the secondary Matt> IDE controller on irq 15 among other things. I'm attaching our full Matt> patch as submitted versus 2.2.14pre4 so everybody can see the code I'm Matt> talking about. Note that changes to ide-pci.c, ide-probe.c, and sl82c105.c Matt> in the patch got dropped and Alan said "maybe for 2.2.15". The full patch Matt> was tested on every board MCG has made with IDE.

Matt> As for the 8259 patch, I think it may help the problem but will Matt> probably cause some bad situations disabling interrupts like that. I Matt> will test it out and see if it can be used or made better so we can Matt> get these PReP 8259 problems behind us.

Just to tell you that :

1) I applied the 2.2.14pre4 prepide-patch on a clean linux 2.2.14 tree. Effectively the ppc part is in and not the ide-pci.c, ide-probe.c, and sl82c105.c
2) BUT : after applying the missing part of the patches the behavior is absolutely identical!!!

hdc : lost interrupt...

any other hints?

Signature · 10 lines
   __                 
  /  `                   	Eric Valette
 /--   __  o _.          	Canon CRF - Communication Dept
(___, / (_(_(__         	Rue de la touche lambert
				35517 Cesson-Sevigne  Cedex
				FRANCE
Tel: +33 (0)2 99 87 68 91	Fax: +33 (0)2 99 84 11 30
E-mail: [email protected]	http://www.crf.canon.fr

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
#5 lore raw
Quoted 36 lines · Eric Valette
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

"Matt" == Matt Porter <[email protected]> writes:

Quoted 10 lines · Cort Dougan
Quoted 10 lines

} Attached is a patch which allows to work Motorola PREP hardware (like } Blackhawk) to use IDE devices (disk and cdrom). The patch tries to } selectively introduce the changes for the Motorola hardware only. } IBM's can stay with their irq 13 for IDE and with their preferred } method of non swapped data stream. I have no chance to test on IBM.

How would this work if both irqs arrive at the same time?

Johnnie, Matt - can you test this out on your systems?

Matt> Alois' IDE patch is a subset of the functionality that has made it into Matt> 2.2.14 from our IDE patch. This patch doesn't account for the secondary Matt> IDE controller on irq 15 among other things. I'm attaching our full Matt> patch as submitted versus 2.2.14pre4 so everybody can see the code I'm Matt> talking about. Note that changes to ide-pci.c, ide-probe.c, and sl82c105.c Matt> in the patch got dropped and Alan said "maybe for 2.2.15". The full patch Matt> was tested on every board MCG has made with IDE.

Matt> As for the 8259 patch, I think it may help the problem but will Matt> probably cause some bad situations disabling interrupts like that. I Matt> will test it out and see if it can be used or made better so we can Matt> get these PReP 8259 problems behind us.

Just to tell you that :

1) I applied the 2.2.14pre4 prepide-patch on a clean linux 2.2.14 tree. Effectively the ppc part is in and not the ide-pci.c, ide-probe.c, and sl82c105.c
2) BUT : after applying the missing part of the patches the behavior is absolutely identical!!!

Quoted 3 lines

hdc : lost interrupt...

any other hints?

Since you have the old defective MCP750, you can either return it or apply the 99% workaround of reprogramming the level/edge triggering on the VIA as you've done before. The patch does work on all MCG IDE capable hardware except the revs of the MCP750 that should no longer be used by customers.

I'll reiterate that since the policy is to replace these old boards which have the interrupt triggering set incorrectly, a workaround that doesn't work 100% of the time shouldn't go in the kernel.

Now, actually getting the board replaced when going through a distributor is another problem that we can continue further offline.

--
Matt Porter
[email protected]
This is Linux Country. On a quiet night, you can hear Windows reboot.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#6 lore raw
Quoted 8 lines · Matt Porter
Quoted 8 lines

Just to tell you that :

1) I applied the 2.2.14pre4 prepide-patch on a clean linux 2.2.14 tree. Effectively the ppc part is in and not the ide-pci.c, ide-probe.c, and sl82c105.c
2) BUT : after applying the missing part of the patches the behavior is absolutely identical!!!

Quoted 8 lines
Quoted 3 lines

hdc : lost interrupt...

any other hints?

Since you have the old defective MCP750, you can either return it or apply the 99% workaround of reprogramming the level/edge triggering on the VIA as you've done before. The patch does work on all MCG IDE capable hardware except the revs of the MCP750 that should no longer be used by customers.

No. That is not so simple : I have also a REV D board that behaves exactly
the same way. If you want I can send you my .config file and the binary. Also remember that I managed to have the same linux 2.2.10 image to run on both platforms...

Signature · 10 lines
   __                 
  /  `                   	Eric Valette
 /--   __  o _.          	Canon CRF - Communication Dept
(___, / (_(_(__         	Rue de la touche lambert
				35517 Cesson-Sevigne  Cedex
				FRANCE
Tel: +33 (0)2 99 87 68 91	Fax: +33 (0)2 99 84 11 30
E-mail: [email protected]	http://www.crf.canon.fr

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
#7 lore raw
Quoted 20 lines · Eric Valette
Quoted 8 lines · Matt Porter
Quoted 8 lines

Just to tell you that :

1) I applied the 2.2.14pre4 prepide-patch on a clean linux 2.2.14 tree. Effectively the ppc part is in and not the ide-pci.c, ide-probe.c, and sl82c105.c
2) BUT : after applying the missing part of the patches the behavior is absolutely identical!!!

Quoted 8 lines
Quoted 3 lines

hdc : lost interrupt...

any other hints?

Since you have the old defective MCP750, you can either return it or apply the 99% workaround of reprogramming the level/edge triggering on the VIA as you've done before. The patch does work on all MCG IDE capable hardware except the revs of the MCP750 that should no longer be used by customers.

Quoted 5 lines

No. That is not so simple : I have also a REV D board that behaves exactly
the same way. If you want I can send you my .config file and the binary. Also remember that I managed to have the same linux 2.2.10 image to run on both platforms...

Please send both and cc: [email protected]

The test platform was a Rev. D MCP750 with multiple IDE drives on hdc/hdd and a SanDisk in the onboard CF socket (hda).

I'll set this up again on a Rev. D to see if I can recreate it here. I can only suspect a .config file at this point. Especially since this patch is already in the Debian/PPC disty and I've installed whole systems to IDE drives with no problems. :-/

--
Matt Porter
[email protected]
This is Linux Country. On a quiet night, you can hear Windows reboot.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#8 lore raw
In reply to Eric Valette
Quoted 16 lines · Eric Valette

Matt> On Tue, Jan 04, 2000 at 10:24:21PM -0700, Cort Dougan wrote:
Matt> Alois' IDE patch is a subset of the functionality that has made it into Matt> 2.2.14 from our IDE patch. This patch doesn't account for the secondary Matt> IDE controller on irq 15 among other things. I'm attaching our full Matt> patch as submitted versus 2.2.14pre4 so everybody can see the code I'm Matt> talking about. Note that changes to ide-pci.c, ide-probe.c, and sl82c105.c Matt> in the patch got dropped and Alan said "maybe for 2.2.15". The full patch Matt> was tested on every board MCG has made with IDE.

Matt> As for the 8259 patch, I think it may help the problem but will Matt> probably cause some bad situations disabling interrupts like that. I Matt> will test it out and see if it can be used or made better so we can Matt> get these PReP 8259 problems behind us.

Just to tell you that :

Quoted 7 lines

1) I applied the 2.2.14pre4 prepide-patch on a clean linux 2.2.14 tree. Effectively the ppc part is in and not the ide-pci.c, ide-probe.c, and sl82c105.c
2) BUT : after applying the missing part of the patches the behavior is absolutely identical!!!

hdc : lost interrupt...

kernel 2.2.14 breaks all Motorola PowerPlus systems. That is, all systems which have an OpenPIC. The patch was against 2.2.14pre4 which was before all the changes. Unfortunately, I didn't have time to test every prepatch with PowerPC merges to check for breakage. I see this problem on all interrupts since everything (inluding the 8259 irqs) is routed through the OpenPIC.

The OpenPIC is completely rewritten which is more than likely the cause. I thought there was going to be just some minor changes that affected SMP boxes (fixed IPI support) but a lot appears to be touched.

PowerPlus IDE and PCI interrupt routing fixes will have to be backburnered until I can repair OpenPIC handling.

FWIW, 2.2.12 is the last stock stable release that is know to be good with Moto. PowerPlus systems (and was the basis of the IDE support). There was a patch posted here for testing a long while back versus 2.2.12.

Oh, and I noticed in released 2.2.14 that the gemini support just inserts itself into a PReP image build with no conditionals. New architectures shouldn't be bloating existing ones this way, especially when there is a CONFIG_GEMINI. One other thing is that the SYSRQ support is broken as the machdep sysrq_xlate function somehow got "ppc_" prepended to it's name in a couple places and the SYSRQ defines never get defined anywhere.

--
Matt Porter
[email protected]
This is Linux Country. On a quiet night, you can hear Windows reboot.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#9 lore raw
In reply to Matt Porter

Looking over the patch I'd like to make a few remarks.

prep_setup.c:
The irq stuff is only for the ISA IDE interface of the Intel 82378 on Blackhawk systems. There is only one channel using irq 14.

The split between swapping and non-swapping is because I assumed that the given code works as is on IBM hardware.

ide-pci.c:
I did not expect the Winbond chip (PCI) requiring a hardcoded irq assignment. On the PowerStackII this chip works well with the PCI setting connecting both channels to one PCI INT. I hope there isn't any reason to use the device in legacy mode.

sl82c105.c:
The proposed patch breaks the IDE CD-Rom which is on my system connected to the second Winbond IDE channel. I think it is the setting of bit 5 which configures to use the preset speed settings for port.

Quoted 26 lines · Matt Porter
Quoted 10 lines · Cort Dougan

} Attached is a patch which allows to work Motorola PREP hardware (like } Blackhawk) to use IDE devices (disk and cdrom). The patch tries to } selectively introduce the changes for the Motorola hardware only. } IBM's can stay with their irq 13 for IDE and with their preferred } method of non swapped data stream. I have no chance to test on IBM.

How would this work if both irqs arrive at the same time?

Johnnie, Matt - can you test this out on your systems?

Alois' IDE patch is a subset of the functionality that has made it into 2.2.14 from our IDE patch. This patch doesn't account for the secondary IDE controller on irq 15 among other things. I'm attaching our full patch as submitted versus 2.2.14pre4 so everybody can see the code I'm talking about. Note that changes to ide-pci.c, ide-probe.c, and sl82c105.c in the patch got dropped and Alan said "maybe for 2.2.15". The full patch was tested on every board MCG has made with IDE.

As for the 8259 patch, I think it may help the problem but will probably cause some bad situations disabling interrupts like that. I will test it out and see if it can be used or made better so we can get these PReP 8259 problems behind us.

Quoted 5 lines

--
Matt Porter
[email protected]
This is Linux Country. On a quiet night, you can hear Windows reboot.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/