From patchwork Sun Jun 19 00:31:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Smirnov X-Patchwork-Id: 9185957 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 00A4E6075F for ; Sun, 19 Jun 2016 00:35:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E389F26490 for ; Sun, 19 Jun 2016 00:35:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D83212665D; Sun, 19 Jun 2016 00:35:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8C24D26490 for ; Sun, 19 Jun 2016 00:35:19 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1bEQfZ-00033S-9X; Sun, 19 Jun 2016 00:32:57 +0000 Received: from mail-pf0-x244.google.com ([2607:f8b0:400e:c00::244]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1bEQeV-0002Fk-Sb for linux-arm-kernel@lists.infradead.org; Sun, 19 Jun 2016 00:31:53 +0000 Received: by mail-pf0-x244.google.com with SMTP id c74so8818512pfb.0 for ; Sat, 18 Jun 2016 17:31:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=r5pD+nSxTH5xTjxey6PufnhuWWIj4GKNcB7WDg02LVc=; b=BFSxT+vSFcSdanXr+zPaVAdrU2MgPRattCK8iScUhO0R/EGYJMibCZyQk2kgMNIBJW sOKNCKxQwWajSYlNwBnXYlEvJQl0R/LCucvm2KcOR3ahd4JTCN0JlC+QV+prOu6ODxMv giaRcUmr2hmf2sEkXMd5pXjlk5goh/f0aC2UkEWRcyEq3bIeeEN3MvqVVUt77OhUJwba p1g3PU2U+2+0GQs+tnF/IWIH3P3Io5+5koNN7HR9MEu2nKNlr1nmw69FDeW7XE1dPyUj LGPkw+BUvI9tzUA05fr4NS/yeIm24mdi3sSnWc+CwaFX5CvXyuOPj+9WoZ47wfulGaJ9 wx7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=r5pD+nSxTH5xTjxey6PufnhuWWIj4GKNcB7WDg02LVc=; b=g6+V2yZN9uF/C3C+qtLJZpTDpEaBMuWVNluStzPPHRLmMuXvUDpoF/SThwfUMh9IPx PR4rY87//2UDawM6TR9xQLQBx9cKIVe++jjfYpYmT/j1DtwowTgUSuCuGt1kpqxS3/ZJ pRqj8yXJiaMXCsZLBZW9vhXu6Z5G7geqCDZt7GXqzmm/HJ35XVwdh9bJ2yAalPe04lzS trvysZAQExW2uZQWXkxqNNbCrhYa30ZJaY+opIDj8rw+fGjugS8uyDKNO1N8kn6O0fNP ImccUT7GzVU553p+/bOuzJbPuOJHVA1SsviT6fMHVgGMFH5YlIxd8OosoGV2YOp7F9MU duDw== X-Gm-Message-State: ALyK8tIZRH1UyAZ3x8c2701Y8Vtno3iHqbtm9GZpu/QiTw85RHO6Ge8XarGBVVL7ewfVZQ== X-Received: by 10.98.92.133 with SMTP id q127mr12029817pfb.103.1466296292076; Sat, 18 Jun 2016 17:31:32 -0700 (PDT) Received: from squirtle.localdomain.localdomain (c-73-225-163-254.hsd1.wa.comcast.net. [73.225.163.254]) by smtp.gmail.com with ESMTPSA id uj5sm56195069pac.28.2016.06.18.17.31.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 18 Jun 2016 17:31:30 -0700 (PDT) From: Andrey Smirnov To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 5/5] i.MX: Do not explicitly call l2x0_of_init() Date: Sat, 18 Jun 2016 17:31:08 -0700 Message-Id: <1466296268-27099-8-git-send-email-andrew.smirnov@gmail.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1466296268-27099-1-git-send-email-andrew.smirnov@gmail.com> References: <1466296268-27099-1-git-send-email-andrew.smirnov@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160618_173152_082469_6E8645F4 X-CRM114-Status: GOOD ( 13.80 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Russell King , Arnd Bergmann , Andrey Smirnov , linux-kernel@vger.kernel.org, Sascha Hauer , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Shawn Guo MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP There's no need to explicitly call l2x0_of_init() since it will be called as a part of init_IRQ() (see arch/arm/kernel/irq.c for details). This way we can simplify imx_init_l2cache() and ditch the call to it on i.MX35 (which does not claim compatibility with "arm,pl310-cache") alltogether. Acked-by: Arnd Bergmann Suggested-by: Arnd Bergmann Signed-off-by: Andrey Smirnov --- arch/arm/mach-imx/imx35-dt.c | 10 +++------- arch/arm/mach-imx/mach-imx6q.c | 2 ++ arch/arm/mach-imx/mach-imx6sl.c | 2 ++ arch/arm/mach-imx/mach-imx6sx.c | 2 ++ arch/arm/mach-imx/system.c | 12 ++++-------- 5 files changed, 13 insertions(+), 15 deletions(-) diff --git a/arch/arm/mach-imx/imx35-dt.c b/arch/arm/mach-imx/imx35-dt.c index e939603..99bb63d 100644 --- a/arch/arm/mach-imx/imx35-dt.c +++ b/arch/arm/mach-imx/imx35-dt.c @@ -20,20 +20,16 @@ #include "common.h" #include "mx35.h" -static void __init imx35_irq_init(void) -{ - imx_init_l2cache(); - mx35_init_irq(); -} - static const char * const imx35_dt_board_compat[] __initconst = { "fsl,imx35", NULL }; DT_MACHINE_START(IMX35_DT, "Freescale i.MX35 (Device Tree Support)") + .l2c_aux_val = 0, + .l2c_aux_mask = ~0, .map_io = mx35_map_io, .init_early = imx35_init_early, - .init_irq = imx35_irq_init, + .init_irq = mx35_init_irq, .dt_compat = imx35_dt_board_compat, MACHINE_END diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c index cb27d56..b31890f 100644 --- a/arch/arm/mach-imx/mach-imx6q.c +++ b/arch/arm/mach-imx/mach-imx6q.c @@ -407,6 +407,8 @@ static const char * const imx6q_dt_compat[] __initconst = { }; DT_MACHINE_START(IMX6Q, "Freescale i.MX6 Quad/DualLite (Device Tree)") + .l2c_aux_val = 0, + .l2c_aux_mask = ~0, .smp = smp_ops(imx_smp_ops), .map_io = imx6q_map_io, .init_irq = imx6q_init_irq, diff --git a/arch/arm/mach-imx/mach-imx6sl.c b/arch/arm/mach-imx/mach-imx6sl.c index 3003263..f9a9a36 100644 --- a/arch/arm/mach-imx/mach-imx6sl.c +++ b/arch/arm/mach-imx/mach-imx6sl.c @@ -75,6 +75,8 @@ static const char * const imx6sl_dt_compat[] __initconst = { }; DT_MACHINE_START(IMX6SL, "Freescale i.MX6 SoloLite (Device Tree)") + .l2c_aux_val = 0, + .l2c_aux_mask = ~0, .init_irq = imx6sl_init_irq, .init_machine = imx6sl_init_machine, .init_late = imx6sl_init_late, diff --git a/arch/arm/mach-imx/mach-imx6sx.c b/arch/arm/mach-imx/mach-imx6sx.c index 6a0b061..07a3a34 100644 --- a/arch/arm/mach-imx/mach-imx6sx.c +++ b/arch/arm/mach-imx/mach-imx6sx.c @@ -103,6 +103,8 @@ static const char * const imx6sx_dt_compat[] __initconst = { }; DT_MACHINE_START(IMX6SX, "Freescale i.MX6 SoloX (Device Tree)") + .l2c_aux_val = 0, + .l2c_aux_mask = ~0, .init_irq = imx6sx_init_irq, .init_machine = imx6sx_init_machine, .dt_compat = imx6sx_dt_compat, diff --git a/arch/arm/mach-imx/system.c b/arch/arm/mach-imx/system.c index d1300b9..a6212f0 100644 --- a/arch/arm/mach-imx/system.c +++ b/arch/arm/mach-imx/system.c @@ -98,13 +98,11 @@ void __init imx_init_l2cache(void) np = of_find_compatible_node(NULL, NULL, "arm,pl310-cache"); if (!np) - goto out; + return; l2x0_base = of_iomap(np, 0); - if (!l2x0_base) { - of_node_put(np); - goto out; - } + if (!l2x0_base) + goto put_node; if (!(readl_relaxed(l2x0_base + L2X0_CTRL) & L2X0_CTRL_EN)) { /* Configure the L2 PREFETCH and POWER registers */ @@ -121,9 +119,7 @@ void __init imx_init_l2cache(void) } iounmap(l2x0_base); +put_node: of_node_put(np); - -out: - l2x0_of_init(0, ~0); } #endif