public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 4/5] RPi: Enable caches for rpi2
Date: Tue, 15 Mar 2016 18:21:47 +0100	[thread overview]
Message-ID: <1458062508-210201-5-git-send-email-agraf@suse.de> (raw)
In-Reply-To: <1458062508-210201-1-git-send-email-agraf@suse.de>

Now that we have support for running with caches enabled in HYP mode,
opt in to that on the Raspberry Pi 2. This brings a significant performance
boost.

Signed-off-by: Alexander Graf <agraf@suse.de>
---
 arch/arm/mach-bcm283x/init.c | 7 +++++++
 include/configs/rpi_2.h      | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-bcm283x/init.c b/arch/arm/mach-bcm283x/init.c
index d2d366b..2ec87c2 100644
--- a/arch/arm/mach-bcm283x/init.c
+++ b/arch/arm/mach-bcm283x/init.c
@@ -15,3 +15,10 @@ int arch_cpu_init(void)
 
 	return 0;
 }
+
+#ifdef CONFIG_SYS_ARM_LPAE
+void enable_caches(void)
+{
+	dcache_enable();
+}
+#endif
diff --git a/include/configs/rpi_2.h b/include/configs/rpi_2.h
index bea4ebd..14b807a 100644
--- a/include/configs/rpi_2.h
+++ b/include/configs/rpi_2.h
@@ -10,7 +10,7 @@
 #define CONFIG_SKIP_LOWLEVEL_INIT
 #define CONFIG_BCM2836
 #define CONFIG_SYS_CACHELINE_SIZE		64
-#define CONFIG_SYS_DCACHE_OFF
+#define CONFIG_SYS_ARM_LPAE
 
 #include "rpi-common.h"
 
-- 
1.8.5.6

  parent reply	other threads:[~2016-03-15 17:21 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-15 17:21 [U-Boot] [PATCH 0/5] Enable caches for the RPi2 Alexander Graf
2016-03-15 17:21 ` [U-Boot] [PATCH 1/5] arm64: Add 32bit arm compatible dcache definitions Alexander Graf
2016-03-16 17:55   ` Andreas Färber
2016-03-16 22:31     ` Alexander Graf
2016-03-15 17:21 ` [U-Boot] [PATCH 2/5] arm: Add support for HYP mode and LPAE page tables Alexander Graf
2016-03-15 17:35   ` Tom Rini
2016-03-16  8:33     ` Alexander Graf
2016-03-16 14:25       ` Tom Rini
2016-03-15 17:21 ` [U-Boot] [PATCH 3/5] lcd: Fix compile warning in 64bit mode Alexander Graf
2016-03-15 17:21 ` Alexander Graf [this message]
2016-03-15 17:21 ` [U-Boot] [PATCH 5/5] bcm2835 video: Map fb as cached Alexander Graf
2016-03-16 18:00   ` Andreas Färber
2016-03-16 22:32     ` Alexander Graf

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=1458062508-210201-5-git-send-email-agraf@suse.de \
    --to=agraf@suse.de \
    --cc=u-boot@lists.denx.de \
    /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