From patchwork Tue Aug 18 07:27:19 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Roese X-Patchwork-Id: 508193 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id A67CB14032B for ; Tue, 18 Aug 2015 17:27:33 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 549F94B752; Tue, 18 Aug 2015 09:27:30 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Av_VEP-xhBhX; Tue, 18 Aug 2015 09:27:30 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id CA65C4B742; Tue, 18 Aug 2015 09:27:29 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9C0284B742 for ; Tue, 18 Aug 2015 09:27:25 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id m2Qfu6e3yST5 for ; Tue, 18 Aug 2015 09:27:25 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mo4-p04-ob.smtp.rzone.de (mo4-p04-ob.smtp.rzone.de [81.169.146.176]) by theia.denx.de (Postfix) with ESMTPS id 5C9274B73A for ; Tue, 18 Aug 2015 09:27:23 +0200 (CEST) X-RZG-CLASS-ID: mo04 X-RZG-AUTH: :IW0NeWC7b/q2i6W/qstXb1SBUuFnrGohfvxEndrDXKjzPMsB3oimjD61I4fPQhgcxmkf7w== Received: from stefan-work.domain_not_set.invalid (b9168f91.cgn.dg-w.de [185.22.143.145]) by post.strato.de (RZmta 37.9 SBL|AUTH) with ESMTPA id j029cdr7I7RLfZB; Tue, 18 Aug 2015 09:27:21 +0200 (CEST) From: Stefan Roese To: u-boot@lists.denx.de Date: Tue, 18 Aug 2015 09:27:19 +0200 Message-Id: <1439882840-31757-4-git-send-email-sr@denx.de> X-Mailer: git-send-email 2.4.8 In-Reply-To: <1439882840-31757-1-git-send-email-sr@denx.de> References: <1439882840-31757-1-git-send-email-sr@denx.de> Cc: Viresh Kumar , Vipin Kumar Subject: [U-Boot] [PATCH 4/5] arm: spear: Enable caches on SPEAr X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" The designware ethernet driver supports d-cache now. So there is nothing stopping us now to enable the caches completely on SPEAr. Tested on SPEAr600 x600 board. Signed-off-by: Stefan Roese Cc: Viresh Kumar Cc: Vipin Kumar --- arch/arm/cpu/arm926ejs/spear/cpu.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/cpu/arm926ejs/spear/cpu.c b/arch/arm/cpu/arm926ejs/spear/cpu.c index 3037084..e39cdba 100644 --- a/arch/arm/cpu/arm926ejs/spear/cpu.c +++ b/arch/arm/cpu/arm926ejs/spear/cpu.c @@ -56,6 +56,16 @@ int arch_cpu_init(void) return 0; } +void enable_caches(void) +{ +#ifndef CONFIG_SYS_ICACHE_OFF + icache_enable(); +#endif +#ifndef CONFIG_SYS_DCACHE_OFF + dcache_enable(); +#endif +} + #ifdef CONFIG_DISPLAY_CPUINFO int print_cpuinfo(void) {