- int i;
-
- /* (1) Enter the configuration state (MB PnP mode). */
-
- /* Perform MB PnP setup to put the SIO chip at 0x3f0. */
- /* Base address 0x3f0: 0x86 0x80 0x55 0x55. */
- /* Base address 0x3bd: 0x86 0x80 0x55 0xaa. */
- /* Base address 0x370: 0x86 0x80 0xaa 0x55. */
- outb(0x86, IT8661F_CONFIGURATION_PORT);
- outb(0x80, IT8661F_CONFIGURATION_PORT);
- outb(0x55, IT8661F_CONFIGURATION_PORT);
- outb(0x55, IT8661F_CONFIGURATION_PORT);
-
- /* Sequentially write the 32 special values. */
- for (i = 0; i < 32; i++)
- outb(init_values[i], SIO_BASE);
-
- /* (2) Modify the data of configuration registers. */
-
- /*
- * Allow all devices to be enabled. Bits: FDC (0), Com1 (1), Com2 (2),
- * PP (3), IR (4). Bits 5-7 are reserved.
- */
- it8661f_sio_write(0x00, IT8661F_CONFIG_REG_LDE, 0x1f);
-
- /* Enable serial port(s). */
- it8661f_sio_write(IT8661F_SP1, 0x30, 0x1); /* Serial port 1 */
- it8661f_sio_write(IT8661F_SP2, 0x30, 0x1); /* Serial port 2 */
-
- /* Select 24MHz CLKIN (clear bit 1) and clear software suspend mode
- (clear bit 0). */
- it8661f_sio_write(0x00, IT8661F_CONFIG_REG_SWSUSP, 0x00);
-
- /* (3) Exit the configuration state (MB PnP mode). */
- it8661f_sio_write(0x00, IT8661F_CONFIG_REG_CC, 0x02);
+ pnp_enter_ext_func_mode(dev);
+ pnp_set_logical_device(dev);
+ pnp_set_enable(dev, 0);
+ pnp_set_iobase(dev, PNP_IDX_IO0, iobase);
+ pnp_set_enable(dev, 1);
+ pnp_exit_ext_func_mode(dev);