[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH 26/27] ppc/pnv: add a "ibm, opal/power-mgt" device tre
From: |
Cédric Le Goater |
Subject: |
[Qemu-ppc] [PATCH 26/27] ppc/pnv: add a "ibm, opal/power-mgt" device tree node on POWER9 |
Date: |
Wed, 6 Mar 2019 09:50:31 +0100 |
Activate stop0 and stop1 levels.
Signed-off-by: Cédric Le Goater <address@hidden>
---
hw/ppc/pnv.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c
index 30153ad5acea..9d40b006c0af 100644
--- a/hw/ppc/pnv.c
+++ b/hw/ppc/pnv.c
@@ -456,6 +456,16 @@ static void pnv_dt_isa(PnvMachineState *pnv, void *fdt)
&args);
}
+static void pnv_dt_power_mgt(void *fdt)
+{
+ int off;
+
+ off = fdt_add_subnode(fdt, 0, "ibm,opal");
+ off = fdt_add_subnode(fdt, off, "power-mgt");
+
+ _FDT(fdt_setprop_cell(fdt, off, "ibm,enabled-stop-levels", 0xc0000000));
+}
+
static void *pnv_dt_create(MachineState *machine)
{
const char plat_compat[] = "qemu,powernv\0ibm,powernv";
@@ -511,6 +521,11 @@ static void *pnv_dt_create(MachineState *machine)
pnv_dt_bmc_sensors(pnv->bmc, fdt);
}
+ /* Create an extra node for power management on Power9 */
+ if (pnv_is_power9(pnv)) {
+ pnv_dt_power_mgt(fdt);
+ }
+
return fdt;
}
--
2.20.1
- Re: [Qemu-ppc] [PATCH 13/27] ppc/pnv: psi: add a reset handler, (continued)
[Qemu-ppc] [PATCH 08/27] ppc/pnv: introduce a new pic_print_info() operation to the chip model, Cédric Le Goater, 2019/03/06
[Qemu-ppc] [PATCH 26/27] ppc/pnv: add a "ibm, opal/power-mgt" device tree node on POWER9,
Cédric Le Goater <=
[Qemu-ppc] [PATCH 17/27] ppc/pnv: add a LPC Controller model class, Cédric Le Goater, 2019/03/06