From: Roger Quadros <rogerq@ti.com>
To: "Shilimkar, Santosh" <santosh.shilimkar@ti.com>
Cc: "Dechesne, Nicolas" <n-dechesne@ti.com>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>
Subject: L2 cache stability workaround for 4460 ES1.0
Date: Mon, 2 Apr 2012 09:55:25 +0300 [thread overview]
Message-ID: <4F794D5D.3090509@ti.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 490 bytes --]
Hi Santosh,
I came across the attached patch from you. I also came across this post
stating that it was decided not to send this patch upstream.
http://www.digipedia.pl/usenet/thread/18885/8437/#post8496
The problem is that we have to keep porting this patch each time we
update the kernel.
Do you know if the root cause has been found? If not can we have this
patch upstream till the root cause is found?
It seems the patch at least makes the kernel usable on ES1.0.
regards,
-roger
[-- Attachment #2: 0001-OMAP4460-L2X0-work-around-for-stability.patch --]
[-- Type: text/x-patch, Size: 2956 bytes --]
>From 68ab20c60335eef5aceb9c5f978b8d6ef4b11d9b Mon Sep 17 00:00:00 2001
From: Santosh Shilimkar <santosh.shilimkar@ti.com>
Date: Tue, 27 Mar 2012 11:20:09 -0400
Subject: [PATCH 1/3] OMAP4460: L2X0: work-around for stability.
OMAP4460 ES1.0 seems to suffer from stability with L2 cache enabled.
The root-cause analysis is ongoing but in meantime this chabe is
to enable a software WA with L2 cache enabled build. The WA consist
of locking certain cache ways based on their positions on the
physical memory layout.
Downside of this WA is that effective L2 cache size will be 512 KB
instead of 1 MB.
clalancette: Changed so that the workaround is only activated
for ES1.0, and not ES1.1.
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Chris Lalancette <clalancette@gmail.com>
---
arch/arm/include/asm/hardware/cache-l2x0.h | 5 +++++
arch/arm/mach-omap2/omap4-common.c | 18 ++++++++++++++++++
2 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/arch/arm/include/asm/hardware/cache-l2x0.h b/arch/arm/include/asm/hardware/cache-l2x0.h
index 7df239b..8e3f8f2 100644
--- a/arch/arm/include/asm/hardware/cache-l2x0.h
+++ b/arch/arm/include/asm/hardware/cache-l2x0.h
@@ -56,6 +56,11 @@
#define L2X0_LOCKDOWN_STRIDE 0x08
#define L2X0_ADDR_FILTER_START 0xC00
#define L2X0_ADDR_FILTER_END 0xC04
+#define L2X0_LOCKDOWN_WAY_D0 0x900
+#define L2X0_LOCKDOWN_WAY_D1 0x908
+#define L2X0_LOCKDOWN_WAY_I0 0x904
+#define L2X0_LOCKDOWN_WAY_I1 0x90C
+
#define L2X0_TEST_OPERATION 0xF00
#define L2X0_LINE_DATA 0xF10
#define L2X0_LINE_TAG 0xF30
diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c
index 70de277..4e190c8 100644
--- a/arch/arm/mach-omap2/omap4-common.c
+++ b/arch/arm/mach-omap2/omap4-common.c
@@ -129,6 +129,7 @@ static void omap4_l2x0_set_debug(unsigned long val)
static int __init omap_l2_cache_init(void)
{
u32 aux_ctrl = 0;
+ u32 lockdown = 0;
/*
* To avoid code running on other OMAPs in
@@ -164,6 +165,23 @@ static int __init omap_l2_cache_init(void)
if (omap_rev() != OMAP4430_REV_ES1_0)
omap_smc1(0x109, aux_ctrl);
+ /*
+ * WA for OMAP4460 ES1.0 L2 cache corruption issue.
+ * Lock-down specific L2 cache ways which makes effective
+ * L2 size as 512 KB instead of 1 MB
+ *
+ * The L2 cache in the ES1.1 doesn't have this issue, so only enable
+ * the workaround for ES1.0.
+ */
+ if (omap_rev() == OMAP4460_REV_ES1_0) {
+ printk(KERN_INFO "OMAP4460 ES1.0 detected, enabling L2 cache stability workaround\n");
+ lockdown = 0xa5a5;
+ writel_relaxed(lockdown, l2cache_base + L2X0_LOCKDOWN_WAY_D0);
+ writel_relaxed(lockdown, l2cache_base + L2X0_LOCKDOWN_WAY_D1);
+ writel_relaxed(lockdown, l2cache_base + L2X0_LOCKDOWN_WAY_I0);
+ writel_relaxed(lockdown, l2cache_base + L2X0_LOCKDOWN_WAY_I1);
+ }
+
/* Enable PL310 L2 Cache controller */
omap_smc1(0x102, 0x1);
--
1.7.9.1
next reply other threads:[~2012-04-02 6:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-02 6:55 Roger Quadros [this message]
2012-04-02 7:38 ` L2 cache stability workaround for 4460 ES1.0 Shilimkar, Santosh
2012-04-02 7:55 ` Roger Quadros
2012-04-02 7:58 ` Shilimkar, Santosh
2012-04-02 8:02 ` Roger Quadros
2012-04-02 9:13 ` Shilimkar, Santosh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F794D5D.3090509@ti.com \
--to=rogerq@ti.com \
--cc=linux-omap@vger.kernel.org \
--cc=n-dechesne@ti.com \
--cc=santosh.shilimkar@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).