From: Dirk Behme <dirk.behme@googlemail.com>
To: linux-omap@vger.kernel.org
Subject: [PATCH v3] ARM: OMAP3: Check for L2 cache enabled
Date: Sun, 11 May 2008 08:12:48 +0200 [thread overview]
Message-ID: <48268E60.8010703@googlemail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 230 bytes --]
Enabling L2 cache of Cortex-A8 based OMAP3 has to be done by
bootloader. Check if this is done and warn if not.
Signed-off-by: Dirk Behme <dirk.behme@gmail.com>
----
Changes in v3: Remove braces. Thanks to Felipe for review!
[-- Attachment #2: omap3_l2cache_check_patch.txt --]
[-- Type: text/plain, Size: 845 bytes --]
Index: linux-beagle/arch/arm/mach-omap2/id.c
===================================================================
--- linux-beagle.orig/arch/arm/mach-omap2/id.c
+++ linux-beagle/arch/arm/mach-omap2/id.c
@@ -267,3 +267,25 @@ void __init omap2_check_revision(void)
}
+#ifdef CONFIG_ARCH_OMAP3
+/*
+ * OMAP3 has L2 cache which has to be enabled by bootloader.
+ */
+static int __init omap3_check_l2cache(void)
+{
+ u32 val;
+
+ /* Get CP15 AUX register, bit 1 enabled indicates L2 cache is on */
+ asm volatile("mrc p15, 0, %0, c1, c0, 1":"=r" (val));
+
+ if ((val & 0x2) == 0)
+ printk(KERN_WARNING "Warning: L2 cache not enabled. Check "
+ "your bootloader. L2 off results in performance loss\n");
+ else
+ pr_info("OMAP3 L2 cache enabled\n");
+
+ return 0;
+}
+
+arch_initcall(omap3_check_l2cache);
+#endif /* CONFIG_ARCH_OMAP3 */
next reply other threads:[~2008-05-11 6:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-11 6:12 Dirk Behme [this message]
2008-05-11 8:44 ` [PATCH v3] ARM: OMAP3: Check for L2 cache enabled Felipe Balbi
2008-05-14 23:06 ` Tony Lindgren
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=48268E60.8010703@googlemail.com \
--to=dirk.behme@googlemail.com \
--cc=linux-omap@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.