diff options
author | Edward O'Callaghan <eocallaghan@alterapraxis.com> | 2014-08-06 21:32:50 +1000 |
---|---|---|
committer | Edward O'Callaghan <eocallaghan@alterapraxis.com> | 2014-08-23 05:31:03 +0200 |
commit | d2da65e3abd93840c81fbc30c6488b625baf359b (patch) | |
tree | 117748994109296f57629615ba1e926c9b847acd /src/superio/smsc/sch4037/superio.c | |
parent | 47b8075bb14de4dad4cfd2c2f42482e04644b28d (diff) |
superio/smsc/sch4037: Cleanup and fix .c inclusion
Clean up both ram and rom stage support and fix board to match.
Change-Id: I55e3e7338c0551f0fb663eb9707f16ecdc1aca35
Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-on: http://review.coreboot.org/6509
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/superio/smsc/sch4037/superio.c')
-rw-r--r-- | src/superio/smsc/sch4037/superio.c | 43 |
1 files changed, 16 insertions, 27 deletions
diff --git a/src/superio/smsc/sch4037/superio.c b/src/superio/smsc/sch4037/superio.c index 35df43126f..ad8d8b4219 100644 --- a/src/superio/smsc/sch4037/superio.c +++ b/src/superio/smsc/sch4037/superio.c @@ -24,20 +24,23 @@ #include <device/pnp.h> #include <superio/conf_mode.h> #include <console/console.h> -#include <device/smbus.h> -#include <string.h> #include <pc80/keyboard.h> #include <stdlib.h> + #include "sch4037.h" -/* Forward declarations */ -static void enable_dev(device_t dev); -static void sch4037_init(device_t dev); +static void sch4037_init(device_t dev) +{ + if (!dev->enabled) { + return; + } -struct chip_operations superio_smsc_sch4037_ops = { - CHIP_NAME("SMSC SCH4037 Super I/O") - .enable_dev = enable_dev, -}; + switch(dev->path.pnp.device) { + case SCH4037_KBC: + pc_keyboard_init(); + break; + } +} static struct device_operations ops = { .read_resources = pnp_read_resources, @@ -54,24 +57,10 @@ static struct pnp_info pnp_dev_info[] = { static void enable_dev(device_t dev) { - printk(BIOS_SPEW, "file '%s',line %d, %s()\n", __FILE__, __LINE__, __func__); pnp_enable_devices(dev, &pnp_ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info); } -static void sch4037_init(device_t dev) -{ - struct resource *res0, *res1; - - if (!dev->enabled) { - return; - } - - switch(dev->path.pnp.device) { - - case SCH4037_KBC: - res0 = find_resource(dev, PNP_IDX_IO0); - res1 = find_resource(dev, PNP_IDX_IO1); - pc_keyboard_init(); - break; - } -} +struct chip_operations superio_smsc_sch4037_ops = { + CHIP_NAME("SMSC SCH4037 Super I/O") + .enable_dev = enable_dev, +}; |