summaryrefslogtreecommitdiff
path: root/src/superio/smsc/lpc47b272
diff options
context:
space:
mode:
authorEdward O'Callaghan <eocallaghan@alterapraxis.com>2015-01-04 16:35:43 +1100
committerEdward O'Callaghan <eocallaghan@alterapraxis.com>2015-01-04 13:49:01 +0100
commit9e687a62b1ed6322ed13ebe21602fa80027cdd34 (patch)
tree0dd358519bbe4b41c61697ee8540ce8cf7349532 /src/superio/smsc/lpc47b272
parent520a328e5a6c0185b6735ff68c0e166ba9a4d36d (diff)
superio/smsc/lpc47b272/superio.c: Remove dead code
Remove dead debug code, we have superiotool for this reason. Restructure file to be consistent with other superio's thereby avoiding forward declarations of functions. Change-Id: I44272b4e30a2bc8c3a719df17b837432cd38429c Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Reviewed-on: http://review.coreboot.org/8083 Tested-by: build bot (Jenkins) Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Diffstat (limited to 'src/superio/smsc/lpc47b272')
-rw-r--r--src/superio/smsc/lpc47b272/superio.c91
1 files changed, 23 insertions, 68 deletions
diff --git a/src/superio/smsc/lpc47b272/superio.c b/src/superio/smsc/lpc47b272/superio.c
index 4fac022ce2..ef00cc7642 100644
--- a/src/superio/smsc/lpc47b272/superio.c
+++ b/src/superio/smsc/lpc47b272/superio.c
@@ -34,15 +34,26 @@
#include <stdlib.h>
#include "lpc47b272.h"
-/* Forward declarations */
-static void enable_dev(struct device *dev);
-static void lpc47b272_init(struct device *dev);
-// static void dump_pnp_device(struct device *dev);
+/**
+ * Initialize the specified Super I/O device.
+ *
+ * Devices other than COM ports and the keyboard controller are ignored.
+ * For COM ports, we configure the baud rate.
+ *
+ * @param dev Pointer to structure describing a Super I/O device.
+ */
+static void lpc47b272_init(struct device *dev)
+{
-struct chip_operations superio_smsc_lpc47b272_ops = {
- CHIP_NAME("SMSC LPC47B272 Super I/O")
- .enable_dev = enable_dev
-};
+ if (!dev->enabled)
+ return;
+
+ switch(dev->path.pnp.device) {
+ case LPC47B272_KBC:
+ pc_keyboard_init();
+ break;
+ }
+}
static struct device_operations ops = {
.read_resources = pnp_read_resources,
@@ -74,63 +85,7 @@ static void enable_dev(struct device *dev)
pnp_dev_info);
}
-/**
- * Initialize the specified Super I/O device.
- *
- * Devices other than COM ports and the keyboard controller are ignored.
- * For COM ports, we configure the baud rate.
- *
- * @param dev Pointer to structure describing a Super I/O device.
- */
-static void lpc47b272_init(struct device *dev)
-{
-
- if (!dev->enabled)
- return;
-
- switch(dev->path.pnp.device) {
- case LPC47B272_KBC:
- pc_keyboard_init();
- break;
- }
-}
-
-#if 0
-/**
- * Print the values of all of the LPC47B272's configuration registers.
- *
- * NOTE: The LPC47B272 must be in config mode when this function is called.
- *
- * @param dev Pointer to structure describing a Super I/O device.
- */
-static void dump_pnp_device(struct device *dev)
-{
- int i;
- print_debug("\n");
-
- for (i = 0; i <= LPC47B272_MAX_CONFIG_REGISTER; i++) {
- u8 register_value;
-
- if ((i & 0x0f) == 0) {
- print_debug_hex8(i);
- print_debug_char(':');
- }
-
- /*
- * Skip over 'register' that would cause exit from
- * configuration mode.
- */
- if (i == 0xaa)
- register_value = 0xaa;
- else
- register_value = pnp_read_config(dev, i);
-
- print_debug_char(' ');
- print_debug_hex8(register_value);
- if ((i & 0x0f) == 0x0f)
- print_debug("\n");
- }
-
- print_debug("\n");
-}
-#endif
+struct chip_operations superio_smsc_lpc47b272_ops = {
+ CHIP_NAME("SMSC LPC47B272 Super I/O")
+ .enable_dev = enable_dev
+};