drop runtime configuration checking layer from the code. 

Don't check for errors we can't handle gracefully anyways.
It's always better to try initializing the keyboard controller
when IO in the device tree is != 0x60/0x64 than to just drop out.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>


Index: src/mainboard/emulation/qemu-x86/mainboard.c
===================================================================
--- src/mainboard/emulation/qemu-x86/mainboard.c	(revision 4842)
+++ src/mainboard/emulation/qemu-x86/mainboard.c	(working copy)
@@ -24,7 +24,7 @@
 	/* This sneaked in here, because Qemu does not
 	 * emulate a SuperIO chip
 	 */
-	init_pc_keyboard(0x60, 0x64, 0);
+	pc_keyboard_init(0);
 
 	/* The PIRQ table is not working well for interrupt routing purposes. 
 	 * so we'll just set the IRQ directly. 
Index: src/superio/winbond/w83627thf/superio.c
===================================================================
--- src/superio/winbond/w83627thf/superio.c	(revision 4842)
+++ src/superio/winbond/w83627thf/superio.c	(working copy)
@@ -49,7 +49,7 @@
 	case W83627THF_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;
 	}
 }
Index: src/superio/winbond/w83977tf/superio.c
===================================================================
--- src/superio/winbond/w83977tf/superio.c	(revision 4842)
+++ src/superio/winbond/w83977tf/superio.c	(working copy)
@@ -56,7 +56,7 @@
 	case W83977TF_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;
 	}
 }
Index: src/superio/winbond/w83627dhg/superio.c
===================================================================
--- src/superio/winbond/w83627dhg/superio.c	(revision 4842)
+++ src/superio/winbond/w83627dhg/superio.c	(working copy)
@@ -59,7 +59,7 @@
 	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;
 	}
 }
Index: src/superio/winbond/w83627thg/superio.c
===================================================================
--- src/superio/winbond/w83627thg/superio.c	(revision 4842)
+++ src/superio/winbond/w83627thg/superio.c	(working copy)
@@ -48,7 +48,7 @@
 	case W83627THG_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;
 	}
 }
Index: src/superio/winbond/w83627ehg/superio.c
===================================================================
--- src/superio/winbond/w83627ehg/superio.c	(revision 4842)
+++ src/superio/winbond/w83627ehg/superio.c	(working copy)
@@ -124,7 +124,7 @@
 	case W83627EHG_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;
 	case W83627EHG_HWM:
 		res0 = find_resource(dev, PNP_IDX_IO0);
Index: src/superio/winbond/w83627uhg/superio.c
===================================================================
--- src/superio/winbond/w83627uhg/superio.c	(revision 4842)
+++ src/superio/winbond/w83627uhg/superio.c	(working copy)
@@ -113,7 +113,7 @@
 	case W83627UHG_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;
 	}
 }
Index: src/superio/winbond/w83627hf/superio.c
===================================================================
--- src/superio/winbond/w83627hf/superio.c	(revision 4842)
+++ src/superio/winbond/w83627hf/superio.c	(working copy)
@@ -116,7 +116,7 @@
 	case W83627HF_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;
 	case W83627HF_HWM:
 		res0 = find_resource(dev, PNP_IDX_IO0);
Index: src/superio/winbond/w83977f/superio.c
===================================================================
--- src/superio/winbond/w83977f/superio.c	(revision 4842)
+++ src/superio/winbond/w83977f/superio.c	(working copy)
@@ -61,7 +61,7 @@
 	case W83977F_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;
 	}
 }
Index: src/superio/ite/it8712f/superio.c
===================================================================
--- src/superio/ite/it8712f/superio.c	(revision 4842)
+++ src/superio/ite/it8712f/superio.c	(working copy)
@@ -78,7 +78,7 @@
 		res0 = find_resource(dev, PNP_IDX_IO0);
 		res1 = find_resource(dev, PNP_IDX_IO1);
 		set_kbc_ps2_mode();
-		init_pc_keyboard(res0->base, res1->base, &conf->keyboard);
+		pc_keyboard_init(&conf->keyboard);
 		break;
 	case IT8712F_KBCM: /* TODO. */
 		break;
Index: src/superio/ite/it8671f/superio.c
===================================================================
--- src/superio/ite/it8671f/superio.c	(revision 4842)
+++ src/superio/ite/it8671f/superio.c	(working copy)
@@ -53,7 +53,7 @@
 	case IT8671F_KBCK:
 		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;
 	case IT8671F_KBCM: /* TODO. */
 		break;
Index: src/superio/ite/it8716f/superio.c
===================================================================
--- src/superio/ite/it8716f/superio.c	(revision 4842)
+++ src/superio/ite/it8716f/superio.c	(working copy)
@@ -112,7 +112,7 @@
 	case IT8716F_KBCK:
 		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;
 	}
 }
Index: src/superio/ite/it8673f/superio.c
===================================================================
--- src/superio/ite/it8673f/superio.c	(revision 4842)
+++ src/superio/ite/it8673f/superio.c	(working copy)
@@ -55,7 +55,7 @@
 	case IT8673F_KBCK:
 		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;
 	case IT8673F_KBCM: /* TODO. */
 		break;
Index: src/superio/ite/it8718f/superio.c
===================================================================
--- src/superio/ite/it8718f/superio.c	(revision 4842)
+++ src/superio/ite/it8718f/superio.c	(working copy)
@@ -55,7 +55,7 @@
 	case IT8718F_KBCK:
 		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;
 	case IT8718F_KBCM: /* TODO. */
 		break;
Index: src/superio/nsc/pc87366/superio.c
===================================================================
--- src/superio/nsc/pc87366/superio.c	(revision 4842)
+++ src/superio/nsc/pc87366/superio.c	(working copy)
@@ -37,7 +37,7 @@
 	case PC87366_KBCK:
 		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;
 	}
 }
Index: src/superio/nsc/pc8374/superio.c
===================================================================
--- src/superio/nsc/pc8374/superio.c	(revision 4842)
+++ src/superio/nsc/pc8374/superio.c	(working copy)
@@ -37,7 +37,7 @@
 	case PC8374_KBCK:
 		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;
 	}
 }
Index: src/superio/nsc/pc87351/superio.c
===================================================================
--- src/superio/nsc/pc87351/superio.c	(revision 4842)
+++ src/superio/nsc/pc87351/superio.c	(working copy)
@@ -43,7 +43,7 @@
 	case PC87351_KBCK:
 		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;
 	}
 }
Index: src/superio/nsc/pc87360/superio.c
===================================================================
--- src/superio/nsc/pc87360/superio.c	(revision 4842)
+++ src/superio/nsc/pc87360/superio.c	(working copy)
@@ -37,7 +37,7 @@
 	case PC87360_KBCK:
 		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;
 	}
 }
Index: src/superio/nsc/pc97307/superio.c
===================================================================
--- src/superio/nsc/pc97307/superio.c	(revision 4842)
+++ src/superio/nsc/pc97307/superio.c	(working copy)
@@ -38,7 +38,7 @@
 
 		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;
 
 	case PC97307_FDC:
Index: src/superio/nsc/pc87309/superio.c
===================================================================
--- src/superio/nsc/pc87309/superio.c	(revision 4842)
+++ src/superio/nsc/pc87309/superio.c	(working copy)
@@ -48,7 +48,7 @@
 	case PC87309_KBCK:
 		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;
 	}
 }
Index: src/superio/nsc/pc87417/superio.c
===================================================================
--- src/superio/nsc/pc87417/superio.c	(revision 4842)
+++ src/superio/nsc/pc87417/superio.c	(working copy)
@@ -39,7 +39,7 @@
 	case PC87417_KBCK:
 		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;
 	}
 }
Index: src/superio/nsc/pc97317/superio.c
===================================================================
--- src/superio/nsc/pc97317/superio.c	(revision 4842)
+++ src/superio/nsc/pc97317/superio.c	(working copy)
@@ -38,7 +38,7 @@
 
 		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;
 
 #if 0
Index: src/superio/nsc/pc87427/superio.c
===================================================================
--- src/superio/nsc/pc87427/superio.c	(revision 4842)
+++ src/superio/nsc/pc87427/superio.c	(working copy)
@@ -36,7 +36,7 @@
 	case PC87427_KBCK:
 		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;
 	}
 }
Index: src/superio/smsc/lpc47m10x/superio.c
===================================================================
--- src/superio/smsc/lpc47m10x/superio.c	(revision 4842)
+++ src/superio/smsc/lpc47m10x/superio.c	(working copy)
@@ -152,7 +152,7 @@
 	case LPC47M10X2_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;
 	}
 }
Index: src/superio/smsc/fdc37m60x/superio.c
===================================================================
--- src/superio/smsc/fdc37m60x/superio.c	(revision 4842)
+++ src/superio/smsc/fdc37m60x/superio.c	(working copy)
@@ -53,7 +53,7 @@
 	case FDC37M60X_KBCK:
 		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;
 	case FDC37M60X_AUX: /* TODO. */
 		break;
Index: src/superio/smsc/lpc47b272/superio.c
===================================================================
--- src/superio/smsc/lpc47b272/superio.c	(revision 4842)
+++ src/superio/smsc/lpc47b272/superio.c	(working copy)
@@ -154,7 +154,7 @@
 	case LPC47B272_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;
 	}
 }
Index: src/superio/smsc/smscsuperio/superio.c
===================================================================
--- src/superio/smsc/smscsuperio/superio.c	(revision 4842)
+++ src/superio/smsc/smscsuperio/superio.c	(working copy)
@@ -230,7 +230,7 @@
 	} else if (ld == logical_device_table[i].devs[LD_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);
 	}
 }
 
Index: src/superio/smsc/lpc47b397/superio.c
===================================================================
--- src/superio/smsc/lpc47b397/superio.c	(revision 4842)
+++ src/superio/smsc/lpc47b397/superio.c	(working copy)
@@ -68,7 +68,7 @@
 	case LPC47B397_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;
 	}
 
Index: src/northbridge/via/cx700/cx700_lpc.c
===================================================================
--- src/northbridge/via/cx700/cx700_lpc.c	(revision 4842)
+++ src/northbridge/via/cx700/cx700_lpc.c	(working copy)
@@ -384,7 +384,7 @@
 	isa_dma_init();
 
 	/* Initialize keyboard controller */
-	init_pc_keyboard(0x60, 0x64, 0);
+	pc_keyboard_init(0);
 }
 
 static struct device_operations cx700_lpc_ops = {
Index: src/northbridge/via/vx800/vx800_lpc.c
===================================================================
--- src/northbridge/via/vx800/vx800_lpc.c	(revision 4842)
+++ src/northbridge/via/vx800/vx800_lpc.c	(working copy)
@@ -342,7 +342,7 @@
 	setup_i8259();		// make sure interupt controller is configured before keyboard init
 
 	/* turn on keyboard and RTC, no need to visit this reg twice */
-	init_pc_keyboard(0x60, 0x64, 0);
+	pc_keyboard_init(0);
 	printk_debug
 	    ("ps2 usb lid, you  set who can wakeup system from s3 sleep\n");
 	S3_ps2_kb_ms_wakeup(dev);
Index: src/southbridge/via/vt8237r/vt8237r_lpc.c
===================================================================
--- src/southbridge/via/vt8237r/vt8237r_lpc.c	(revision 4842)
+++ src/southbridge/via/vt8237r/vt8237r_lpc.c	(working copy)
@@ -615,7 +615,7 @@
 {
 	u8 regval = pci_read_config8(dev, 0x51);
 	if (regval & 0x1)
-		init_pc_keyboard(0x60, 0x64, 0);
+		pc_keyboard_init(0);
 }
 
 static void southbridge_init_common(struct device *dev)
Index: src/southbridge/via/vt8231/vt8231.c
===================================================================
--- src/southbridge/via/vt8231/vt8231.c	(revision 4842)
+++ src/southbridge/via/vt8231/vt8231.c	(working copy)
@@ -26,7 +26,7 @@
 		regval |= 0x0f; 
 		pci_write_config8(lpc_dev, 0x51, regval);
 	}
-	init_pc_keyboard(0x60, 0x64, 0);
+	pc_keyboard_init(0);
 }
 
 static void com_port_on(void)
Index: src/southbridge/via/vt8235/vt8235.c
===================================================================
--- src/southbridge/via/vt8235/vt8235.c	(revision 4842)
+++ src/southbridge/via/vt8235/vt8235.c	(working copy)
@@ -26,7 +26,7 @@
 	regval &= 0xfd;
 	pci_write_config8(dev, 0x51, regval);
 
-	init_pc_keyboard(0x60, 0x64, 0);
+	pc_keyboard_init(0);
 }
 
 void dump_south(device_t dev0)
Index: src/southbridge/sis/sis966/sis966_lpc.c
===================================================================
--- src/southbridge/sis/sis966/sis966_lpc.c	(revision 4842)
+++ src/southbridge/sis/sis966/sis966_lpc.c	(working copy)
@@ -171,7 +171,7 @@
 	 int nmi_option;
 
         printk_debug("LPC_INIT -------->\n");
-        init_pc_keyboard(0x60, 0x64, 0);
+        pc_keyboard_init(0);
 
         lpc_usb_legacy_init(dev);
 	 lpc_common_init(dev);
Index: src/pc80/keyboard.c
===================================================================
--- src/pc80/keyboard.c	(revision 4842)
+++ src/pc80/keyboard.c	(working copy)
@@ -159,7 +159,7 @@
 	return regval;
 }
 
-static void pc_keyboard_init(struct pc_keyboard *keyboard)
+void pc_keyboard_init(struct pc_keyboard *keyboard)
 {
 	u8 regval;
 	printk_debug("Keyboard init...\n");
@@ -242,16 +242,6 @@
 	}
 }
 
-
-void init_pc_keyboard(unsigned port0, unsigned port1, struct pc_keyboard *kbd)
-{
-	if ((port0 == 0x60) && (port1 == 0x64)) {
-		pc_keyboard_init(kbd);
-	} else {
-		printk_warning("Unsupported keyboard controller.\n");
-	}
-}
-
 /*
  * Support PS/2 mode -  oddball SIOs(KBC) need this setup
  * Not well documented. Google - 0xcb keyboard controller
Index: src/include/pc80/keyboard.h
===================================================================
--- src/include/pc80/keyboard.h	(revision 4842)
+++ src/include/pc80/keyboard.h	(working copy)
@@ -5,7 +5,7 @@
 	/* No initialization parameters for now */
 };
 
-void init_pc_keyboard(unsigned port0, unsigned port1, struct pc_keyboard *kbd);
+void pc_keyboard_init(struct pc_keyboard *keyboard);
 void set_kbc_ps2_mode(void);
 
 #endif /* PC80_KEYBOARD_H */
