void it8712f_kill_watchdog(void) { it8712f_enter_conf(); /* Kill the Watchdog */ it8712f_sio_write(0x07, IT8712F_CONFIG_REG_WATCHDOG, 0x00); it8712f_exit_conf(); }
void it8712f_24mhz_clkin(void) { it8712f_enter_conf(); /* Select 24MHz CLKIN (48MHZ default)*/ it8712f_sio_write(0x00, IT8712F_CONFIG_REG_CLOCKSEL, 0x1); it8712f_exit_conf(); }
/* Mainboard specific GPIO setup. */ static void mb_gpio_init(u16 *iobase) { /* Init Super I/O GPIOs. */ it8712f_enter_conf(); outb(IT8712F_CONFIG_REG_LDN, SIO_INDEX); outb(IT8712F_GPIO, SIO_DATA); outb(0x62, SIO_INDEX); outb((*iobase >> 8), SIO_DATA); outb(0x63, SIO_INDEX); outb((*iobase & 0xff), SIO_DATA); it8712f_exit_conf(); }
/* Early mainboard specific GPIO setup. */ static void mb_gpio_init(void) { int i; /* Init Super I/O WDT, GPIOs. Done early, WDT init may trigger reset! */ it8712f_enter_conf(); for (i = 0; i < ARRAY_SIZE(sio_init_table); i++) { u16 val = sio_init_table[i]; outb((u8)val, SIO_INDEX); outb(val >> 8, SIO_DATA); } it8712f_exit_conf(); }
void it8712f_enable_3vsbsw(void) { /* We need to set enable 3VSBSW#, this was documented only in IT8712F_V0.9.2! LDN 7, reg 0x2a - needed for S3, or memory power will be cut off. Enable 3VSBSW#. (For System Suspend-to-RAM) 0: 3VSBSW# will be always inactive. 1: 3VSBSW# enabled. It will be (NOT SUSB#) NAND SUSC#. */ it8712f_enter_conf(); it8712f_sio_write(0x07, IT8712F_CONFIG_REG_MFC, 0x80); it8712f_exit_conf(); }
/* Enable the peripheral devices on the IT8712F Super I/O chip. */ void it8712f_enable_serial(device_t dev, unsigned iobase) { /* (1) Enter the configuration state (MB PnP mode). */ it8712f_enter_conf(); /* (2) Modify the data of configuration registers. */ /* Select the chip to configure (if there's more than one). Set bit 7 to select JP3=1, clear bit 7 to select JP3=0. If this register is not written, both chips are configured. */ /* it8712f_sio_write(0x00, IT8712F_CONFIG_REG_CONFIGSEL, 0x00); */ /* Enable serial port(s). */ it8712f_sio_write(IT8712F_SP1, 0x30, 0x1); /* Serial port 1 */ it8712f_sio_write(IT8712F_SP2, 0x30, 0x1); /* Serial port 2 */ /* Clear software suspend mode (clear bit 0). TODO: Needed? */ /* it8712f_sio_write(0x00, IT8712F_CONFIG_REG_SWSUSP, 0x00); */ /* (3) Exit the configuration state (MB PnP mode). */ it8712f_exit_conf(); }