From 90d01f9526ba7884b22a4c5527a91cb90443785e Mon Sep 17 00:00:00 2001 From: Nicholas Piggin Date: Wed, 8 May 2019 16:17:46 +1000 Subject: xive: Remove xive rev field and recognize P9P MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Nicholas Piggin Signed-off-by: Stewart Smith --- hw/xive.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'hw') 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 -- cgit v1.1