EPIA-M serial port 1/2 baud rate insanity
Andrew Ip
aip at cwlinux.com
Wed Dec 17 22:24:01 CET 2003
Hi Dave,
Have you checked out the clock connected to LPC? On W311, FS2 can be
set to 24 or 48 MHz. It could be the problem, since I have similar problem
with USB on a custom cle266 board. FYI, it can be programmed thru smb.
Here is from we have done to program the USB clock.
#define SMB_BASE_ADDRESS 0x5000
#define SMB_STATUS (SMB_BASE_ADDRESS + 0)
#define SMB_CONTROL (SMB_BASE_ADDRESS + 2)
#define SMB_COMMAND (SMB_BASE_ADDRESS + 3)
#define SMB_ADDRESS (SMB_BASE_ADDRESS + 4)
#define SMB_DATA (SMB_BASE_ADDRESS + 5)
#define I2C_TRANS_CMD 0x40
#define CLOCK_SLAVE_ADDRESS 0x69
static void ext_clock_fixup(void)
{
int dt;
struct pci_dev *dev;
dev = pci_find_device(PCI_VENDOR_ID_VIA, 0x3177, 0);
if (dev != NULL)
{
printk_info("ext clock setting\n");
// SMB IO address 5000h
pci_write_config_byte(dev, 0xD1, (SMB_BASE_ADDRESS>>8)&0xff );
pci_write_config_byte(dev, 0xD0, SMB_BASE_ADDRESS&0xff );
// enable SMB
pci_write_config_byte(dev, 0xD2, 0x01);
// clear status
outb( 0xff, SMB_STATUS );
// USB out 48MHz
outb( 0x7f, SMB_DATA );
outb( 0x83, SMB_COMMAND );
outb( (CLOCK_SLAVE_ADDRESS<<1), SMB_ADDRESS );
outb( 0x8|I2C_TRANS_CMD, SMB_CONTROL );
while( inb(SMB_STATUS) & 0x01 );
}
}
You may want to put similar code in serial init. Hope this help.
-Andrew
On Wed, Dec 17, 2003 at 11:13:02AM -0800, Dave Ashley wrote:
> I am at my wits end regarding how to get the serial ports on the epia-m to
> run at full 115,200 baud rate. Here is a summary of what is known:
>
> 1) The serial ports are driven by the VT1211 superio chip.
> 2) Under AWARD bios the serial ports are capable of 115,200 operation.
> 3) Under linuxbios they can only run at 57,600 max.
> 4) Booting up with AWARD then soft reset (or hit reset button on motherboard)
> into linuxbios still maintains 115,200 baud
> 5) Hard reset (power off then on) into linuxbios reduces maximum baud rate to
> 57,600.
> 6) All registers of the VT1211 are identical after linuxbios bootup, whether
> from award -> softreset -> linuxbios bootup or hardreset -> linuxbios bootup.
> I am speaking of all registers of all logical devices of the VT1211, including
> all the global registers. I wrote a program to dump everything then diff'd the
> two outputs, they're identical.
>
> I have repeatedly tried asking VIA for help, in various different ways. The
> VT1211 datasheet and the VT1211 bios porting guide have not resolved the
> issue. VIA has proven incapable of addressing the problem.
>
> I have one last idea. There is an emulator to test VGA bios's, I was messing
> with it a few months back. Is there an emulator for the full BIOS? I'd like
> to be able to watch all io port accesses of the award bios, maybe I can
> trap when it goes to write to the 0x2e + 0x2f io ports to configure the
> vt1211 serial ports, then look for something near there that might be related.
> The idea would be to figure out what magical thing the AWARD bios is doing
> to initialize the serial port.
>
> Failing that is there any way to disassemble a BIOS image?
>
> Any ideas welcome.
>
> BTW if anyone has figured out how to fix the problem, please just f*cking
> out with it, I think I've been very generous in the past with enhancements
> and turnabout is fair play.
>
> Thanks--
> Dave
>
>
> _______________________________________________
> Linuxbios mailing list
> Linuxbios at clustermatic.org
> http://www.clustermatic.org/mailman/listinfo/linuxbios
--
Andrew Ip
Email: aip at cwlinux.com
Tel: (852) 2542 2046
Fax: (852) 2542 2036
Mobile: (852) 9201 9866
Cwlinux Limited
Unit 202B 2/F Lai Cheong Factory Building,
479-479A Castle Peak Road,
Lai Chi Kok, Kowloon,
Hong Kong.
For public pgp key, please obtain it from http://www.keyserver.net/en.
More information about the coreboot
mailing list