linux: add some more RPi upstream patches

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2012-02-26 01:56:47 +01:00
parent 1393d4b24c
commit 36db7aaf85
4 changed files with 3313 additions and 0 deletions

View File

@ -0,0 +1,48 @@
From 98be24ac73ff6d8608ed858cd64e870479f67780 Mon Sep 17 00:00:00 2001
From: Dom Cobley <dc4@broadcom.com>
Date: Sun, 12 Feb 2012 20:27:35 +0000
Subject: [PATCH] Add config option to enable L2 cache
Signed-off-by: Dom Cobley <dc4@broadcom.com>
---
arch/arm/mach-bcm2708/Kconfig | 7 +++++++
arch/arm/mach-bcm2708/include/mach/memory.h | 7 ++++++-
2 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-bcm2708/Kconfig b/arch/arm/mach-bcm2708/Kconfig
index 44c7866..d3d3db7 100644
--- a/arch/arm/mach-bcm2708/Kconfig
+++ b/arch/arm/mach-bcm2708/Kconfig
@@ -22,4 +22,11 @@ config BCM2708_VCMEM
help
Helper for videocore memory access and total size allocation.
+config BCM2708_L2CACHE
+ bool "Videocore L2 cache"
+ depends on MACH_BCM2708
+ default n
+ help
+ Allow ARM to use GPU's L2 cache. Requires enable_l2cache in config.txt.
+
endmenu
diff --git a/arch/arm/mach-bcm2708/include/mach/memory.h b/arch/arm/mach-bcm2708/include/mach/memory.h
index c6a21cb..771bdf1 100644
--- a/arch/arm/mach-bcm2708/include/mach/memory.h
+++ b/arch/arm/mach-bcm2708/include/mach/memory.h
@@ -34,7 +34,12 @@
*/
#define PHYS_OFFSET UL(0x00000000)
#define ARMMEM_OFFSET UL(0x00000000) /* offset in VC of ARM memory */
-#define _REAL_BUS_OFFSET UL(0xC0000000) /* don't use L1 or L2 caches */
+
+#ifdef CONFIG_BCM2708_L2CACHE
+ #define _REAL_BUS_OFFSET UL(0x40000000) /* use L2 cache */
+#else
+ #define _REAL_BUS_OFFSET UL(0xC0000000) /* don't use L1 or L2 caches */
+#endif
/* We're using the memory at 64M in the VideoCore for Linux - this adjustment
* will provide the offset into this area as well as setting the bits that
--
1.7.5.4

View File

@ -0,0 +1,26 @@
From ef98446236432e102d00d841cf1a6b63ed7be41f Mon Sep 17 00:00:00 2001
From: Dom Cobley <dc4@broadcom.com>
Date: Wed, 15 Feb 2012 18:33:00 +0000
Subject: [PATCH] Fix bug where vchiq fails when L2 enabled
Signed-off-by: Dom Cobley <dc4@broadcom.com>
---
.../interface/vchiq_arm/vchiq_2835_arm.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c
index ca065ff..a3d8f3c 100644
--- a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c
+++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c
@@ -36,7 +36,7 @@
#define TOTAL_SLOTS (VCHIQ_SLOT_ZERO_SLOTS + 2 * 32)
#define VCHIQ_DOORBELL_IRQ IRQ_ARM_DOORBELL_0
-#define VCHIQ_ARM_ADDRESS(x) __virt_to_bus(x)
+#define VCHIQ_ARM_ADDRESS(x) __virt_to_bus((unsigned)x)
#include "vchiq_arm.h"
#include "vchiq_2835.h"
--
1.7.5.4