From patchwork Sun Jul 17 02:50:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Crystal Wood X-Patchwork-Id: 649213 X-Patchwork-Delegate: scottwood@freescale.com Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3rsWFN6NGmz9s3v for ; Sun, 17 Jul 2016 12:57:44 +1000 (AEST) Received: from ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3rsWFN5QzQzDxb0 for ; Sun, 17 Jul 2016 12:57:44 +1000 (AEST) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from host.buserror.net (host.buserror.net [209.198.135.123]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3rsW564B7dzDqfv for ; Sun, 17 Jul 2016 12:50:34 +1000 (AEST) Received: from c-75-72-173-242.hsd1.mn.comcast.net ([75.72.173.242] helo=snotra.am.freescale.net) by host.buserror.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_CBC_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1bOcA3-0007Lj-7e; Sat, 16 Jul 2016 21:50:31 -0500 From: Scott Wood To: linuxppc-dev@lists.ozlabs.org Date: Sat, 16 Jul 2016 21:50:22 -0500 Message-Id: <1468723822-30457-6-git-send-email-oss@buserror.net> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1468723822-30457-1-git-send-email-oss@buserror.net> References: <1468723822-30457-1-git-send-email-oss@buserror.net> X-SA-Exim-Connect-IP: 75.72.173.242 X-SA-Exim-Mail-From: oss@buserror.net X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on host.buserror.net X-Spam-Level: X-Spam-Status: No, score=-16.0 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * -15 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Subject: [PATCH v11 5/5] powerpc/fsl-pci: Use fsl_guts_get_svr() X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:57:07 +0000) X-SA-Exim-Scanned: Yes (on host.buserror.net) X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Arnd Bergmann , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, Scott Wood , Yangbo Lu MIME-Version: 1.0 Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" Establish an initial user of fsl_guts_get_svr(), so that the code gets some test coverage until users outside arch/powerpc can get converted. Signed-off-by: Scott Wood --- arch/powerpc/Kconfig | 1 + arch/powerpc/sysdev/fsl_pci.c | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index fcfe533..765df81 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -777,6 +777,7 @@ config FSL_PCI bool select PPC_INDIRECT_PCI select PCI_QUIRKS + select FSL_GUTS config FSL_PMC bool diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c index 0fd1895..9ba570cf 100644 --- a/arch/powerpc/sysdev/fsl_pci.c +++ b/arch/powerpc/sysdev/fsl_pci.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -529,7 +530,10 @@ int fsl_add_bridge(struct platform_device *pdev, int is_primary) struct device_node *dev; struct ccsr_pci __iomem *pci; u16 temp; - u32 svr = mfspr(SPRN_SVR); + u32 svr; + + fsl_guts_init(); + svr = fsl_guts_get_svr(); dev = pdev->dev.of_node;