From 8e5435a74bfffb92bc2293e199d28e55494485d8 Mon Sep 17 00:00:00 2001 From: Trevor Mosey Date: Fri, 2 May 2014 16:11:50 -0500 Subject: lenovo/t60: Move mainboard_enable() code into a mainboard_init() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-on: http://review.coreboot.org/5637 Tested-by: build bot (Jenkins) Reviewed-by: Kyösti Mälkki Reviewed-by: Edward O'Callaghan Reviewed-by: Paul Menzel Reviewed-by: Patrick Georgi --- src/mainboard/lenovo/t60/mainboard.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/mainboard') 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, }; -- cgit v1.2.3