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
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.
10 Signed-off-by: Jonas Gorski <jogo@openwrt.org>
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(+)
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
26 .id = IXP4XX_ETH_NPEB,
28 .platform_data = fsg_plat_eth,
29 + .coherent_dma_mask = DMA_BIT_MASK(32),
33 .id = IXP4XX_ETH_NPEC,
35 .platform_data = fsg_plat_eth + 1,
36 + .coherent_dma_mask = DMA_BIT_MASK(32),
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
46 .id = IXP4XX_ETH_NPEB,
47 .dev.platform_data = eth_plat,
48 + .dev.coherent_dma_mask = DMA_BIT_MASK(32),
51 .id = IXP4XX_ETH_NPEC,
52 .dev.platform_data = eth_plat + 1,
53 + .dev.coherent_dma_mask = DMA_BIT_MASK(32),
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
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>
71 .id = IXP4XX_ETH_NPEB,
72 .dev.platform_data = ixdp425_plat_eth,
73 + .dev.coherent_dma_mask = DMA_BIT_MASK(32),
76 .id = IXP4XX_ETH_NPEC,
77 .dev.platform_data = ixdp425_plat_eth + 1,
78 + .dev.coherent_dma_mask = DMA_BIT_MASK(32),
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
88 .id = IXP4XX_ETH_NPEB,
89 .dev.platform_data = nas100d_plat_eth,
90 + .dev.coherent_dma_mask = DMA_BIT_MASK(32),
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
100 .id = IXP4XX_ETH_NPEB,
101 .dev.platform_data = nslu2_plat_eth,
102 + .dev.coherent_dma_mask = DMA_BIT_MASK(32),
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
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>
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),
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),
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
136 .id = IXP4XX_ETH_NPEB,
138 .platform_data = &vulcan_plat_eth[0],
139 + .coherent_dma_mask = DMA_BIT_MASK(32),
144 .id = IXP4XX_ETH_NPEC,
146 .platform_data = &vulcan_plat_eth[1],
147 + .coherent_dma_mask = DMA_BIT_MASK(32),