diff mbox

[U-Boot,v2,4/5] RPi: Enable caches for rpi2

Message ID 1458139284-86132-5-git-send-email-agraf@suse.de
State Accepted
Commit ccd9d51ede69f08f60d9ab3c824b93ceda73afc8
Delegated to: Tom Rini
Headers show

Commit Message

Alexander Graf March 16, 2016, 2:41 p.m. UTC
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>

---

v1 -> v2:

  - Move to KConfig
  - Adapt to new define name
---
 arch/arm/mach-bcm283x/Kconfig | 1 +
 arch/arm/mach-bcm283x/init.c  | 7 +++++++
 include/configs/rpi_2.h       | 1 -
 3 files changed, 8 insertions(+), 1 deletion(-)

Comments

Tom Rini March 27, 2016, 10:25 p.m. UTC | #1
On Wed, Mar 16, 2016 at 03:41:23PM +0100, Alexander Graf wrote:

> 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>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/arch/arm/mach-bcm283x/Kconfig b/arch/arm/mach-bcm283x/Kconfig
index 2315a13..1a7baf6 100644
--- a/arch/arm/mach-bcm283x/Kconfig
+++ b/arch/arm/mach-bcm283x/Kconfig
@@ -12,6 +12,7 @@  config TARGET_RPI
 config TARGET_RPI_2
 	bool "Raspberry Pi 2"
 	select CPU_V7
+	select ARMV7_LPAE
 
 endchoice
 
diff --git a/arch/arm/mach-bcm283x/init.c b/arch/arm/mach-bcm283x/init.c
index d2d366b..4fa94db 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_ARMV7_LPAE
+void enable_caches(void)
+{
+	dcache_enable();
+}
+#endif
diff --git a/include/configs/rpi_2.h b/include/configs/rpi_2.h
index bea4ebd..13dc8de 100644
--- a/include/configs/rpi_2.h
+++ b/include/configs/rpi_2.h
@@ -10,7 +10,6 @@ 
 #define CONFIG_SKIP_LOWLEVEL_INIT
 #define CONFIG_BCM2836
 #define CONFIG_SYS_CACHELINE_SIZE		64
-#define CONFIG_SYS_DCACHE_OFF
 
 #include "rpi-common.h"