Skip to contentSkip to conversation

Get superio serial to work with 2.6

PATCH In review Randolph Chung 2 participants 4 messages Dec 7, 2003

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Get superio serial to work with 2.6

This patch is needed to get serial console to work on SuckyIO based systems on 2.6. It was mostly done by Grant (and willy, I think)

Unfortunately it requires disabling some bits of code in inventory. What do you guys think?

Can someone try this on a suckyio system that has USB running?

randolph

Index: arch/parisc/kernel/inventory.c
===================================================================
RCS file: /var/cvs/linux-2.6/arch/parisc/kernel/inventory.c,v retrieving revision 1.2

parisc/kernel/inventory.c +6 -1
diff -u -p -r1.2 inventory.c
@@ -532,7 +532,12 @@ static void __init system_map_inventory(
 	 * Otherwise the machine might crash during iommu setup.
 	 */
 	pdc_io_reset();
-	pdc_io_reset_devices();
+
+	/*
+	 * Unfortunately if we reset devices here, serial console
+	 * stops working :-(
+	 */
+	/* pdc_io_reset_devices(); */
 #endif
 
 	for (i = 0; status != PDC_BAD_PROC && status != PDC_NE_MOD; i++) {

Index: drivers/parisc/superio.c
===================================================================
RCS file: /var/cvs/linux-2.6/drivers/parisc/superio.c,v retrieving revision 1.3

parisc/superio.c +26 -40

96 lines not on this page · raw message

#1 lore raw
Quoted 5 lines · Randolph Chung

This patch is needed to get serial console to work on SuckyIO based systems on 2.6. It was mostly done by Grant (and willy, I think)

Unfortunately it requires disabling some bits of code in inventory. What do you guys think?

My preference right now is to move those PDC calls into sba_cdio.c. Then add hueristics that call PDC_IO_RESET_AND_CLEAR if suckyio/USB is active or the LAN active. If suckyio serial console, then add code to save/restore suckyio config space around the reset.

So quite a bit of hackery that's really only needed when the IO MMU is actually used.

Quoted 1 line

Can someone try this on a suckyio system that has USB running?

hrm...I don't have the serial console setup at the moment. I suggest plugging in a USB mouse and moving the mouse around during boot. Not sure that's sufficient but maybe.

The USB/DMA problem occurs when booting with USB Keyboard/mouse and not a serial console. Ie, until 2.6.0 boots with STICON enabled, I can't really test the USB/DMA stuff.

grant

#2 lore raw
Quoted 1 line

My preference right now is to move those PDC calls into sba_cdio.c.

hmmm.. that looks like a hpux name ;-) sba_iommu.c?

Quoted 6 lines

Then add hueristics that call PDC_IO_RESET_AND_CLEAR if suckyio/USB is active or the LAN active. If suckyio serial console, then add code to save/restore suckyio config space around the reset.

So quite a bit of hackery that's really only needed when the IO MMU is actually used.

ok, so should i just keep this patch in my private tree for now? or commit it and let you fix the rest of it? ;-)

Quoted 3 lines

hrm...I don't have the serial console setup at the moment. I suggest plugging in a USB mouse and moving the mouse around during boot. Not sure that's sufficient but maybe.

i doubt that will make a difference. if the usb driver is not yet loaded (i.e. during inventory) i don't thing any usb events will be happening, right? anyway, i guess i can try this tomorrow.

randolph

Signature · 3 lines
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports
http://www.tausq.org/
#3 lore raw
Quoted 3 lines · Randolph Chung
Quoted 1 line

My preference right now is to move those PDC calls into sba_cdio.c.

hmmm.. that looks like a hpux name ;-) sba_iommu.c?

yeah...brainfart. I was up too late last night again...

Quoted 9 lines
Quoted 6 lines

Then add hueristics that call PDC_IO_RESET_AND_CLEAR if suckyio/USB is active or the LAN active. If suckyio serial console, then add code to save/restore suckyio config space around the reset.

So quite a bit of hackery that's really only needed when the IO MMU is actually used.

ok, so should i just keep this patch in my private tree for now? or commit it and let you fix the rest of it? ;-)

commit and I'll fix the rest later.

Quoted 7 lines
Quoted 3 lines

hrm...I don't have the serial console setup at the moment. I suggest plugging in a USB mouse and moving the mouse around during boot. Not sure that's sufficient but maybe.

i doubt that will make a difference. if the usb driver is not yet loaded (i.e. during inventory) i don't thing any usb events will be happening, right? anyway, i guess i can try this tomorrow.

It does make a difference. The IODC left HW in an enabled and operational state when it handed off to the OS. That's harmless for a serial console. It's not harmless when the device can master DMA transactions and we reprogram the IO MMU.

grant