From patchwork Fri Nov 2 17:39:21 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vipin Kumar X-Patchwork-Id: 196700 X-Patchwork-Delegate: vipin.kumar@st.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 925422C00C8 for ; Sat, 3 Nov 2012 05:05:08 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7E78C4A899; Fri, 2 Nov 2012 19:03:17 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 fEHIE0TdQFzK; Fri, 2 Nov 2012 19:03:17 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A08EC4AAED; Fri, 2 Nov 2012 19:01:09 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 315994A8BA for ; Fri, 2 Nov 2012 19:00:57 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 ak+BUlYmOror for ; Fri, 2 Nov 2012 19:00:53 +0100 (CET) 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 eu1sys200aog118.obsmtp.com (eu1sys200aog118.obsmtp.com [207.126.144.145]) by theia.denx.de (Postfix) with ESMTPS id 8DEA54A8F3 for ; Fri, 2 Nov 2012 19:00:13 +0100 (CET) Received: from beta.dmz-ap.st.com ([138.198.100.35]) (using TLSv1) by eu1sys200aob118.postini.com ([207.126.147.11]) with SMTP ID DSNKUJQKLeYQdg6nPBCZxfrldRudTfCjq+P4@postini.com; Fri, 02 Nov 2012 18:00:15 UTC Received: from zeta.dmz-ap.st.com (ns6.st.com [138.198.234.13]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id D5824147; Fri, 2 Nov 2012 17:32:11 +0000 (GMT) Received: from Webmail-ap.st.com (eapex1hubcas2.st.com [10.80.176.10]) by zeta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 13F39107D; Fri, 2 Nov 2012 17:40:25 +0000 (GMT) Received: from localhost (10.251.136.62) by Webmail-ap.st.com (10.80.176.7) with Microsoft SMTP Server (TLS) id 8.3.245.1; Sat, 3 Nov 2012 01:40:24 +0800 From: Vipin Kumar To: Date: Fri, 2 Nov 2012 23:09:21 +0530 Message-ID: <5b2a27f38a3e2359d4667b59fd8243d0ae3212cc.1351877331.git.vipin.kumar@st.com> X-Mailer: git-send-email 1.7.10.rc2.10.gb47606 In-Reply-To: References: MIME-Version: 1.0 Cc: sr@denx.de, spear-devel@list.st.com Subject: [U-Boot] [SPEAr Enhancement PATCH 1/9] spear: Add cache support X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Signed-off-by: Vipin Kumar --- arch/arm/cpu/arm926ejs/spear/Makefile | 7 ++++--- arch/arm/cpu/arm926ejs/spear/cache.c | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 arch/arm/cpu/arm926ejs/spear/cache.c diff --git a/arch/arm/cpu/arm926ejs/spear/Makefile b/arch/arm/cpu/arm926ejs/spear/Makefile index 7d11035..cf29ede 100644 --- a/arch/arm/cpu/arm926ejs/spear/Makefile +++ b/arch/arm/cpu/arm926ejs/spear/Makefile @@ -25,9 +25,10 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(SOC).o -COBJS-y := cpu.o \ - reset.o \ - timer.o +COBJS-y += cache.o +COBJS-y += cpu.o +COBJS-y += reset.o +COBJS-y += timer.o COBJS-$(CONFIG_ST_EMI) += emi.o COBJS-$(CONFIG_ARCH_SPEAR3XX) += spear3xx.o diff --git a/arch/arm/cpu/arm926ejs/spear/cache.c b/arch/arm/cpu/arm926ejs/spear/cache.c new file mode 100644 index 0000000..351e8cd --- /dev/null +++ b/arch/arm/cpu/arm926ejs/spear/cache.c @@ -0,0 +1,32 @@ +/* + * (C) Copyright 2012 + * Vipin Kumar, ST Micoelectronics, vipin.kumar@st.com. + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +#include + +void enable_caches(void) +{ +#ifndef CONFIG_SYS_DCACHE_OFF + /* Enable D-cache. I-cache is already enabled in start.S */ + dcache_enable(); +#endif +}