From: Mart Gerrits Date: Sat, 30 Jul 2011 14:59:12 +0000 (+0200) Subject: watchdog: Fix POST failure on ASUS P5N32-E SLI and similar boards X-Git-Tag: v3.1-rc1~86^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6b01d30eef64456ad9e261d2173266a3244da8e1;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.git watchdog: Fix POST failure on ASUS P5N32-E SLI and similar boards At present the module does not unset the NO_REBOOT bit upon shutdown, this causes the BIOS to fail the POST once and reset. During the next boot it displays the following error message: ***** Warning: System BOOT Fail ***** Your system last boot fail or POST interrupted. Please enter setup to load default and reboot again. Press F1 to continue, DEL to enter SETUP With this patch the NO_REBOOT flag will be unset on shutdown and thus stop this failure from occurring. Tested on 'ASUS P5N32-E SLI with BIOS revision 1801' and 'ASUS P5N32-E SLI PLUS with BIOS revision 1502'. Signed-off-by: Mart Gerrits Signed-off-by: Wim Van Sebroeck --- diff --git a/drivers/watchdog/nv_tco.c b/drivers/watchdog/nv_tco.c index afa78a5..809f41c 100644 --- a/drivers/watchdog/nv_tco.c +++ b/drivers/watchdog/nv_tco.c @@ -458,7 +458,15 @@ static int __devexit nv_tco_remove(struct platform_device *dev) static void nv_tco_shutdown(struct platform_device *dev) { + u32 val; + tco_timer_stop(); + + /* Some BIOSes fail the POST (once) if the NO_REBOOT flag is not + * unset during shutdown. */ + pci_read_config_dword(tco_pci, MCP51_SMBUS_SETUP_B, &val); + val &= ~MCP51_SMBUS_SETUP_B_TCO_REBOOT; + pci_write_config_dword(tco_pci, MCP51_SMBUS_SETUP_B, val); } static struct platform_driver nv_tco_driver = {