From patchwork Tue Jun 2 02:49:28 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 27369 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n522nHk1017191 for ; Tue, 2 Jun 2009 02:49:33 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755490AbZFBCta (ORCPT ); Mon, 1 Jun 2009 22:49:30 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755655AbZFBCta (ORCPT ); Mon, 1 Jun 2009 22:49:30 -0400 Received: from mail.renesas.com ([202.234.163.13]:62207 "EHLO mail01.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755490AbZFBCta (ORCPT ); Mon, 1 Jun 2009 22:49:30 -0400 X-AuditID: ac140384-00000004000004f6-53-4a24933a5267 Received: from guardian02.idc.renesas.com ([172.20.8.201]) by mail01.idc.renesas.com (sendmail) with ESMTP id n522nTod014478; Tue, 2 Jun 2009 11:49:29 +0900 (JST) Received: (from root@localhost) by guardian02.idc.renesas.com with id n522nSRX007667; Tue, 2 Jun 2009 11:49:28 +0900 (JST) Received: from mta03.idc.renesas.com (localhost [127.0.0.1]) by mta03.idc.renesas.com with ESMTP id n522nUmP001942; Tue, 2 Jun 2009 11:49:30 +0900 (JST) Received: from PG10870.renesas.com ([172.30.8.159]) by ims05.idc.renesas.com (Sendmail) with ESMTPA id <0KKL00LVWBUGFH@ims05.idc.renesas.com>; Tue, 02 Jun 2009 11:49:28 +0900 (JST) Date: Tue, 02 Jun 2009 11:49:28 +0900 From: Kuninori Morimoto Subject: [PATCH 4/4] sh7723: add l2_cache_init support To: Paul Mundt Cc: SH-Linux Message-id: MIME-version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-type: text/plain; charset=US-ASCII User-Agent: SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL/10.7 Emacs/22.1 (i386-mingw-nt5.1.2600) MULE/5.0 (SAKAKI) Meadow/3.00-dev (KIKU) X-Brightmail-Tracker: AAAAAA== Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org Signed-off-by: Kuninori Morimoto --- arch/sh/kernel/cpu/sh4a/setup-sh7723.c | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c index 04cb4aa..d8f4a13 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include @@ -485,6 +486,15 @@ void __init plat_early_device_setup(void) ARRAY_SIZE(sh7723_early_devices)); } +#define RAMCR_CACHE_L2FC 0x0002 +#define RAMCR_CACHE_L2E 0x0001 +#define L2_CACHE_ENABLE (RAMCR_CACHE_L2E|RAMCR_CACHE_L2FC) +void __uses_jump_to_uncached l2_cache_init(void) +{ + /* Enable L2 cache */ + ctrl_outl(L2_CACHE_ENABLE, RAMCR); +} + enum { UNUSED=0,