From patchwork Fri Feb 17 06:26:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Neuling X-Patchwork-Id: 729010 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vPjjP2dyVz9s85 for ; Fri, 17 Feb 2017 17:26:49 +1100 (AEDT) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3vPjjP1st8zDqBn for ; Fri, 17 Feb 2017 17:26:49 +1100 (AEDT) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Received: from ozlabs.org (ozlabs.org [103.22.144.67]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3vPjjG6wqQzDqBW for ; Fri, 17 Feb 2017 17:26:42 +1100 (AEDT) Received: from localhost.localdomain (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id 3vPjjG5tvvz9s85; Fri, 17 Feb 2017 17:26:42 +1100 (AEDT) Received: by localhost.localdomain (Postfix, from userid 1000) id B11F0EEEDAE; Fri, 17 Feb 2017 17:26:41 +1100 (AEDT) From: Michael Neuling To: stewart@linux.vnet.ibm.com Date: Fri, 17 Feb 2017 17:26:40 +1100 Message-Id: <20170217062640.27033-2-mikey@neuling.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170217062640.27033-1-mikey@neuling.org> References: <20170217062640.27033-1-mikey@neuling.org> Subject: [Skiboot] [PATCH 2/2] ast: Account for differences between 2400 vs 2500 X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: skiboot@lists.ozlabs.org, mikey@neuling.org MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" Currently astbmc_early_init() only applies to AST2400/POWER8. This fixes the code so it also applies to AST2500/POWER9 except for the PSI BAR fixup which is not needed on AST2500/POWER9. Signed-off-by: Michael Neuling --- platforms/astbmc/common.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/platforms/astbmc/common.c b/platforms/astbmc/common.c index 2dcf40bc9c..6f29e61a39 100644 --- a/platforms/astbmc/common.c +++ b/platforms/astbmc/common.c @@ -344,6 +344,10 @@ static void astbmc_fixup_psi_bar(void) struct proc_chip *chip = next_chip(NULL); uint64_t psibar; + /* This is P8 specific */ + if (proc_gen != proc_gen_p8) + return; + /* Read PSI BAR */ if (xscom_read(chip->id, 0x201090A, &psibar)) { prerror("PLAT: Error reading PSI BAR\n"); @@ -365,17 +369,11 @@ static void astbmc_fixup_psi_bar(void) void astbmc_early_init(void) { - /* - * On P9 we don't have a HB supplied devicetree and we have a - * different PSI BAR hack here is P8 specific. - */ - if (proc_gen == proc_gen_p8) { - /* Hostboot's device-tree isn't quite right yet */ - astbmc_fixup_dt(); + /* Hostboot's device-tree isn't quite right yet */ + astbmc_fixup_dt(); - /* Hostboot forgets to populate the PSI BAR */ - astbmc_fixup_psi_bar(); - } + /* Hostboot forgets to populate the PSI BAR */ + astbmc_fixup_psi_bar(); /* Send external interrupts to me */ psi_set_external_irq_policy(EXTERNAL_IRQ_POLICY_SKIBOOT);