diff options
Diffstat (limited to 'src/superio/winbond/w83627ehg/superio.c')
-rw-r--r-- | src/superio/winbond/w83627ehg/superio.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/superio/winbond/w83627ehg/superio.c b/src/superio/winbond/w83627ehg/superio.c index e0eea1b574..a94c4c0030 100644 --- a/src/superio/winbond/w83627ehg/superio.c +++ b/src/superio/winbond/w83627ehg/superio.c @@ -72,14 +72,14 @@ static void init_acpi(device_t dev) int power_on = 1; get_option(&power_on, "power_on_after_fail"); - pnp_enter_ext_func_mode(dev); + pnp_enter_conf_mode(dev); pnp_set_logical_device(dev); value = pnp_read_config(dev, 0xe4); value &= ~(3 << 5); if (power_on) value |= (1 << 5); pnp_write_config(dev, 0xe4, value); - pnp_exit_ext_func_mode(dev); + pnp_exit_conf_mode(dev); } static void init_hwm(u16 base) @@ -129,39 +129,40 @@ static void w83627ehg_init(device_t dev) static void w83627ehg_pnp_set_resources(device_t dev) { - pnp_enter_ext_func_mode(dev); pnp_set_resources(dev); - pnp_exit_ext_func_mode(dev); } static void w83627ehg_pnp_enable_resources(device_t dev) { - pnp_enter_ext_func_mode(dev); pnp_enable_resources(dev); + pnp_enter_conf_mode(dev); switch (dev->path.pnp.device) { case W83627EHG_HWM: printk(BIOS_DEBUG, "W83627EHG HWM SMBus enabled\n"); enable_hwm_smbus(dev); break; } - - pnp_exit_ext_func_mode(dev); + pnp_exit_conf_mode(dev); } static void w83627ehg_pnp_enable(device_t dev) { - pnp_enter_ext_func_mode(dev); pnp_alt_enable(dev); - pnp_exit_ext_func_mode(dev); } +static const struct pnp_mode_ops pnp_conf_mode_ops = { + .enter_conf_mode = pnp_enter_ext_func_mode, + .exit_conf_mode = pnp_exit_ext_func_mode, +}; + static struct device_operations ops = { .read_resources = pnp_read_resources, .set_resources = w83627ehg_pnp_set_resources, .enable_resources = w83627ehg_pnp_enable_resources, .enable = w83627ehg_pnp_enable, .init = w83627ehg_init, + .ops_pnp_mode = &pnp_conf_mode_ops, }; static struct pnp_info pnp_dev_info[] = { |