From patchwork Fri Aug 8 00:19:22 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nobuhiro Iwamatsu X-Patchwork-Id: 378030 X-Patchwork-Delegate: iwamatsu@nigauri.org 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 02E3114010F for ; Fri, 8 Aug 2014 10:19:59 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9925EA75F2; Fri, 8 Aug 2014 02:19:58 +0200 (CEST) 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 rUD1V9Rob9cK; Fri, 8 Aug 2014 02:19:58 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D10C5A7526; Fri, 8 Aug 2014 02:19:56 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7C8EFA7526 for ; Fri, 8 Aug 2014 02:19:52 +0200 (CEST) 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 vXgnbgGl3UO2 for ; Fri, 8 Aug 2014 02:19:49 +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 mail-pd0-f175.google.com (mail-pd0-f175.google.com [209.85.192.175]) by theia.denx.de (Postfix) with ESMTPS id 1DE2AA7523 for ; Fri, 8 Aug 2014 02:19:45 +0200 (CEST) Received: by mail-pd0-f175.google.com with SMTP id r10so5984153pdi.6 for ; Thu, 07 Aug 2014 17:19:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=yS76719mDoaJqMBh1wi9Cik8gGE8FGb0uFFa5UKzVvA=; b=PUIR+aq7bHJFKt52X8+T6sOxr6O8rrWeZX1RVyViWgVnA1zHNTr/yXDVi9DxCXZhRg Vuk3q4bQesIR+RaBe1fenEsomJxVN8m11J3HK+dpSb+dird6jruM8DRrvY+8ymfxl67L 0DrgJM3TMT6RHq6xyS60hGm7nd/o3C/tzTXJud08Pf0kFX3ZyYPrFsIhlL2KBQTcRTlR 1RkHp4mqvGAdS5c0l4Ij1AfTrF67hQiwtKxZ56/0Npyp7MzPxiBIsVlfloky5AZb5lK6 6wW+Ej98mX6lSOjpaN8zvV5UUIy9dXBt4Cf8JT7DUp9AI/qk1SO8KuXv8jY66aRa0F3A hJ/g== X-Gm-Message-State: ALoCoQma0OFMnFkiXt9iYlh89cHWKhB/xtVZ/ahIhIUs4KHHmFSAOTSdEiR92DXU/An5JJHqILTD X-Received: by 10.66.167.105 with SMTP id zn9mr20010964pab.103.1407457183505; Thu, 07 Aug 2014 17:19:43 -0700 (PDT) Received: from xps-iwamatsu.renesas.com (49.14.32.202.bf.2iij.net. [202.32.14.49]) by mx.google.com with ESMTPSA id v1sm1053506pbs.1.2014.08.07.17.19.39 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 07 Aug 2014 17:19:41 -0700 (PDT) From: Nobuhiro Iwamatsu To: u-boot@lists.denx.de, Nobuhiro Iwamatsu Date: Fri, 8 Aug 2014 09:19:22 +0900 Message-Id: <1407457163-11737-1-git-send-email-nobuhiro.iwamatsu.yj@renesas.com> X-Mailer: git-send-email 2.0.0 Cc: Nobuhiro Iwamatsu Subject: [U-Boot] [PATCH 1/2] arm: rmobile: r8a7791: Fix initialize L2 cache 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: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de rmobile/lowlevel_init_ca15.S are common in r8a7790 and r8a7791 of rmobile SoC. But L2 cache of r8a7791 does not use L2CTLR[5]. This adds fix to set L2CTLR [5] only when the r8a7790. Signed-off-by: Nobuhiro Iwamatsu --- arch/arm/cpu/armv7/rmobile/lowlevel_init_ca15.S | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/arch/arm/cpu/armv7/rmobile/lowlevel_init_ca15.S b/arch/arm/cpu/armv7/rmobile/lowlevel_init_ca15.S index dbb96ed..5820e1a 100644 --- a/arch/arm/cpu/armv7/rmobile/lowlevel_init_ca15.S +++ b/arch/arm/cpu/armv7/rmobile/lowlevel_init_ca15.S @@ -53,7 +53,15 @@ do_lowlevel_init: cmp r1, #3 /* has already been set up */ bicne r0, r0, #0xe7 orrne r0, r0, #0x83 /* L2CTLR[7:6] + L2CTLR[2:0] */ - orrne r0, r0, #0x20 /* L2CTLR[5] */ + + ldr r2, =0xFF000044 /* PRR */ + ldr r1, [r2] + and r1, r1, #0x7F00 + lsrs r1, r1, #8 + cmp r1, #0x45 /* 0x45 is ID of r8a7790 */ + bne L2CTLR_5_SKIP + orrne r0, r0, #0x20 /* L2CTLR[5] */ +L2CTLR_5_SKIP: mcrne p15, 1, r0, c9, c0, 2 _exit_init_l2_a15: