mac80211: make it work with 3.18.12+
[openwrt/openwrt.git] / target / linux / ixp4xx / patches-3.18 / 001-arm-ixp4xx-set-cohorent_dma_mask-for-ethernet-platfo.patch
1 From 7113f56b683c5123df5c20724ac813cee66fa21a Mon Sep 17 00:00:00 2001
2 From: Jonas Gorski <jogo@openwrt.org>
3 Date: Mon, 1 Jul 2013 16:49:05 +0200
4 Subject: [PATCH 1/2] arm: ixp4xx: set cohorent_dma_mask for ethernet platform
5 devices
6
7 ARM requires the cohorent_dma_mask set, so set it for the platform
8 devices so that the ethernet driver has access to it.
9
10 Signed-off-by: Jonas Gorski <jogo@openwrt.org>
11 ---
12 arch/arm/mach-ixp4xx/fsg-setup.c | 2 ++
13 arch/arm/mach-ixp4xx/goramo_mlr.c | 2 ++
14 arch/arm/mach-ixp4xx/ixdp425-setup.c | 3 +++
15 arch/arm/mach-ixp4xx/nas100d-setup.c | 1 +
16 arch/arm/mach-ixp4xx/nslu2-setup.c | 1 +
17 arch/arm/mach-ixp4xx/omixp-setup.c | 3 +++
18 arch/arm/mach-ixp4xx/vulcan-setup.c | 2 ++
19 7 files changed, 14 insertions(+)
20
21 Index: linux-3.18.5/arch/arm/mach-ixp4xx/fsg-setup.c
22 ===================================================================
23 --- linux-3.18.5.orig/arch/arm/mach-ixp4xx/fsg-setup.c 2015-02-09 13:54:27.000000000 +0100
24 +++ linux-3.18.5/arch/arm/mach-ixp4xx/fsg-setup.c 2015-02-09 13:54:43.025969682 +0100
25 @@ -142,12 +142,14 @@
26 .id = IXP4XX_ETH_NPEB,
27 .dev = {
28 .platform_data = fsg_plat_eth,
29 + .coherent_dma_mask = DMA_BIT_MASK(32),
30 },
31 }, {
32 .name = "ixp4xx_eth",
33 .id = IXP4XX_ETH_NPEC,
34 .dev = {
35 .platform_data = fsg_plat_eth + 1,
36 + .coherent_dma_mask = DMA_BIT_MASK(32),
37 },
38 }
39 };
40 Index: linux-3.18.5/arch/arm/mach-ixp4xx/goramo_mlr.c
41 ===================================================================
42 --- linux-3.18.5.orig/arch/arm/mach-ixp4xx/goramo_mlr.c 2015-02-09 13:54:27.000000000 +0100
43 +++ linux-3.18.5/arch/arm/mach-ixp4xx/goramo_mlr.c 2015-02-09 13:54:43.025969682 +0100
44 @@ -295,10 +295,12 @@
45 .name = "ixp4xx_eth",
46 .id = IXP4XX_ETH_NPEB,
47 .dev.platform_data = eth_plat,
48 + .dev.coherent_dma_mask = DMA_BIT_MASK(32),
49 }, {
50 .name = "ixp4xx_eth",
51 .id = IXP4XX_ETH_NPEC,
52 .dev.platform_data = eth_plat + 1,
53 + .dev.coherent_dma_mask = DMA_BIT_MASK(32),
54 }
55 };
56
57 Index: linux-3.18.5/arch/arm/mach-ixp4xx/ixdp425-setup.c
58 ===================================================================
59 --- linux-3.18.5.orig/arch/arm/mach-ixp4xx/ixdp425-setup.c 2015-02-09 13:54:27.000000000 +0100
60 +++ linux-3.18.5/arch/arm/mach-ixp4xx/ixdp425-setup.c 2015-02-09 13:54:43.025969682 +0100
61 @@ -20,6 +20,7 @@
62 #include <linux/mtd/nand.h>
63 #include <linux/mtd/partitions.h>
64 #include <linux/delay.h>
65 +#include <linux/dma-mapping.h>
66 #include <linux/gpio.h>
67 #include <asm/types.h>
68 #include <asm/setup.h>
69 @@ -196,10 +197,12 @@
70 .name = "ixp4xx_eth",
71 .id = IXP4XX_ETH_NPEB,
72 .dev.platform_data = ixdp425_plat_eth,
73 + .dev.coherent_dma_mask = DMA_BIT_MASK(32),
74 }, {
75 .name = "ixp4xx_eth",
76 .id = IXP4XX_ETH_NPEC,
77 .dev.platform_data = ixdp425_plat_eth + 1,
78 + .dev.coherent_dma_mask = DMA_BIT_MASK(32),
79 }
80 };
81
82 Index: linux-3.18.5/arch/arm/mach-ixp4xx/nas100d-setup.c
83 ===================================================================
84 --- linux-3.18.5.orig/arch/arm/mach-ixp4xx/nas100d-setup.c 2015-02-09 13:54:27.000000000 +0100
85 +++ linux-3.18.5/arch/arm/mach-ixp4xx/nas100d-setup.c 2015-02-09 13:54:43.025969682 +0100
86 @@ -170,6 +170,7 @@
87 .name = "ixp4xx_eth",
88 .id = IXP4XX_ETH_NPEB,
89 .dev.platform_data = nas100d_plat_eth,
90 + .dev.coherent_dma_mask = DMA_BIT_MASK(32),
91 }
92 };
93
94 Index: linux-3.18.5/arch/arm/mach-ixp4xx/nslu2-setup.c
95 ===================================================================
96 --- linux-3.18.5.orig/arch/arm/mach-ixp4xx/nslu2-setup.c 2015-02-09 13:54:27.000000000 +0100
97 +++ linux-3.18.5/arch/arm/mach-ixp4xx/nslu2-setup.c 2015-02-09 13:54:43.025969682 +0100
98 @@ -182,6 +182,7 @@
99 .name = "ixp4xx_eth",
100 .id = IXP4XX_ETH_NPEB,
101 .dev.platform_data = nslu2_plat_eth,
102 + .dev.coherent_dma_mask = DMA_BIT_MASK(32),
103 }
104 };
105
106 Index: linux-3.18.5/arch/arm/mach-ixp4xx/omixp-setup.c
107 ===================================================================
108 --- linux-3.18.5.orig/arch/arm/mach-ixp4xx/omixp-setup.c 2015-02-09 13:54:27.000000000 +0100
109 +++ linux-3.18.5/arch/arm/mach-ixp4xx/omixp-setup.c 2015-02-09 13:55:01.150008153 +0100
110 @@ -17,6 +17,7 @@
111 #include <linux/serial_8250.h>
112 #include <linux/mtd/mtd.h>
113 #include <linux/mtd/partitions.h>
114 +#include <linux/dma-mapping.h>
115 #include <linux/leds.h>
116
117 #include <asm/setup.h>
118 @@ -188,10 +189,12 @@
119 .name = "ixp4xx_eth",
120 .id = IXP4XX_ETH_NPEB,
121 .dev.platform_data = ixdp425_plat_eth,
122 + .dev.coherent_dma_mask = DMA_BIT_MASK(32),
123 }, {
124 .name = "ixp4xx_eth",
125 .id = IXP4XX_ETH_NPEC,
126 .dev.platform_data = ixdp425_plat_eth + 1,
127 + .dev.coherent_dma_mask = DMA_BIT_MASK(32),
128 },
129 };
130
131 Index: linux-3.18.5/arch/arm/mach-ixp4xx/vulcan-setup.c
132 ===================================================================
133 --- linux-3.18.5.orig/arch/arm/mach-ixp4xx/vulcan-setup.c 2015-02-09 13:54:27.000000000 +0100
134 +++ linux-3.18.5/arch/arm/mach-ixp4xx/vulcan-setup.c 2015-02-09 13:54:43.025969682 +0100
135 @@ -139,6 +139,7 @@
136 .id = IXP4XX_ETH_NPEB,
137 .dev = {
138 .platform_data = &vulcan_plat_eth[0],
139 + .coherent_dma_mask = DMA_BIT_MASK(32),
140 },
141 },
142 [1] = {
143 @@ -146,6 +147,7 @@
144 .id = IXP4XX_ETH_NPEC,
145 .dev = {
146 .platform_data = &vulcan_plat_eth[1],
147 + .coherent_dma_mask = DMA_BIT_MASK(32),
148 },
149 },
150 };