Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp2228474ybe; Thu, 12 Sep 2019 06:32:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqwp3P7uPD57OmeWqfThzENTXGWQ9GiEKbKxJaHmAPUNZtJhP1TfQpocDilxYw2Oq6AxnFEj X-Received: by 2002:a17:906:6c7:: with SMTP id v7mr21883045ejb.27.1568295166042; Thu, 12 Sep 2019 06:32:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568295166; cv=none; d=google.com; s=arc-20160816; b=ukIu/Rc1ylWs0YJR6wT6VSP0SH+HxPz4skB0fAKPPbWvb6Zq53guCIbQ4QxFYffhZe hKHbcm7ZLyEBkyP6orcZOjlOqknsnL439w4LX/aMGCBxfqSxix1Dq9365sC8EllqWAJV imWgE8MHuPQdZq2C3V/NnrQSqVtGb8y5ULzvwBJJSmE2Mjga2uC5kuu07iizo2BYkV5M HbyOzTri1JJTJmyHR86zD/OiVoXZW3w0vWWBFxnf3vGrle1+J8jJEy8Pm0GTHJSLAWsn A7w3l+QOJyhSGrRZGr5Qy261225XFAoVXmz35bJJQMpOQrw+WVjs5tRLUDkiQZI+0fvG RrsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:cc:to:subject:from:message-id :dkim-signature; bh=8YKLm3BM8Fxy2PQQ/azbBDLOKtUwGMrFARZT5pRecvA=; b=x7IZzmeRBXpDFO73uxCG3y3IP4V/7IdHYFoR6Bjdi4ibQAzW/QvkDL0jGBSHPFrnGH 8PrPUxeTmiJpUsxTkZwjY10wUvejfwNxOdfABOkpadk8E0rgFr9ZZyMLDjQohXfxiCy8 N73pbrWMXMnt1WQxP0cFFFiqOEKp0YEinI1TwtproOs65VhNGPisWfVxd2ZIkDxMQY+S cLVkvv7sWPgz0eHLRbOTV8f2/kcsZmDxFD9s9rhY7bB6h6VASk9icokEiJzTXQzXpn4i iySVBF9zF8eHG7msCGGCrKwmYapHFXixRUtXtqFhAUReoVvH3pzWNHs70JPHQ7TcuCg/ QrVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=AlE91qUL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d7si12359476ejm.139.2019.09.12.06.32.20; Thu, 12 Sep 2019 06:32:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=AlE91qUL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732177AbfILN3K (ORCPT + 99 others); Thu, 12 Sep 2019 09:29:10 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:50467 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731687AbfILN3J (ORCPT ); Thu, 12 Sep 2019 09:29:09 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 46TfkB4RrNz9txvH; Thu, 12 Sep 2019 15:29:06 +0200 (CEST) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=AlE91qUL; dkim-adsp=pass; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id CS_Eux0cFFP1; Thu, 12 Sep 2019 15:29:06 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 46TfkB3PHMz9txv9; Thu, 12 Sep 2019 15:29:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1568294946; bh=8YKLm3BM8Fxy2PQQ/azbBDLOKtUwGMrFARZT5pRecvA=; h=From:Subject:To:Cc:Date:From; b=AlE91qUL1IErytQqrdVZaNb9DzquT4c1DDMHzdBMvDQPPhBo32PH9smETuDiHEmDM VhhMwPC/3jHELmOlEDYDvNJcOof5G74/RIP+uh59HYEPZHXxKgIyDK2IFWOnFck8fs 6YGJfcZvPw8X9qe0HOoAGCsjkgP/t+e84XZFSC0E= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id D128C8B933; Thu, 12 Sep 2019 15:29:07 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id MahlDDjqoM9y; Thu, 12 Sep 2019 15:29:07 +0200 (CEST) Received: from pc16032vm.idsi0.si.c-s.fr (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 6A0258B934; Thu, 12 Sep 2019 15:29:07 +0200 (CEST) Received: by pc16032vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 3B00F6B736; Thu, 12 Sep 2019 13:29:07 +0000 (UTC) Message-Id: From: Christophe Leroy Subject: [PATCH] powerpc/8xx: use the fixmapped IMMR in cpm_reset() To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Thu, 12 Sep 2019 13:29:07 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since commit f86ef74ed919 ("powerpc/8xx: Fix vaddr for IMMR early remap"), the IMMR area has been mapped at startup with fixmap. Use that fixmap directly instead of calling ioremap(), this avoids calling ioremap() early before the slab is available. Signed-off-by: Christophe Leroy --- arch/powerpc/platforms/8xx/cpm1.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/arch/powerpc/platforms/8xx/cpm1.c b/arch/powerpc/platforms/8xx/cpm1.c index 5a47b3ead01a..d4648cc468dc 100644 --- a/arch/powerpc/platforms/8xx/cpm1.c +++ b/arch/powerpc/platforms/8xx/cpm1.c @@ -51,7 +51,7 @@ #define CPM_MAP_SIZE (0x4000) cpm8xx_t __iomem *cpmp; /* Pointer to comm processor space */ -immap_t __iomem *mpc8xx_immr; +immap_t __iomem *mpc8xx_immr = (void __iomem *)VIRT_IMMR_BASE; static cpic8xx_t __iomem *cpic_reg; static struct irq_domain *cpm_pic_host; @@ -205,12 +205,6 @@ void __init cpm_reset(void) int len; #endif - mpc8xx_immr = ioremap(get_immrbase(), 0x4000); - if (!mpc8xx_immr) { - printk(KERN_CRIT "Could not map IMMR\n"); - return; - } - cpmp = &mpc8xx_immr->im_cpm; #ifndef CONFIG_PPC_EARLY_DEBUG_CPM -- 2.13.3