blob: 1c997ab256faca616c73d7eee1b287fbf4c22fc7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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);
|