From patchwork Fri Apr 25 11:55:15 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Russell King X-Patchwork-Id: 29068 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f197.google.com (mail-pd0-f197.google.com [209.85.192.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A5A58202E6 for ; Fri, 25 Apr 2014 12:44:12 +0000 (UTC) Received: by mail-pd0-f197.google.com with SMTP id r10sf6536030pdi.8 for ; Fri, 25 Apr 2014 05:44:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:in-reply-to:references:from:to :subject:message-id:date:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:content-type:content-transfer-encoding; bh=p5RICHg7rHIhcKc7m01HAsiIALvQe9DQXDjPMAR6SDg=; b=cIOjrZQvdgyQfH4WJM2Rh91i+y6HNX87KcdPho4WdhCpdSKY38/Vh8A+4NNmGL3MzL NscSaNr6rVUIPipBUEb4/bi8Yty5WZpsAs9SYePrbtAuf3ANhBCCO7fnn7JVXD5XRNmR Qr/UePBrF/E9oh/SsmQ7/gLJSuti1qsgYH5KIk1wT5pS9Ed7dlREmruyiTp6hTuLZcYX YHxUORWLDs67snhxCDd+wIFQyKhjHEjy8QX4WMDbK9ND6K9weUudNaY1oLhsNXtkAkzA iMFTSxG/DoNshP5GQZiRx+v2KBMN3NXgtiphqyT5ux8N9/PYHlmthGr9Rj1jp9Ik59ps B/Sw== X-Gm-Message-State: ALoCoQm+eDfTPRrh0PxL0ZMk/TiqP4enfdfxCOFg3+5T3PBF3zrOaHlVgRBRf1C6sPf1XYhe1Gs9 X-Received: by 10.66.122.70 with SMTP id lq6mr3076782pab.47.1398429851910; Fri, 25 Apr 2014 05:44:11 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.25.144 with SMTP id 16ls1522875qgt.62.gmail; Fri, 25 Apr 2014 05:44:11 -0700 (PDT) X-Received: by 10.58.187.9 with SMTP id fo9mr6639412vec.4.1398429851685; Fri, 25 Apr 2014 05:44:11 -0700 (PDT) Received: from mail-vc0-x22e.google.com (mail-vc0-x22e.google.com [2607:f8b0:400c:c03::22e]) by mx.google.com with ESMTPS id v8si1674396vcs.68.2014.04.25.05.44.11 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 25 Apr 2014 05:44:11 -0700 (PDT) Received-SPF: none (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) client-ip=2607:f8b0:400c:c03::22e; Received: by mail-vc0-f174.google.com with SMTP id ld13so4591921vcb.5 for ; Fri, 25 Apr 2014 05:44:11 -0700 (PDT) X-Received: by 10.220.105.4 with SMTP id r4mr1486357vco.27.1398429851608; Fri, 25 Apr 2014 05:44:11 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp94909vcb; Fri, 25 Apr 2014 05:44:11 -0700 (PDT) X-Received: by 10.140.95.80 with SMTP id h74mr10582714qge.2.1398429851281; Fri, 25 Apr 2014 05:44:11 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id l5si3754829qai.8.2014.04.25.05.44.11 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 Apr 2014 05:44:11 -0700 (PDT) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; 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 1WdfS2-000272-Kp; Fri, 25 Apr 2014 12:41:58 +0000 Received: from pandora.arm.linux.org.uk ([2001:4d48:ad52:3201:214:fdff:fe10:1be6]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WdejB-0005we-9B for linux-arm-kernel@lists.infradead.org; Fri, 25 Apr 2014 11:55:38 +0000 Received: from e0022681537dd.dyn.arm.linux.org.uk ([fd8f:7570:feb6:1:222:68ff:fe15:37dd]:45976 helo=rmk-PC.arm.linux.org.uk) by pandora.arm.linux.org.uk with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1Wdeiq-00023K-0b for linux-arm-kernel@lists.infradead.org; Fri, 25 Apr 2014 12:55:16 +0100 Received: from rmk by rmk-PC.arm.linux.org.uk with local (Exim 4.76) (envelope-from ) id 1Wdeip-0007Pq-LZ for linux-arm-kernel@lists.infradead.org; Fri, 25 Apr 2014 12:55:15 +0100 In-Reply-To: <20140425112951.GK26756@n2100.arm.linux.org.uk> References: <20140425112951.GK26756@n2100.arm.linux.org.uk> From: Russell King To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 182/222] ARM: l2c: omap2+: get rid of init call Message-Id: Date: Fri, 25 Apr 2014 12:55:15 +0100 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140425_045537_624242_7B2E2C83 X-CRM114-Status: GOOD ( 12.29 ) X-Spam-Score: -0.8 (/) X-Spam-Report: SpamAssassin version 3.3.2 on bombadil.infradead.org summary: Content analysis details: (-0.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Original-Sender: rmk@arm.linux.org.uk X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=neutral (body hash did not verify) header.i=@arm.linux.org.uk Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Sekhar Nori To: linux-arm-kernel@lists.infradead.org Get rid of init call to initialize L2 cache. Instead use the init_early machine hook. This helps in using the initialization routine across SoCs without the need of ugly cpu_is_*() checks. Signed-off-by: Sekhar Nori Acked-by: Santosh Shilimkar Signed-off-by: Russell King --- arch/arm/mach-omap2/common.h | 1 + arch/arm/mach-omap2/io.c | 1 + arch/arm/mach-omap2/omap4-common.c | 10 +--------- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h index d88aff7baff8..ff029737c8f0 100644 --- a/arch/arm/mach-omap2/common.h +++ b/arch/arm/mach-omap2/common.h @@ -91,6 +91,7 @@ extern void omap3_sync32k_timer_init(void); extern void omap3_secure_sync32k_timer_init(void); extern void omap3_gptimer_timer_init(void); extern void omap4_local_timer_init(void); +int omap_l2_cache_init(void); extern void omap5_realtime_timer_init(void); void omap2420_init_early(void); diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c index f14f9ac2dca1..b28299b5afd5 100644 --- a/arch/arm/mach-omap2/io.c +++ b/arch/arm/mach-omap2/io.c @@ -640,6 +640,7 @@ void __init omap4430_init_early(void) omap44xx_clockdomains_init(); omap44xx_hwmod_init(); omap_hwmod_init_postsetup(); + omap_l2_cache_init(); omap_clk_soc_init = omap4xxx_dt_clk_init; } diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c index 6927d5b120fe..c41ff8b638e1 100644 --- a/arch/arm/mach-omap2/omap4-common.c +++ b/arch/arm/mach-omap2/omap4-common.c @@ -196,17 +196,10 @@ static void omap4_l2c310_write_sec(unsigned long val, unsigned reg) omap_smc1(smc_op, val); } -static int __init omap_l2_cache_init(void) +int __init omap_l2_cache_init(void) { u32 aux_ctrl; - /* - * To avoid code running on other OMAPs in - * multi-omap builds - */ - if (!cpu_is_omap44xx()) - return -ENODEV; - /* Static mapping, never released */ l2cache_base = ioremap(OMAP44XX_L2CACHE_BASE, SZ_4K); if (WARN_ON(!l2cache_base)) @@ -225,7 +218,6 @@ static int __init omap_l2_cache_init(void) return 0; } -omap_early_initcall(omap_l2_cache_init); #endif void __iomem *omap4_get_sar_ram_base(void)