[Skiboot] [PATCH v2 11/11] Add init function call to invoke Nest support
Madhavan Srinivasan
maddy at linux.vnet.ibm.com
Tue Jul 21 16:38:51 AEST 2015
Patch adds init routine and a catalogue lid loading function in main entry
function to detect and enable Nest PMU support.
Signed-off-by: Madhavan Srinivasan <maddy at linux.vnet.ibm.com>
---
core/init.c | 11 +++++++++++
hw/Makefile.inc | 2 +-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/core/init.c b/core/init.c
index 0df647e8b411..d80628565ec1 100644
--- a/core/init.c
+++ b/core/init.c
@@ -44,6 +44,7 @@
#include <timer.h>
#include <ipmi.h>
#include <sensor.h>
+#include <nest.h>
/*
* Boot semaphore, incremented by each CPU calling in
@@ -555,6 +556,8 @@ static void do_ctors(void)
void __noreturn main_cpu_entry(const void *fdt, u32 master_cpu)
{
+ int loaded;
+
/*
* WARNING: At this point. the timebases have
* *not* been synchronized yet. Do not use any timebase
@@ -714,6 +717,11 @@ void __noreturn main_cpu_entry(const void *fdt, u32 master_cpu)
if (platform.init)
platform.init();
+ /*
+ * Start Nest pmu catalogue lid loading.
+ */
+ loaded = preload_catalogue_lid();
+
/* Setup dummy console nodes if it's enabled */
if (dummy_console_enabled())
dummy_console_add_nodes();
@@ -721,6 +729,9 @@ void __noreturn main_cpu_entry(const void *fdt, u32 master_cpu)
/* Init SLW related stuff, including fastsleep */
slw_init();
+ /* Init Nest PMU unit */
+ nest_pmu_init(loaded);
+
op_display(OP_LOG, OP_MOD_INIT, 0x0002);
/* Read in NVRAM and set it up */
diff --git a/hw/Makefile.inc b/hw/Makefile.inc
index 034947c0f86f..80978867eb33 100644
--- a/hw/Makefile.inc
+++ b/hw/Makefile.inc
@@ -2,7 +2,7 @@
SUBDIRS += hw
HW_OBJS = xscom.o chiptod.o gx.o cec.o lpc.o lpc-uart.o psi.o
-HW_OBJS += homer.o slw.o occ.o fsi-master.o centaur.o
+HW_OBJS += homer.o slw.o occ.o fsi-master.o centaur.o nest.o
HW_OBJS += nx.o nx-rng.o nx-crypto.o nx-842.o
HW_OBJS += p7ioc.o p7ioc-inits.o p7ioc-phb.o p5ioc2.o p5ioc2-phb.o
HW_OBJS += phb3.o sfc-ctrl.o fake-rtc.o bt.o p8-i2c.o prd.o
--
1.9.1
More information about the Skiboot
mailing list