Hi all
There has been a bug in the EPIA build which at some point stopped FILO being able to boot from an IDE drive. After much digging I have found the problem and have changed the following two files.
LinuxBIOSv2/src/mainboard/via/epia/auto.c LinuxBIOSv2/src/southbridge/via/vt8231/vt8231_ide.c
I have also changed the default COM speed from 19200 to 115200. This is a personal thing but every time I update LB I forget to change it back. Leave it out if you wish.
LinuxBIOSv2/src/mainboard/via/epia/Options.lb
I have attached a patch file. Can someone please see about checking & adding the fixes to the repository.
There is still an issue with the board sometimes hanging on boot. So I would not class this as fully working just yet.
Regards Ben Hewson
Index: /home/ben/sw/LinuxBIOSv2/src/mainboard/via/epia/auto.c =================================================================== --- /home/ben/sw/LinuxBIOSv2/src/mainboard/via/epia/auto.c (revision 2621) +++ /home/ben/sw/LinuxBIOSv2/src/mainboard/via/epia/auto.c (working copy) @@ -66,8 +66,16 @@ /* we do this here as in V2, we can not yet do raw operations * to pci! */ - dev += 0x100; /* ICKY */ - + + /* changed this to work correctly on later revisions of LB. + * The original dev += 0x100; stopped working. It also appears + * that if this is not set here, but in ide_init() only, the IDE + * does not work at all. I assume it needs to be set before something else, + * possibly before enabling the IDE peripheral, or it is a timing issue. + * Ben Hewson 29 Apr 2007. + */ + + dev = pci_locate_device(PCI_ID(0x1106,0x0571), 0); pci_write_config8(dev, 0x42, 0); }
Index: /home/ben/sw/LinuxBIOSv2/src/southbridge/via/vt8231/vt8231_ide.c =================================================================== --- /home/ben/sw/LinuxBIOSv2/src/southbridge/via/vt8231/vt8231_ide.c (revision 2621) +++ /home/ben/sw/LinuxBIOSv2/src/southbridge/via/vt8231/vt8231_ide.c (working copy) @@ -15,6 +15,12 @@ // Run the IDE controller in 'compatiblity mode - i.e. don't use PCI // interrupts. Using PCI ints confuses linux for some reason. + /* Setting reg 0x42 here does not work. It is set in mainboard/auto.c + * It probably can only be changed while the IDE is disabled + * or it is possibly a timing issue. Ben Hewson29 Apr 2007. + */ + + /* printk_info("%s: enabling compatibility IDE addresses\n", __FUNCTION__); enables = pci_read_config8(dev, 0x42); printk_debug("enables in reg 0x42 0x%x\n", enables); @@ -22,6 +28,8 @@ pci_write_config8(dev, 0x42, enables); enables = pci_read_config8(dev, 0x42); printk_debug("enables in reg 0x42 read back as 0x%x\n", enables); + */ + } enables = pci_read_config8(dev, 0x40);
Index: /home/ben/sw/LinuxBIOSv2/src/mainboard/via/epia/Options.lb =================================================================== --- /home/ben/sw/LinuxBIOSv2/src/mainboard/via/epia/Options.lb (revision 2621) +++ /home/ben/sw/LinuxBIOSv2/src/mainboard/via/epia/Options.lb (working copy) @@ -51,7 +51,7 @@
default CONFIG_CONSOLE_SERIAL8250=1 ## Select the serial console baud rate -default TTYS0_BAUD=19200 +default TTYS0_BAUD=115200
# Select the serial console base port default TTYS0_BASE=0x3f8
Hi,
On Sun, Apr 29, 2007 at 11:36:51AM +0100, Ben Hewson wrote:
I have also changed the default COM speed from 19200 to 115200. This is a personal thing but every time I update LB I forget to change it back. Leave it out if you wish.
Setting it to 115200 makes sense, IHMO. But I don't know whether it was 19200 for a certain reason (problems with faster BAUD rates?)
I have attached a patch file. Can someone please see about checking & adding the fixes to the repository.
Please re-send with a Signed-off-by line, see http://linuxbios.org/Development_Guidelines#Sign-off_Procedure
Otherwise we cannot commit the patch.
I'll leave it to someone else to commit this patch, though, as I cannot test it (no Epia).
Cheers, Uwe.
On Sun, Apr 29, 2007 at 11:36:51AM +0100, Ben Hewson wrote:
=================================================================== --- /home/ben/sw/LinuxBIOSv2/src/southbridge/via/vt8231/vt8231_ide.c (revision 2621) +++ /home/ben/sw/LinuxBIOSv2/src/southbridge/via/vt8231/vt8231_ide.c (working copy) @@ -15,6 +15,12 @@ // Run the IDE controller in 'compatiblity mode - i.e. don't use PCI // interrupts. Using PCI ints confuses linux for some reason.
/* Setting reg 0x42 here does not work. It is set in mainboard/auto.c
* It probably can only be changed while the IDE is disabled
* or it is possibly a timing issue. Ben Hewson29 Apr 2007.
*/
printk_info("%s: enabling compatibility IDE addresses\n", __FUNCTION__); enables = pci_read_config8(dev, 0x42); printk_debug("enables in reg 0x42 0x%x\n", enables);/*
@@ -22,6 +28,8 @@ pci_write_config8(dev, 0x42, enables); enables = pci_read_config8(dev, 0x42); printk_debug("enables in reg 0x42 read back as 0x%x\n", enables);
*/
Hm, I don't know about this, this file is used with densitron/dpx114 also and it should also have this fixup in auto.c.
Ben, is there really no way to have that register setting in the 8231 code in v2?
If not, then OK, we will have to document properly though. Also, in that case please just remove the code from the 8231 code rather than commenting it out. (But leave your new comment.)
//Peter
On 4/29/07, Peter Stuge stuge-linuxbios@cdy.org wrote:
On Sun, Apr 29, 2007 at 11:36:51AM +0100, Ben Hewson wrote:
=================================================================== --- /home/ben/sw/LinuxBIOSv2/src/southbridge/via/vt8231/vt8231_ide.c (revision 2621) +++ /home/ben/sw/LinuxBIOSv2/src/southbridge/via/vt8231/vt8231_ide.c (working copy) @@ -15,6 +15,12 @@ // Run the IDE controller in 'compatiblity mode - i.e. don't use PCI // interrupts. Using PCI ints confuses linux for some reason.
/* Setting reg 0x42 here does not work. It is set in mainboard/auto.c
* It probably can only be changed while the IDE is disabled
* or it is possibly a timing issue. Ben Hewson29 Apr 2007.
*/
/* printk_info("%s: enabling compatibility IDE addresses\n", __FUNCTION__); enables = pci_read_config8(dev, 0x42); printk_debug("enables in reg 0x42 0x%x\n", enables);
@@ -22,6 +28,8 @@ pci_write_config8(dev, 0x42, enables); enables = pci_read_config8(dev, 0x42); printk_debug("enables in reg 0x42 read back as 0x%x\n", enables);
*/
Hm, I don't know about this, this file is used with densitron/dpx114 also and it should also have this fixup in auto.c.
it would be best to have it in 8231 etc. If it MUST be in auto.c, how about vt8231_early_init.c
ron
The patch actualy looks fine to me. The densitron is DEAD and we should remove it from the tree. The 19200 baud rate was ONLY because of the ituner nodes and their 19200-baud 2-line vacuum display. 115200 is a sensible default.
I actually don't see a reason to commit as-is, but I can not test either -- let's get a person with hardware to ack this one.
ron
On 4/29/07, Ben Hewson ben@hewson-venieri.com wrote:
Hi all
There has been a bug in the EPIA build which at some point stopped FILO being able to boot from an IDE drive. After much digging I have found the problem and have changed the following two files.
LinuxBIOSv2/src/mainboard/via/epia/auto.c LinuxBIOSv2/src/southbridge/via/vt8231/vt8231_ide.c
I have also changed the default COM speed from 19200 to 115200. This is a personal thing but every time I update LB I forget to change it back. Leave it out if you wish.
LinuxBIOSv2/src/mainboard/via/epia/Options.lb
I have attached a patch file. Can someone please see about checking & adding the fixes to the repository.
There is still an issue with the board sometimes hanging on boot. So I would not class this as fully working just yet.
Regards Ben Hewson
Index: /home/ben/sw/LinuxBIOSv2/src/mainboard/via/epia/auto.c
--- /home/ben/sw/LinuxBIOSv2/src/mainboard/via/epia/auto.c (revision 2621) +++ /home/ben/sw/LinuxBIOSv2/src/mainboard/via/epia/auto.c (working copy) @@ -66,8 +66,16 @@ /* we do this here as in V2, we can not yet do raw operations * to pci! */
dev += 0x100; /* ICKY */
- /* changed this to work correctly on later revisions of LB.
- The original dev += 0x100; stopped working. It also appears
- that if this is not set here, but in ide_init() only, the IDE
- does not work at all. I assume it needs to be set before something else,
- possibly before enabling the IDE peripheral, or it is a timing issue.
- Ben Hewson 29 Apr 2007.
- */
dev = pci_locate_device(PCI_ID(0x1106,0x0571), 0); pci_write_config8(dev, 0x42, 0);
}
Index: /home/ben/sw/LinuxBIOSv2/src/southbridge/via/vt8231/vt8231_ide.c
--- /home/ben/sw/LinuxBIOSv2/src/southbridge/via/vt8231/vt8231_ide.c (revision 2621) +++ /home/ben/sw/LinuxBIOSv2/src/southbridge/via/vt8231/vt8231_ide.c (working copy) @@ -15,6 +15,12 @@ // Run the IDE controller in 'compatiblity mode - i.e. don't use PCI // interrupts. Using PCI ints confuses linux for some reason.
/* Setting reg 0x42 here does not work. It is set in mainboard/auto.c
* It probably can only be changed while the IDE is disabled
* or it is possibly a timing issue. Ben Hewson29 Apr 2007.
*/
/* printk_info("%s: enabling compatibility IDE addresses\n", __FUNCTION__); enables = pci_read_config8(dev, 0x42); printk_debug("enables in reg 0x42 0x%x\n", enables);
@@ -22,6 +28,8 @@ pci_write_config8(dev, 0x42, enables); enables = pci_read_config8(dev, 0x42); printk_debug("enables in reg 0x42 read back as 0x%x\n", enables);
*/
} enables = pci_read_config8(dev, 0x40);
Index: /home/ben/sw/LinuxBIOSv2/src/mainboard/via/epia/Options.lb
--- /home/ben/sw/LinuxBIOSv2/src/mainboard/via/epia/Options.lb (revision 2621) +++ /home/ben/sw/LinuxBIOSv2/src/mainboard/via/epia/Options.lb (working copy) @@ -51,7 +51,7 @@
default CONFIG_CONSOLE_SERIAL8250=1 ## Select the serial console baud rate -default TTYS0_BAUD=19200 +default TTYS0_BAUD=115200
# Select the serial console base port default TTYS0_BASE=0x3f8
-- linuxbios mailing list linuxbios@linuxbios.org http://www.linuxbios.org/mailman/listinfo/linuxbios
* ron minnich rminnich@gmail.com [070429 19:45]:
The patch actualy looks fine to me. The densitron is DEAD and we should remove it from the tree.
Acked-by: Stefan Reinauer stepan@coresystems.de