From patchwork Mon Jun 18 16:35:43 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 9409 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 8791A23EB4 for ; Mon, 18 Jun 2012 16:36:06 +0000 (UTC) Received: from mail-gh0-f180.google.com (mail-gh0-f180.google.com [209.85.160.180]) by fiordland.canonical.com (Postfix) with ESMTP id 56E41A1872E for ; Mon, 18 Jun 2012 16:36:06 +0000 (UTC) Received: by mail-gh0-f180.google.com with SMTP id z12so4151943ghb.11 for ; Mon, 18 Jun 2012 09:36:06 -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=VywPWkRO/y0UAMG9LDl+vOx+J/y7c7UeWMa0sGnpgKdyMBsgg+nwdRSVsRuJL+VmE2 +XzQ1A0csOWXv63HRIcfrQe7qmCq7bLwR8yGMDQzXIdeceXf4RrI/TukR3yN1ew67fdH nJCy0mHnF6hbFUKAhbPBQEJpnpqcaokv5xvwJlMZa19g34FKJPrH+jNmL/2i/X00dhxe /E6+FQFeKakxd2aKwyXBBUw/MVlGbTw9p5mmM4eEwpbam68QHDYR6CY0tiu5z5c7jAnM VZltDuOT7RHohZv6kmbTHlmy/l4ECxculaLgQIqTn8GbOAYeOFXBrRvH7SIMIDXBivrO Wbcw== Received: by 10.50.193.196 with SMTP id hq4mr9020311igc.57.1340037365908; Mon, 18 Jun 2012 09:36:05 -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 v20csp77806ibb; Mon, 18 Jun 2012 09:36:05 -0700 (PDT) Received: by 10.43.46.194 with SMTP id up2mr5643308icb.22.1340037365220; Mon, 18 Jun 2012 09:36:05 -0700 (PDT) Received: from mail-pb0-f50.google.com (mail-pb0-f50.google.com [209.85.160.50]) by mx.google.com with ESMTPS id wk5si14123843pbc.346.2012.06.18.09.36.05 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 18 Jun 2012 09:36:05 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.50 is neither permitted nor denied by best guess record for domain of mathieu.poirier@linaro.org) client-ip=209.85.160.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.160.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-pb0-f50.google.com with SMTP id rr4so9735001pbb.37 for ; Mon, 18 Jun 2012 09:36:05 -0700 (PDT) Received: by 10.68.138.169 with SMTP id qr9mr53735771pbb.27.1340037364945; Mon, 18 Jun 2012 09:36:04 -0700 (PDT) Received: from localhost.localdomain (S0106002369de4dac.cg.shawcable.net. [70.73.24.112]) by mx.google.com with ESMTPS id os9sm24389049pbb.62.2012.06.18.09.36.03 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 18 Jun 2012 09:36:04 -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:35:43 -0600 Message-Id: <1340037344-2497-11-git-send-email-mathieu.poirier@linaro.org> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1340037344-2497-1-git-send-email-mathieu.poirier@linaro.org> References: <1340037344-2497-1-git-send-email-mathieu.poirier@linaro.org> X-Gm-Message-State: ALoCoQktNoTCLdlCKpba2zmDpuhTTutnmaOfm/A/dwcsHE6AoJK8Mp/P1FvoztlUcb0wZerQVgoG 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; }