aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorJack Miller <jack@codezen.org>2016-08-09 16:38:08 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2016-08-11 19:54:22 +1000
commitabab9520a752ddb6bf0b53cfd25e22ce2b75c8b0 (patch)
tree1780494bb328e3f1ebf8a9c543bee187bbe63452 /hw
parentc28ea2f0b7d6ab1d1ada871690169b21a11aad10 (diff)
downloadskiboot-abab9520a752ddb6bf0b53cfd25e22ce2b75c8b0.zip
skiboot-abab9520a752ddb6bf0b53cfd25e22ce2b75c8b0.tar.gz
skiboot-abab9520a752ddb6bf0b53cfd25e22ce2b75c8b0.tar.bz2
chiptod: Basic P9 support
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@codezen.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/chiptod.c10
1 files 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))