platform/zz: Add support for loading OCC in ZZ

Message ID 1496816662-16611-1-git-send-email-shilpa.bhat@linux.vnet.ibm.com
State Superseded
Headers show

Commit Message

Shilpasri G Bhat June 7, 2017, 6:24 a.m.
Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>
---
 hw/occ.c               | 4 ++--
 platforms/ibm-fsp/zz.c | 8 +++++++-
 2 files changed, 9 insertions(+), 3 deletions(-)

Patch

diff --git a/hw/occ.c b/hw/occ.c
index 34ef9a7..ab4e2d9 100644
--- a/hw/occ.c
+++ b/hw/occ.c
@@ -1413,8 +1413,8 @@  void occ_p9_interrupt(uint32_t chip_id)
 
 void occ_fsp_init(void)
 {
-	/* OCC is P8 only */
-	if (proc_gen != proc_gen_p8)
+	/* OCC is  supported in P8 and P9 */
+	if (proc_gen < proc_gen_p8)
 		return;
 
 	/* If we have an FSP, register for notifications */
diff --git a/platforms/ibm-fsp/zz.c b/platforms/ibm-fsp/zz.c
index 89d87b4..c13911f 100644
--- a/platforms/ibm-fsp/zz.c
+++ b/platforms/ibm-fsp/zz.c
@@ -44,10 +44,16 @@  static uint32_t ibm_fsp_occ_timeout(void)
 	return 60;
 }
 
+static void zz_init(void)
+{
+	hservices_init();
+	ibm_fsp_init();
+}
+
 DECLARE_PLATFORM(zz) = {
 	.name			= "ZZ",
 	.probe			= zz_probe,
-	.init			= ibm_fsp_init,
+	.init			= zz_init,
 	.exit			= ibm_fsp_exit,
 	.cec_power_down		= ibm_fsp_cec_power_down,
 	.cec_reboot		= ibm_fsp_cec_reboot,