[Skiboot] [PATCH 04/15] chiptod: Basic P9 support
Benjamin Herrenschmidt
benh at kernel.crashing.org
Tue Aug 9 16:38:08 AEST 2016
From: Jack Miller <jack at codezen.org>
There's hardly any difference between P8 and P9, except the PIB_MASTER
addressing being expanded to 5 bits with the PIR.
We can now look at the TOD->CAPP sync to use new functionality.
Signed-off-by: Jack Miller <jack at codezen.org>
Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
---
hw/chiptod.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/hw/chiptod.c b/hw/chiptod.c
index 58302fe..38a464a 100644
--- a/hw/chiptod.c
+++ b/hw/chiptod.c
@@ -138,7 +138,8 @@
static enum chiptod_type {
chiptod_unknown,
chiptod_p7,
- chiptod_p8
+ chiptod_p8,
+ chiptod_p9
} chiptod_type;
enum chiptod_chip_role {
@@ -621,7 +622,10 @@ static bool chiptod_to_tb(void)
prerror("XSCOM error reading PIB_MASTER\n");
return false;
}
- if (chiptod_type == chiptod_p8) {
+ if (chiptod_type == chiptod_p9) {
+ tvbits = (this_cpu()->pir >> 2) & 0x1f;
+ tvbits |= 0x20;
+ } else if (chiptod_type == chiptod_p8) {
tvbits = (this_cpu()->pir >> 3) & 0xf;
tvbits |= 0x10;
} else {
@@ -1597,6 +1601,8 @@ static bool chiptod_probe(void)
chiptod_type = chiptod_p7;
if (dt_node_is_compatible(np,"ibm,power8-chiptod"))
chiptod_type = chiptod_p8;
+ if (dt_node_is_compatible(np,"ibm,power9-chiptod"))
+ chiptod_type = chiptod_p9;
}
if (dt_has_node_property(np, "secondary", NULL))
--
2.7.4
More information about the Skiboot
mailing list