aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/gemini/patches-3.18/060-cache-fa.diff
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2015-03-26 20:36:30 +0000
committerFelix Fietkau <nbd@openwrt.org>2015-03-26 20:36:30 +0000
commitb83cc973cec0cf2010a43ff094c418d8573fe5be (patch)
treeef820bef132e9e1fe6d7c46ba3a46700f591ad80 /target/linux/gemini/patches-3.18/060-cache-fa.diff
parent2a4b34d5cc74eb3b2f30919cb675cdf2c19b73d4 (diff)
downloadupstream-b83cc973cec0cf2010a43ff094c418d8573fe5be.tar.gz
upstream-b83cc973cec0cf2010a43ff094c418d8573fe5be.tar.bz2
upstream-b83cc973cec0cf2010a43ff094c418d8573fe5be.zip
gemini: add 3.18 support
Signed-off-by: Roman Yeryomin <roman@advem.lv> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45033 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/gemini/patches-3.18/060-cache-fa.diff')
-rw-r--r--target/linux/gemini/patches-3.18/060-cache-fa.diff41
1 files changed, 41 insertions, 0 deletions
diff --git a/target/linux/gemini/patches-3.18/060-cache-fa.diff b/target/linux/gemini/patches-3.18/060-cache-fa.diff
new file mode 100644
index 0000000000..d337607e97
--- /dev/null
+++ b/target/linux/gemini/patches-3.18/060-cache-fa.diff
@@ -0,0 +1,41 @@
+--- a/arch/arm/mm/cache-fa.S 2011-01-05 01:50:19.000000000 +0100
++++ b/arch/arm/mm/cache-fa.S 2012-07-25 14:30:40.883639094 +0200
+@@ -24,7 +24,8 @@
+ /*
+ * The size of one data cache line.
+ */
+-#define CACHE_DLINESIZE 16
++#define CACHE_DLINESIZE 16
++#define CACHE_DLINESHIFT 4
+
+ /*
+ * The total size of the data cache.
+@@ -169,7 +170,17 @@
+ * - start - virtual start address
+ * - end - virtual end address
+ */
++__flush_whole_dcache:
++ mcr p15, 0, r0, c7, c14, 0 @ clean/invalidate D cache
++ mov r0, #0
++ mcr p15, 0, r0, c7, c10, 4 @ drain write buffer
++ mov pc, lr
++
+ fa_dma_inv_range:
++ sub r3, r1, r0 @ calculate total size
++ cmp r3, #CACHE_DLIMIT @ total size >= limit?
++ bhs __flush_whole_dcache @ flush whole D cache
++
+ tst r0, #CACHE_DLINESIZE - 1
+ bic r0, r0, #CACHE_DLINESIZE - 1
+ mcrne p15, 0, r0, c7, c14, 1 @ clean & invalidate D entry
+@@ -193,6 +204,10 @@
+ * - end - virtual end address
+ */
+ fa_dma_clean_range:
++ sub r3, r1, r0 @ calculate total size
++ cmp r3, #CACHE_DLIMIT @ total size >= limit?
++ bhs __flush_whole_dcache @ flush whole D cache
++
+ bic r0, r0, #CACHE_DLINESIZE - 1
+ 1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry
+ add r0, r0, #CACHE_DLINESIZE