ixp4xx: add linux 4.1 support
[openwrt/openwrt.git] / target / linux / ixp4xx / patches-4.1 / 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 --- a/arch/arm/mach-ixp4xx/fsg-setup.c
22 +++ b/arch/arm/mach-ixp4xx/fsg-setup.c
23 @@ -142,12 +142,14 @@ static struct platform_device fsg_eth[]
24 .id = IXP4XX_ETH_NPEB,
25 .dev = {
26 .platform_data = fsg_plat_eth,
27 + .coherent_dma_mask = DMA_BIT_MASK(32),
28 },
29 }, {
30 .name = "ixp4xx_eth",
31 .id = IXP4XX_ETH_NPEC,
32 .dev = {
33 .platform_data = fsg_plat_eth + 1,
34 + .coherent_dma_mask = DMA_BIT_MASK(32),
35 },
36 }
37 };
38 --- a/arch/arm/mach-ixp4xx/goramo_mlr.c
39 +++ b/arch/arm/mach-ixp4xx/goramo_mlr.c
40 @@ -295,10 +295,12 @@ static struct platform_device device_eth
41 .name = "ixp4xx_eth",
42 .id = IXP4XX_ETH_NPEB,
43 .dev.platform_data = eth_plat,
44 + .dev.coherent_dma_mask = DMA_BIT_MASK(32),
45 }, {
46 .name = "ixp4xx_eth",
47 .id = IXP4XX_ETH_NPEC,
48 .dev.platform_data = eth_plat + 1,
49 + .dev.coherent_dma_mask = DMA_BIT_MASK(32),
50 }
51 };
52
53 --- a/arch/arm/mach-ixp4xx/ixdp425-setup.c
54 +++ b/arch/arm/mach-ixp4xx/ixdp425-setup.c
55 @@ -20,6 +20,7 @@
56 #include <linux/mtd/nand.h>
57 #include <linux/mtd/partitions.h>
58 #include <linux/delay.h>
59 +#include <linux/dma-mapping.h>
60 #include <linux/gpio.h>
61 #include <asm/types.h>
62 #include <asm/setup.h>
63 @@ -196,10 +197,12 @@ static struct platform_device ixdp425_et
64 .name = "ixp4xx_eth",
65 .id = IXP4XX_ETH_NPEB,
66 .dev.platform_data = ixdp425_plat_eth,
67 + .dev.coherent_dma_mask = DMA_BIT_MASK(32),
68 }, {
69 .name = "ixp4xx_eth",
70 .id = IXP4XX_ETH_NPEC,
71 .dev.platform_data = ixdp425_plat_eth + 1,
72 + .dev.coherent_dma_mask = DMA_BIT_MASK(32),
73 }
74 };
75
76 --- a/arch/arm/mach-ixp4xx/nas100d-setup.c
77 +++ b/arch/arm/mach-ixp4xx/nas100d-setup.c
78 @@ -170,6 +170,7 @@ static struct platform_device nas100d_et
79 .name = "ixp4xx_eth",
80 .id = IXP4XX_ETH_NPEB,
81 .dev.platform_data = nas100d_plat_eth,
82 + .dev.coherent_dma_mask = DMA_BIT_MASK(32),
83 }
84 };
85
86 --- a/arch/arm/mach-ixp4xx/nslu2-setup.c
87 +++ b/arch/arm/mach-ixp4xx/nslu2-setup.c
88 @@ -182,6 +182,7 @@ static struct platform_device nslu2_eth[
89 .name = "ixp4xx_eth",
90 .id = IXP4XX_ETH_NPEB,
91 .dev.platform_data = nslu2_plat_eth,
92 + .dev.coherent_dma_mask = DMA_BIT_MASK(32),
93 }
94 };
95
96 --- a/arch/arm/mach-ixp4xx/omixp-setup.c
97 +++ b/arch/arm/mach-ixp4xx/omixp-setup.c
98 @@ -17,6 +17,7 @@
99 #include <linux/serial_8250.h>
100 #include <linux/mtd/mtd.h>
101 #include <linux/mtd/partitions.h>
102 +#include <linux/dma-mapping.h>
103 #include <linux/leds.h>
104
105 #include <asm/setup.h>
106 @@ -188,10 +189,12 @@ static struct platform_device ixdp425_et
107 .name = "ixp4xx_eth",
108 .id = IXP4XX_ETH_NPEB,
109 .dev.platform_data = ixdp425_plat_eth,
110 + .dev.coherent_dma_mask = DMA_BIT_MASK(32),
111 }, {
112 .name = "ixp4xx_eth",
113 .id = IXP4XX_ETH_NPEC,
114 .dev.platform_data = ixdp425_plat_eth + 1,
115 + .dev.coherent_dma_mask = DMA_BIT_MASK(32),
116 },
117 };
118
119 --- a/arch/arm/mach-ixp4xx/vulcan-setup.c
120 +++ b/arch/arm/mach-ixp4xx/vulcan-setup.c
121 @@ -139,6 +139,7 @@ static struct platform_device vulcan_eth
122 .id = IXP4XX_ETH_NPEB,
123 .dev = {
124 .platform_data = &vulcan_plat_eth[0],
125 + .coherent_dma_mask = DMA_BIT_MASK(32),
126 },
127 },
128 [1] = {
129 @@ -146,6 +147,7 @@ static struct platform_device vulcan_eth
130 .id = IXP4XX_ETH_NPEC,
131 .dev = {
132 .platform_data = &vulcan_plat_eth[1],
133 + .coherent_dma_mask = DMA_BIT_MASK(32),
134 },
135 },
136 };