aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ipq806x/patches-4.4
diff options
context:
space:
mode:
authorPavel Kubelun <be.dissent@gmail.com>2016-11-15 21:28:36 +0300
committerJohn Crispin <john@phrozen.org>2016-12-01 15:47:43 +0100
commit2b71f958b1d2022bd0c4dcaa458f5ba1b955f934 (patch)
tree3d8b055c213a1b0b1cc8cd9bdb32c10872548f07 /target/linux/ipq806x/patches-4.4
parent8fca99266ef45f4b58bfa17a1d6d9eb749db23ef (diff)
downloadupstream-2b71f958b1d2022bd0c4dcaa458f5ba1b955f934.tar.gz
upstream-2b71f958b1d2022bd0c4dcaa458f5ba1b955f934.tar.bz2
upstream-2b71f958b1d2022bd0c4dcaa458f5ba1b955f934.zip
ipq806x: increase coherent dma pool size
Cherry-picked and rebased from https://source.codeaurora.org/quic/qsdk/system/openwrt/tree/?h=korg/linux-3.4.y/release/arugula_bb_cs Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
Diffstat (limited to 'target/linux/ipq806x/patches-4.4')
-rw-r--r--target/linux/ipq806x/patches-4.4/308-soc-qcom-ipq806x-Increase-Atomic-Coherent-Pool-size.patch52
1 files changed, 52 insertions, 0 deletions
diff --git a/target/linux/ipq806x/patches-4.4/308-soc-qcom-ipq806x-Increase-Atomic-Coherent-Pool-size.patch b/target/linux/ipq806x/patches-4.4/308-soc-qcom-ipq806x-Increase-Atomic-Coherent-Pool-size.patch
new file mode 100644
index 0000000000..1c997ab256
--- /dev/null
+++ b/target/linux/ipq806x/patches-4.4/308-soc-qcom-ipq806x-Increase-Atomic-Coherent-Pool-size.patch
@@ -0,0 +1,52 @@
+From 689a8f1ec58a88152669d21572a1539ad34024cb Mon Sep 17 00:00:00 2001
+From: Varadarajan Narayanan <varada@codeaurora.org>
+Date: Mon, 30 Mar 2015 13:25:21 +0530
+Subject: soc: qcom: ipq806x: Increase Atomic Coherent Pool size
+
+Linux 3.14, by default allocates a 256K Atomic Coherent Pool.
+However, Linux 3.4 seems to have allocated ~1.8M for the same.
+256K doesn't seem to be enough for the WiFi driver. Hence,
+setting the size to be similar to 3.4.
+
+CRs-Fixed: 810357
+
+Change-Id: I5b98a8531dcb33aff451a943f8b83402f9d13fa7
+Signed-off-by: Varadarajan Narayanan <varada@codeaurora.org>
+---
+ arch/arm/mach-qcom/board.c | 20 ++++++++++++++++++++
+ 1 file changed, 20 insertions(+)
+
+--- a/arch/arm/mach-qcom/board.c
++++ b/arch/arm/mach-qcom/board.c
+@@ -12,6 +12,11 @@
+
+ #include <linux/init.h>
+
++#include <linux/err.h>
++#include <linux/io.h>
++#include <linux/module.h>
++#include <linux/dma-mapping.h>
++
+ #include <asm/mach/arch.h>
+
+ static const char * const qcom_dt_match[] __initconst = {
+@@ -28,3 +33,19 @@ static const char * const qcom_dt_match[
+ DT_MACHINE_START(QCOM_DT, "Qualcomm (Flattened Device Tree)")
+ .dt_compat = qcom_dt_match,
+ MACHINE_END
++
++
++static int __init qcom_atomic_pool_size_set(void)
++{
++#define ATOMIC_DMA_COHERENT_POOL_SIZE SZ_2M
++
++ init_dma_coherent_pool_size(ATOMIC_DMA_COHERENT_POOL_SIZE);
++
++ return 0;
++}
++
++/*
++ * This should happen before atomic_pool_init(), which is a
++ * postcore_initcall.
++ */
++core_initcall(qcom_atomic_pool_size_set);