diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2015-02-27 17:11:06 +0800 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2015-03-04 13:06:11 +1100 |
commit | a6d1a207db2967d43d4c286726ea3b843e3746ab (patch) | |
tree | 139dea4d8b06c347e26b8a67eb6882b09cc0602d | |
parent | f305e3f706e4a8f518919221f9d4994a4567b447 (diff) | |
download | skiboot-a6d1a207db2967d43d4c286726ea3b843e3746ab.zip skiboot-a6d1a207db2967d43d4c286726ea3b843e3746ab.tar.gz skiboot-a6d1a207db2967d43d4c286726ea3b843e3746ab.tar.bz2 |
core: Move hservices_init to platform code
We don't want to call hservices_init on machines that use the PRD, as
they expect to relocate the hbrt code later. This change moves the
hservices_init call out of the common path, and into the firenze
platform init.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
-rw-r--r-- | core/init.c | 4 | ||||
-rw-r--r-- | platforms/ibm-fsp/firenze.c | 17 |
2 files changed, 16 insertions, 5 deletions
diff --git a/core/init.c b/core/init.c index c942319..ac61c37 100644 --- a/core/init.c +++ b/core/init.c @@ -42,7 +42,6 @@ #include <fsi-master.h> #include <centaur.h> #include <libfdt/libfdt.h> -#include <hostservices.h> #include <timer.h> #include <ipmi.h> @@ -591,9 +590,6 @@ void __noreturn main_cpu_entry(const void *fdt, u32 master_cpu) /* Reserve HOMER and OCC area */ homer_init(); - /* Initialize host services. */ - hservices_init(); - /* Add the /opal node to the device-tree */ add_opal_node(); diff --git a/platforms/ibm-fsp/firenze.c b/platforms/ibm-fsp/firenze.c index 258a6b3..30fe1c7 100644 --- a/platforms/ibm-fsp/firenze.c +++ b/platforms/ibm-fsp/firenze.c @@ -21,6 +21,7 @@ #include <pci.h> #include <pci-cfg.h> #include <chip.h> +#include <hostservices.h> #include "ibm-fsp.h" #include "lxvpd.h" @@ -384,10 +385,24 @@ static uint32_t ibm_fsp_occ_timeout(void) return 60; } +static void firenze_init(void) +{ + /* We call hservices_init to relocate the hbrt image now, as the FSP + * may request an OCC load any time after ibm_fsp_init. + */ + hservices_init(); + + ibm_fsp_init(); + + /* Preload hostservices lids */ + hservices_lid_preload(); + +} + DECLARE_PLATFORM(firenze) = { .name = "Firenze", .probe = firenze_probe, - .init = ibm_fsp_init, + .init = firenze_init, .cec_power_down = ibm_fsp_cec_power_down, .cec_reboot = ibm_fsp_cec_reboot, .pci_setup_phb = firenze_setup_phb, |