SiS630 Software Watchdog Timer

Ronald G. Minnich rminnich at lanl.gov
Mon Mar 17 10:02:00 CET 2003


On Mon, 17 Mar 2003, Spirit wrote:

> That shouldn't be a problem unless it takes 5 seconds to get to the
> southbridge.c code. But of course, moving it to an earlier position is
> a good idea.

It really takes 5 seconds? it did not used to. I liked having it in the 
southbridge code for a simple reason: if you are in that code then things 
are working well. If you are not in that kind at some point, you really 
want that watchdog reset. It is a very simple self-test. 

> However, what I was asking for is how to enable and make use of it,
> not how to disable it. I think I'll need to look into the i810-tco.c
> from the kernel sources and try to modify it for SIS630.

it's easy. Set the bit, and in 5 seconds or so you get a reset. 

Here is a sample function that will enable reset, from the old patches.

+void
+sis503_reset(struct pci_dev *dev)
+{
+       unsigned char b;
+       unsigned short acpi_base;
+
+       printk(KERN_ERR __FUNCTION__ ": starting reset operation. \n");
+
+       /* Enable ACPI by set B7 on Reg 0x40, LPC */
+       pci_read_config_byte(dev, 0x40, &b);
+       pci_write_config_byte(dev, 0x40, b | 0x80);
+       printk(KERN_ERR __FUNCTION__ ": enabled ACPI. \n");
+
+       /* get the ACPI base address for register 0x74,0x75 of LPC */
+       pci_read_config_word(dev, 0x74, &acpi_base);
+       printk(KERN_ERR __FUNCTION__ ":acpi base: %x\n", acpi_base);
+
+       /* Set software watchdog timer init value */
+       outb(0x03, 0x4a + acpi_base);
+       printk(KERN_ERR __FUNCTION__ ": set the dog. \n");
+
+       printk(KERN_ERR __FUNCTION__ ": enabling dog. \n");
+       /* Software watchdog enable, issue PCIRST# when time expire */
+       outb(0x8f, 0x4b + acpi_base);
+
+       printk(KERN_ERR __FUNCTION__ ": We should reset soon. \n");
+}

> Speaking of ACPI... I can't get it working with LinuxBIOS. ospm_*.o
> modules won't load and the kernel complains on being unable to read
> ACPI tables.

that's because there are not acpi tables. 

ron




More information about the coreboot mailing list