summaryrefslogtreecommitdiff
path: root/src/lib/hardwaremain.c
diff options
context:
space:
mode:
authorMarc Jones <marc.jones@se-eng.com>2013-10-29 17:32:00 -0600
committerMarc Jones <marc.jones@se-eng.com>2013-11-08 19:55:17 +0100
commit2a58ecde78350902ac47145a3f2dba063bce3375 (patch)
tree346baf64bf874418a0a1a8d242bfed89959ff1d7 /src/lib/hardwaremain.c
parent86655cf835900d54569a867de05e56ccd71db879 (diff)
Add new finalize functions for devices and chips
Many chipset devices require additional configuration after device init. It is not uncommmon for a device early in the devicetree list to need to change a setting after a device later in the tree does PCI init. A final function call has been added to device ops to handle this case. It is called prior to coreboot table setup. Another problem that is often seen is that the chipset or mainboard need to do some final cleanup just before loading the OS. The chip finalize has been added for this case. It is call after all coreboot tables are setup and the payload is ready to be called. Similar functionality could be implemented with the hardwaremain states, but those don't fit well in the device tree function pointer structure and should be used sparingly. Change-Id: Ib37cce104ae41ec225a8502942d85e54d99ea75f Signed-off-by: Marc Jones <marc.jones@se-eng.com> Reviewed-on: http://review.coreboot.org/4012 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@google.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'src/lib/hardwaremain.c')
-rw-r--r--src/lib/hardwaremain.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/hardwaremain.c b/src/lib/hardwaremain.c
index a5993c41dc..501591f114 100644
--- a/src/lib/hardwaremain.c
+++ b/src/lib/hardwaremain.c
@@ -175,6 +175,7 @@ static boot_state_t bs_dev_init(void *arg)
static boot_state_t bs_post_device(void *arg)
{
+ dev_finalize();
timestamp_add_now(TS_DEVICE_DONE);
timestamp_reinit();
@@ -217,6 +218,8 @@ static boot_state_t bs_write_tables(void *arg)
*/
write_tables();
+ dev_finalize_chips();
+
return BS_PAYLOAD_LOAD;
}