diff options
author | Alexandru Gagniuc <mr.nuke.me@gmail.com> | 2013-05-23 13:39:43 -0500 |
---|---|---|
committer | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2013-06-27 08:41:44 +0200 |
commit | 8b343b88ee8328cb0c4ae32068f5980d0cfc76c1 (patch) | |
tree | 84afed21adbb0d03c6ee932f711a56a7b47b9af7 | |
parent | 4ecbf2dfecea5224662aeb30981111885f9fba7d (diff) |
EPIA-M850: Disable auto-reboot
The VX900 chipset on this board has a watchdog-like mechanism. This
reboots the board four seconds after it is powered on. It will not reboot
it a second time, but is still annoying when debugging.
Disable the timer that causes the reset. This prevents the board from
resetting 4 seconds after power on.
Change-Id: Ib604634ef4b33ddd3f552676ef5df7c4d142ead0
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Reviewed-on: http://review.coreboot.org/3278
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
-rw-r--r-- | SerialICE/mainboard/via_epia_m850.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/SerialICE/mainboard/via_epia_m850.c b/SerialICE/mainboard/via_epia_m850.c index 6d041bd..fdf3990 100644 --- a/SerialICE/mainboard/via_epia_m850.c +++ b/SerialICE/mainboard/via_epia_m850.c @@ -17,10 +17,12 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -const char boardname[33]="VIA EPIA M-850 "; +const char boardname[33] = "VIA EPIA M-850 "; #define SUPERIO_CONFIG_PORT 0x2e +#define LPC(x) PCI_ADDR(0, 0x11, 0, x) + static inline void pnp_enter_conf_state(u16 port) { outb(0x87, port); @@ -32,8 +34,17 @@ static inline void pnp_exit_conf_state(u16 port) outb(0xaa, port); } +static inline void vx900_disable_auto_reboot(void) +{ + /* Disable the GP3 timer, which is the root of all evil */ + pci_write_config8(LPC(0x98), 0); + /* Yep, that's all it takes */ +} + static void superio_init(void) { + vx900_disable_auto_reboot(); + pnp_enter_conf_state(SUPERIO_CONFIG_PORT); pnp_set_logical_device(SUPERIO_CONFIG_PORT, 0); pnp_set_enable(SUPERIO_CONFIG_PORT, 0); |