aboutsummaryrefslogtreecommitdiff
path: root/hw/xive.c
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2019-05-08 16:17:46 +1000
committerStewart Smith <stewart@linux.ibm.com>2019-05-15 15:45:44 +1000
commit90d01f9526ba7884b22a4c5527a91cb90443785e (patch)
treebc5002b3fa74d59e1f5878cbc8d84ab4f4bd3584 /hw/xive.c
parenteaa899f53237b89e43baec8b0e22881fab2ba7ae (diff)
downloadskiboot-90d01f9526ba7884b22a4c5527a91cb90443785e.zip
skiboot-90d01f9526ba7884b22a4c5527a91cb90443785e.tar.gz
skiboot-90d01f9526ba7884b22a4c5527a91cb90443785e.tar.bz2
xive: Remove xive rev field and recognize P9P
All supported P9s are the revision 2 xive model, so there is no point to keeping it around. This avoids P9P being reported as unknown rev (which doesn't cause any other problems). Reviewed-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'hw/xive.c')
-rw-r--r--hw/xive.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/hw/xive.c b/hw/xive.c
index f382265..5edcaed 100644
--- a/hw/xive.c
+++ b/hw/xive.c
@@ -365,10 +365,6 @@ struct xive {
uint32_t chip_id;
uint32_t block_id;
struct dt_node *x_node;
- int rev;
-#define XIVE_REV_UNKNOWN 0 /* Unknown version */
-#define XIVE_REV_1 1 /* P9 (Nimbus) DD1.x (not supported) */
-#define XIVE_REV_2 2 /* P9 (Nimbus) DD2.x or Cumulus */
uint64_t xscom_base;
@@ -2836,15 +2832,20 @@ static struct xive *init_one_xive(struct dt_node *np)
chip = get_chip(x->chip_id);
assert(chip);
- x->rev = XIVE_REV_UNKNOWN;
- if (chip->type == PROC_CHIP_P9_NIMBUS) {
+ /* All supported P9 are revision 2 (Nimbus DD2) */
+ switch (chip->type) {
+ case PROC_CHIP_P9_NIMBUS:
+ /* We should not be able to boot a P9N DD1 */
assert((chip->ec_level & 0xf0) != 0x10);
- x->rev = XIVE_REV_2;
- } else if (chip->type == PROC_CHIP_P9_CUMULUS)
- x->rev = XIVE_REV_2;
+ /* Fallthrough */
+ case PROC_CHIP_P9_CUMULUS:
+ case PROC_CHIP_P9P:
+ break;
+ default:
+ assert(0);
+ }
- xive_dbg(x, "Initializing rev %d block ID %d...\n",
- x->rev, x->block_id);
+ xive_dbg(x, "Initializing block ID %d...\n", x->block_id);
chip->xive = x;
#ifdef USE_INDIRECT