308-soc-qcom-ipq806x-Increase-Atomic-Coherent-Pool-size.patch 1.4 KB

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