On Thu, 2010-07-29 at 20:14 +0300, Andriy Gapon wrote:
Juhana Helovuo said the following:
Meanwhile, I added call to it8712f_kill_watchdog() , like Rudolf Marek suggested.
BTW, if it's not too hard, could you please share what value that register (IT8712F_CONFIG_REG_WATCHDOG) has before being reset to zero in it8712f_kill_watchdog? Thanks!
Ok, but I am not sure how one is supposed to read the Super I/O registers, since there is only a write routine. I made an educated guess and wrote a read routine as follows:
Added in superio/ite/it8712f/it8712f_early_serial.c :
static uint8_t it8712f_sio_read(uint8_t ldn, uint8_t index) { outb(IT8712F_CONFIG_REG_LDN, SIO_BASE); outb(ldn, SIO_DATA); outb(index, SIO_BASE); return inb(SIO_DATA); }
uint8_t it8712f_kill_watchdog(void) { uint8_t prev_config; it8712f_enter_conf();
prev_config = it8712f_sio_read(0x07, IT8712F_CONFIG_REG_WATCHDOG);
/* Kill the Watchdog */ it8712f_sio_write(0x07, IT8712F_CONFIG_REG_WATCHDOG, 0x00);
it8712f_exit_conf(); return prev_config; }
Then in mainboard/asus/m4a785-m/romstage.c :
it8712f_enable_serial(0, CONFIG_TTYS0_BASE); watchdog_prev_config = it8712f_kill_watchdog(); /* disable watchdog, so it does not reset while still booting */ uart_init(); [...] printk(BIOS_DEBUG, "cpu_init_detectedx = %08lx \n", cpu_init_detectedx); printk(BIOS_DEBUG, "Super I/O Watchdog was killed. Previous WD config was %02x\n",watchdog_prev_config);
The result is:
coreboot-4.0-r5631M Fri Jul 30 21:27:07 EEST 2010 starting...
BSP Family_Model: 00100f62 *sysinfo range: [000cc000,000cdfa0] bsp_apicid = 00 cpu_init_detectedx = 00000000 Super I/O Watchdog was killed. Previous WD config was 30
Hope this makes sense, Juhana Helovuo