From patchwork Mon Jun 18 16:25:35 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 9398 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 9255A23EB4 for ; Mon, 18 Jun 2012 16:26:04 +0000 (UTC) Received: from mail-yx0-f180.google.com (mail-yx0-f180.google.com [209.85.213.180]) by fiordland.canonical.com (Postfix) with ESMTP id 613F8A184A6 for ; Mon, 18 Jun 2012 16:26:04 +0000 (UTC) Received: by mail-yx0-f180.google.com with SMTP id q6so4272815yen.11 for ; Mon, 18 Jun 2012 09:26:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=mFz96BeNrt9SxGEDEAhiO1EQ97vWJItmjgnBiR4cwbU=; b=KBu7bX+V0dBiVHOqvC7ZA7FOYmRbb3bYC6DPenOSQCHsW2985lUxT9ivExb3VdkBs9 2Y88QunjYN57Hsrv6MIf83ZLoLXjs1HQ2rypxzdGGTDMLmf/G/eDnHtQmR53Dy6lBNYR 6bScgUicyJx51dvtwgGibGoOpPCggLIaKbyXBtgSwkZAPYNeciC7EadxjnBPMBURQTG2 w15yQX1khTOn3Tyuo695H6cGaBJuFU1p7ZZ21mtOEN1/Lqidai7Ec9yd8+bXewApmTWz /+UZRTJ93EE09vCala3XHqj07RqoyrCGAdbRBPU5eEiRLKOtXqfF0mOQk+v6IFCVAszf sO7A== Received: by 10.50.203.39 with SMTP id kn7mr8972038igc.53.1340036763889; Mon, 18 Jun 2012 09:26:03 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.24.148 with SMTP id v20csp77300ibb; Mon, 18 Jun 2012 09:26:03 -0700 (PDT) Received: by 10.68.225.9 with SMTP id rg9mr52521108pbc.137.1340036763211; Mon, 18 Jun 2012 09:26:03 -0700 (PDT) Received: from mail-pz0-f50.google.com (mail-pz0-f50.google.com [209.85.210.50]) by mx.google.com with ESMTPS id tj6si16984086pbc.168.2012.06.18.09.26.03 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 18 Jun 2012 09:26:03 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.210.50 is neither permitted nor denied by best guess record for domain of mathieu.poirier@linaro.org) client-ip=209.85.210.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.210.50 is neither permitted nor denied by best guess record for domain of mathieu.poirier@linaro.org) smtp.mail=mathieu.poirier@linaro.org Received: by mail-pz0-f50.google.com with SMTP id h15so8066586dan.37 for ; Mon, 18 Jun 2012 09:26:03 -0700 (PDT) Received: by 10.68.194.4 with SMTP id hs4mr53211131pbc.128.1340036762977; Mon, 18 Jun 2012 09:26:02 -0700 (PDT) Received: from localhost.localdomain (S0106002369de4dac.cg.shawcable.net. [70.73.24.112]) by mx.google.com with ESMTPS id mq8sm51844pbb.64.2012.06.18.09.25.55 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 18 Jun 2012 09:25:56 -0700 (PDT) From: mathieu.poirier@linaro.org To: u-boot@lists.denx.de Cc: patches@linaro.org, mathieu.poirier@linaro.org, lee.jones@linaro.org Subject: [PATCH 10/11] armv7: Adding cpu specific cache managmenent Date: Mon, 18 Jun 2012 10:25:35 -0600 Message-Id: <1340036736-2436-11-git-send-email-mathieu.poirier@linaro.org> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1340036736-2436-1-git-send-email-mathieu.poirier@linaro.org> References: <1340036736-2436-1-git-send-email-mathieu.poirier@linaro.org> X-Gm-Message-State: ALoCoQlo+3ayLsPGia9a2p3zwNlGUpo19btJJJLQZubAy2L8ml5bFjdyYB9VC2BzIMjHCNt2jLdi From: "Mathieu J. Poirier" Some CPU (i.e u8500) need more cache management before launching the Linux kernel. Signed-off-by: Mathieu Poirier Signed-off-by: John Rigby --- arch/arm/cpu/armv7/cpu.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/arch/arm/cpu/armv7/cpu.c b/arch/arm/cpu/armv7/cpu.c index c6fa8ef..53c8baf 100644 --- a/arch/arm/cpu/armv7/cpu.c +++ b/arch/arm/cpu/armv7/cpu.c @@ -44,6 +44,10 @@ void save_boot_params_default(u32 r0, u32 r1, u32 r2, u32 r3) void save_boot_params(u32 r0, u32 r1, u32 r2, u32 r3) __attribute__((weak, alias("save_boot_params_default"))); +void __cpu_cache_management(void){} +void cpu_cache_management(void) __attribute__((weak, + alias("__cpu_cache_management"))); + int cleanup_before_linux(void) { /* @@ -81,5 +85,10 @@ int cleanup_before_linux(void) */ invalidate_dcache_all(); + /* + * Some CPU need more cache attention before starting the kernel. + */ + cpu_cache_management(); + return 0; }