aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/chip.c5
-rw-r--r--hw/occ.c7
-rw-r--r--include/chip.h6
3 files changed, 18 insertions, 0 deletions
diff --git a/core/chip.c b/core/chip.c
index f2f1a96..729bccb 100644
--- a/core/chip.c
+++ b/core/chip.c
@@ -96,6 +96,11 @@ void init_chips(void)
0xffffffff);
chip->pcid = dt_prop_get_u32_def(xn, "ibm,proc-chip-id",
0xffffffff);
+ if (dt_prop_get_u32_def(xn, "ibm,occ-functional-state", 1))
+ chip->occ_functional = true;
+ else
+ chip->occ_functional = false;
+
list_head_init(&chip->i2cms);
list_head_init(&chip->lpc_clients);
};
diff --git a/hw/occ.c b/hw/occ.c
index 79140cc..710d8d4 100644
--- a/hw/occ.c
+++ b/hw/occ.c
@@ -99,6 +99,13 @@ static bool wait_for_all_occ_init(void)
chip->id);
return false;
}
+
+ if (!chip->occ_functional) {
+ prlog(PR_WARNING, "OCC: Chip: %x occ not functional\n",
+ chip->id);
+ continue;
+ }
+
/* Get PState table address */
occ_data_area = chip->homer_base + P8_HOMER_SAPPHIRE_DATA_OFFSET;
occ_data = (struct occ_pstate_table *)occ_data_area;
diff --git a/include/chip.h b/include/chip.h
index 5951ef0..5109e25 100644
--- a/include/chip.h
+++ b/include/chip.h
@@ -129,6 +129,12 @@ struct proc_chip {
uint32_t dbob_id;
uint32_t pcid;
+ /* If we expect to have an OCC (i.e. P8) and it is functional,
+ * set TRUE. If something has told us it is not, set FALSE and
+ * we can not wait for OCCs to init. This is only going to be
+ * FALSE in a simulator that doesn't simulate OCCs. */
+ bool occ_functional;
+
/* Used by hw/xscom.c */
uint64_t xscom_base;