[coreboot-gerrit] Patch set updated for coreboot: 3e523bf src/superio/smsc/lpc47m10x/superio.c: Remove dead code

Edward O'Callaghan (eocallaghan@alterapraxis.com) gerrit at coreboot.org
Sun Jan 4 08:11:05 CET 2015


Edward O'Callaghan (eocallaghan at alterapraxis.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/8082

-gerrit

commit 3e523bf17f14e376791ffedd223bf3597851030b
Author: Edward O'Callaghan <eocallaghan at alterapraxis.com>
Date:   Sun Jan 4 16:28:37 2015 +1100

    src/superio/smsc/lpc47m10x/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: Ief60d3f54c508cbb7795b284b59710d2c0e3018b
    Signed-off-by: Edward O'Callaghan <eocallaghan at alterapraxis.com>
---
 src/superio/smsc/lpc47m10x/superio.c | 90 +++++++++---------------------------
 1 file changed, 22 insertions(+), 68 deletions(-)

diff --git a/src/superio/smsc/lpc47m10x/superio.c b/src/superio/smsc/lpc47m10x/superio.c
index 8530056..4cd9a8b 100644
--- a/src/superio/smsc/lpc47m10x/superio.c
+++ b/src/superio/smsc/lpc47m10x/superio.c
@@ -33,15 +33,25 @@
 #include <stdlib.h>
 #include "lpc47m10x.h"
 
-/* Forward declarations */
-static void enable_dev(struct device *dev);
-static void lpc47m10x_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 lpc47m10x_init(struct device *dev)
+{
+	if (!dev->enabled)
+		return;
 
-struct chip_operations superio_smsc_lpc47m10x_ops = {
-	CHIP_NAME("SMSC LPC47M10x Super I/O")
-	.enable_dev = enable_dev
-};
+	switch(dev->path.pnp.device) {
+	case LPC47M10X2_KBC:
+		pc_keyboard_init();
+		break;
+	}
+}
 
 static struct device_operations ops = {
 	.read_resources   = pnp_read_resources,
@@ -73,63 +83,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 lpc47m10x_init(struct device *dev)
-{
-
-	if (!dev->enabled)
-		return;
-
-	switch(dev->path.pnp.device) {
-	case LPC47M10X2_KBC:
-		pc_keyboard_init();
-		break;
-	}
-}
-
-#if 0
-/**
- * Print the values of all of the LPC47M10X2's configuration registers.
- *
- * NOTE: The LPC47M10X2 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 <= LPC47M10X2_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_lpc47m10x_ops = {
+	CHIP_NAME("SMSC LPC47M10x Super I/O")
+	.enable_dev = enable_dev
+};



More information about the coreboot-gerrit mailing list