Remove superfluous Super I/O res0/res1 lines.
[coreboot.git] / src / superio / winbond / w83627dhg / superio.c
index 383f9a5681799618b6376aaef2f14aadd5ca9f38..b94f4fee1b51ba66c4704b2f19a8f0586f8f5133 100644 (file)
@@ -39,14 +39,12 @@ static void pnp_exit_ext_func_mode(device_t dev)
 
 static void w83627dhg_init(device_t dev)
 {
-       struct superio_winbond_w83627dhg_config *conf;
-       struct resource *res0, *res1;
+       struct superio_winbond_w83627dhg_config *conf = dev->chip_info;
+       struct resource *res0;
 
        if (!dev->enabled)
                return;
 
-       conf = dev->chip_info;
-
        switch(dev->path.pnp.device) {
        case W83627DHG_SP1:
                res0 = find_resource(dev, PNP_IDX_IO0);
@@ -57,9 +55,7 @@ static void w83627dhg_init(device_t dev)
                init_uart8250(res0->base, &conf->com2);
                break;
        case W83627DHG_KBC:
-               res0 = find_resource(dev, PNP_IDX_IO0);
-               res1 = find_resource(dev, PNP_IDX_IO1);
-               init_pc_keyboard(res0->base, res1->base, &conf->keyboard);
+               pc_keyboard_init(&conf->keyboard);
                break;
        }
 }
@@ -103,8 +99,8 @@ static struct pnp_info pnp_dev_info[] = {
        { &ops, W83627DHG_SP1, PNP_IO0 | PNP_IRQ0, { 0xff8, 0 }, },
        { &ops, W83627DHG_SP2, PNP_IO0 | PNP_IRQ0, { 0xff8, 0 }, },
        { &ops, W83627DHG_KBC, PNP_IO0 | PNP_IO1 | PNP_IRQ0 | PNP_IRQ1, { 0xfff, 0 }, { 0xfff, 0x4}, },
-       // the next line makes coreboot hang in pnp_enable_devices()
-       // { &ops, W83627DHG_SPI, PNP_IO1, { 0xff8, 0 }, },
+       /* the next line makes coreboot hang in pnp_enable_devices() */
+       /* { &ops, W83627DHG_SPI, PNP_IO1, { 0xff8, 0 }, }, */
        { &ops, W83627DHG_GPIO6, },
        { &ops, W83627DHG_WDTO_PLED, },
        { &ops, W83627DHG_GPIO2345, },