Supermicro H8SSL watchdog in Linux

Well I just decided to make a new server and I was not able to get Tyan MB here. I was recommended H8SSL and I'm starting to like it. It seems that all HW is supported well except SMBus (HT1000 south bridge) and watchdog. (Update: I posted SMBus patch)

There is PC87427 from Winbond on the board and Winbond refused to give be a datasheed even under NDA. I found DS for PC87417 and I used it as base for testing.

The chip is located at 0x2e (address selector) and 0x2f (data register). Write LD (logical device) number to register 7 and then you can read LD's enable bit from 0x30 and io base address from 0x60 (MSB) and 0x61 (LSB). The WD 427 is different from 417 because when I looked at bank 3 of LD SWC (LD number 4) it was empty. After some time I found MS wdt spec the PC87427 should be compatible with.

The MB's BIOS doesn't have WDRT ACPI table filled in. I'll ask Supermicro why. But fortunately after some testing I've discovered that LD number 0xA is what we need. It is mapped at 0x800. To be more specific 0x804 is control register and 0x808 is counter with one second granularity.

Now it is simple to reset counter (after enabling it in the BIOS):

 outl(60,0x808);   /* 60 secs timeout */
 outl(0x80,0x804); /* restart it */
Program implementing all this is wdt.c.