aboutsummaryrefslogtreecommitdiff
path: root/src/mainboard/lenovo/t60
diff options
context:
space:
mode:
authorTrevor Mosey <uberushaximus@gmail.com>2014-05-02 16:11:50 -0500
committerPatrick Georgi <patrick@georgi-clan.de>2014-05-05 08:46:16 +0200
commit8e5435a74bfffb92bc2293e199d28e55494485d8 (patch)
tree837214e00ed978dd7c27844248dcbdf1575aa1bd /src/mainboard/lenovo/t60
parentae16d3dfbd2eb5bfd0cbaa8b63c16e35ee39261d (diff)
lenovo/t60: 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: I89a5192bd45ca8321b2b1ac49b073122e0f6ee2b Signed-off-by: Trevor Mosey <uberushaximus@gmail.com> Reviewed-on: http://review.coreboot.org/5637 Tested-by: build bot (Jenkins) Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
Diffstat (limited to 'src/mainboard/lenovo/t60')
-rw-r--r--src/mainboard/lenovo/t60/mainboard.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mainboard/lenovo/t60/mainboard.c b/src/mainboard/lenovo/t60/mainboard.c
index bfdbef60c4..623031a77f 100644
--- a/src/mainboard/lenovo/t60/mainboard.c
+++ b/src/mainboard/lenovo/t60/mainboard.c
@@ -46,7 +46,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)
{
struct southbridge_intel_i82801gx_config *config;
device_t dev0, idedev;
@@ -78,6 +78,11 @@ static void mainboard_enable(device_t dev)
ec_write(0x0c, inb(0x164c) & 8 ? 0x89 : 0x09);
}
+static void mainboard_enable(device_t dev)
+{
+ dev->ops->init = mainboard_init;
+}
+
struct chip_operations mainboard_ops = {
.enable_dev = mainboard_enable,
};