summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Stuge <peter@stuge.se>2013-07-06 20:05:13 +0200
committerRonald G. Minnich <rminnich@gmail.com>2013-07-13 04:58:22 +0200
commiteac991629f40bdb0d0d80319249dd378a295e6fa (patch)
tree3bf9005271c5eb4c4dd54aee8160d8f86ce4112e
parent9478297afb0bad081798e716edf29a00f1ef71a1 (diff)
downloadcoreboot-eac991629f40bdb0d0d80319249dd378a295e6fa.tar.xz
lenovo/x60: Move mainboard_enable() code into a mainboard_init()
mainboard_enable() is now modelled after google/parrot where the enable function only sets dev->ops->init for the root device to point to a mainboard_init() function, which in turn is called in a later pass over the device tree to do the actual initialization. Change-Id: Iaf9187532a1e432b991260201b95dda85cc312c5 Signed-off-by: Peter Stuge <peter@stuge.se> Reviewed-on: http://review.coreboot.org/3619 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
-rw-r--r--src/mainboard/lenovo/x60/mainboard.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mainboard/lenovo/x60/mainboard.c b/src/mainboard/lenovo/x60/mainboard.c
index d2d0733487..b344ccb364 100644
--- a/src/mainboard/lenovo/x60/mainboard.c
+++ b/src/mainboard/lenovo/x60/mainboard.c
@@ -85,7 +85,7 @@ int get_cst_entries(acpi_cstate_t **entries)
return ARRAY_SIZE(cst_entries);
}
-static void mainboard_enable(device_t dev)
+static void mainboard_init(device_t dev)
{
device_t dev0, idedev, sdhci_dev;
@@ -133,6 +133,11 @@ static void mainboard_enable(device_t dev)
}
}
+static void mainboard_enable(device_t dev)
+{
+ dev->ops->init = mainboard_init;
+}
+
struct chip_operations mainboard_ops = {
.enable_dev = mainboard_enable,
};