From patchwork Mon Apr 28 19:33:41 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Russell King X-Patchwork-Id: 29274 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f71.google.com (mail-yh0-f71.google.com [209.85.213.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id BBFCE202FE for ; Mon, 28 Apr 2014 19:33:55 +0000 (UTC) Received: by mail-yh0-f71.google.com with SMTP id i57sf3586972yha.2 for ; Mon, 28 Apr 2014 12:33:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:in-reply-to:references :from:to:cc:subject:message-id:date:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=HWIGrbpmsbRkQJ0T+CVbf/Qr9ydy/QQhYlu9UWIZCKY=; b=O0Fa6bQTa6pZfdWbOcZcS31KmCHCL75S25OVPGWFz2P9mKsDCuu+lesjc/lbRKiWdA pChYhoaP9eg75V09WVzfB+LGpideQJDEY2BuREq8/dyg2/BcDmpYFo6rW6XA4vCC+2rp hhDCA3zw9Cx79PDHVwdr0Rak/2qUb7LxC2ednPGz0Mt3kicdnvDfnCRJkdKrUJwPtqTa gdEk427pXGQn7m+68Ur9GZLMn11O5mct59d1okff+V6dqaP8Ba1wILU8ThuhFbrbcnua 9MFZCM90Vf6oov51XTz6xVCutSMPfsrWST/bzFOjErEZ/ORS8AnXR6lr8nqWvfYSCuFD xqjw== X-Gm-Message-State: ALoCoQmSQBnGOUHKl3Vv9t5qfq9Y44tgvoSOUSr/MgKzgb5eM+fMLJVQOQZ0avEO0OkjdyMMEyNd X-Received: by 10.236.142.212 with SMTP id i60mr10308002yhj.39.1398713635392; Mon, 28 Apr 2014 12:33:55 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.106.201 with SMTP id e67ls702570qgf.94.gmail; Mon, 28 Apr 2014 12:33:55 -0700 (PDT) X-Received: by 10.220.251.13 with SMTP id mq13mr19102vcb.73.1398713635241; Mon, 28 Apr 2014 12:33:55 -0700 (PDT) Received: from mail-ve0-x22a.google.com (mail-ve0-x22a.google.com [2607:f8b0:400c:c01::22a]) by mx.google.com with ESMTPS id sl10si1065719vdc.57.2014.04.28.12.33.55 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 28 Apr 2014 12:33:55 -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:c01::22a; Received: by mail-ve0-f170.google.com with SMTP id sa20so59557veb.29 for ; Mon, 28 Apr 2014 12:33:55 -0700 (PDT) X-Received: by 10.52.104.72 with SMTP id gc8mr1466945vdb.48.1398713635161; Mon, 28 Apr 2014 12:33:55 -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 ib8csp141626vcb; Mon, 28 Apr 2014 12:33:54 -0700 (PDT) X-Received: by 10.68.102.34 with SMTP id fl2mr31076967pbb.2.1398713634446; Mon, 28 Apr 2014 12:33:54 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id hp1si11100766pad.262.2014.04.28.12.33.53; Mon, 28 Apr 2014 12:33:53 -0700 (PDT) Received-SPF: none (google.com: linux-omap-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933104AbaD1Tdp (ORCPT + 6 others); Mon, 28 Apr 2014 15:33:45 -0400 Received: from gw-1.arm.linux.org.uk ([78.32.30.217]:55852 "EHLO pandora.arm.linux.org.uk" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933103AbaD1Tdn (ORCPT ); Mon, 28 Apr 2014 15:33:43 -0400 Received: from e0022681537dd.dyn.arm.linux.org.uk ([fd8f:7570:feb6:1:222:68ff:fe15:37dd]:35663 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 1WerJ8-0008HK-24; Mon, 28 Apr 2014 20:33:42 +0100 Received: from rmk by rmk-PC.arm.linux.org.uk with local (Exim 4.76) (envelope-from ) id 1WerJ7-0001Zg-L6; Mon, 28 Apr 2014 20:33:41 +0100 In-Reply-To: <20140428192419.GV26756@n2100.arm.linux.org.uk> References: <20140428192419.GV26756@n2100.arm.linux.org.uk> From: Russell King To: linux-arm-kernel@lists.ifradead.org Cc: Tony Lindgren , linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 88/97] ARM: l2c: omap2+: get rid of init call Message-Id: Date: Mon, 28 Apr 2014 20:33:41 +0100 Sender: linux-omap-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-omap@vger.kernel.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 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Sekhar Nori To: linux-arm-kernel@lists.ifradead.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)