ipq806x: set v4.9 as default
[openwrt/openwrt.git] / target / linux / ipq806x / patches-4.4 / 308-soc-qcom-ipq806x-Increase-Atomic-Coherent-Pool-size.patch
1 From 689a8f1ec58a88152669d21572a1539ad34024cb Mon Sep 17 00:00:00 2001
2 From: Varadarajan Narayanan <varada@codeaurora.org>
3 Date: Mon, 30 Mar 2015 13:25:21 +0530
4 Subject: soc: qcom: ipq806x: Increase Atomic Coherent Pool size
5
6 Linux 3.14, by default allocates a 256K Atomic Coherent Pool.
7 However, Linux 3.4 seems to have allocated ~1.8M for the same.
8 256K doesn't seem to be enough for the WiFi driver. Hence,
9 setting the size to be similar to 3.4.
10
11 CRs-Fixed: 810357
12
13 Change-Id: I5b98a8531dcb33aff451a943f8b83402f9d13fa7
14 Signed-off-by: Varadarajan Narayanan <varada@codeaurora.org>
15 ---
16 arch/arm/mach-qcom/board.c | 20 ++++++++++++++++++++
17 1 file changed, 20 insertions(+)
18
19 --- a/arch/arm/mach-qcom/board.c
20 +++ b/arch/arm/mach-qcom/board.c
21 @@ -12,6 +12,11 @@
22
23 #include <linux/init.h>
24
25 +#include <linux/err.h>
26 +#include <linux/io.h>
27 +#include <linux/module.h>
28 +#include <linux/dma-mapping.h>
29 +
30 #include <asm/mach/arch.h>
31
32 static const char * const qcom_dt_match[] __initconst = {
33 @@ -28,3 +33,19 @@ static const char * const qcom_dt_match[
34 DT_MACHINE_START(QCOM_DT, "Qualcomm (Flattened Device Tree)")
35 .dt_compat = qcom_dt_match,
36 MACHINE_END
37 +
38 +
39 +static int __init qcom_atomic_pool_size_set(void)
40 +{
41 +#define ATOMIC_DMA_COHERENT_POOL_SIZE SZ_2M
42 +
43 + init_dma_coherent_pool_size(ATOMIC_DMA_COHERENT_POOL_SIZE);
44 +
45 + return 0;
46 +}
47 +
48 +/*
49 + * This should happen before atomic_pool_init(), which is a
50 + * postcore_initcall.
51 + */
52 +core_initcall(qcom_atomic_pool_size_set);