fix mv643xx_eth dma mask
[openwrt/svn-archive/archive.git] / target / linux / generic-2.6 / patches-2.6.30 / 991-mv643xx_eth_coherent_dma_mask.patch
1 From: Nicolas Pitre <nico@cam.org>
2 Date: Fri, 22 May 2009 20:53:40 +0000 (-0400)
3 Subject: [ARM] add coherent DMA mask for mv643xx_eth
4 X-Git-Url: http://git.marvell.com/?p=orion.git;a=commitdiff_plain;h=a49a018a6ea6d73742a81d673fe5ec4a7d2137b3
5
6 [ARM] add coherent DMA mask for mv643xx_eth
7
8 Since commit eb0519b5a1cf, mv643xx_eth is non functional on ARM because
9 the platform device declaration does not include any coherent DMA mask
10 and coherent memory allocations fail.
11
12 Signed-off-by: Nicolas Pitre <nico@marvell.com>
13 ---
14
15 --- a/arch/arm/mach-kirkwood/common.c
16 +++ b/arch/arm/mach-kirkwood/common.c
17 @@ -144,6 +144,9 @@ static struct platform_device kirkwood_g
18 .id = 0,
19 .num_resources = 1,
20 .resource = kirkwood_ge00_resources,
21 + .dev = {
22 + .coherent_dma_mask = 0xffffffff,
23 + },
24 };
25
26 void __init kirkwood_ge00_init(struct mv643xx_eth_platform_data *eth_data)
27 @@ -202,6 +205,9 @@ static struct platform_device kirkwood_g
28 .id = 1,
29 .num_resources = 1,
30 .resource = kirkwood_ge01_resources,
31 + .dev = {
32 + .coherent_dma_mask = 0xffffffff,
33 + },
34 };
35
36 void __init kirkwood_ge01_init(struct mv643xx_eth_platform_data *eth_data)
37 --- a/arch/arm/mach-loki/common.c
38 +++ b/arch/arm/mach-loki/common.c
39 @@ -82,6 +82,9 @@ static struct platform_device loki_ge0 =
40 .id = 0,
41 .num_resources = 1,
42 .resource = loki_ge0_resources,
43 + .dev = {
44 + .coherent_dma_mask = 0xffffffff,
45 + },
46 };
47
48 void __init loki_ge0_init(struct mv643xx_eth_platform_data *eth_data)
49 @@ -136,6 +139,9 @@ static struct platform_device loki_ge1 =
50 .id = 1,
51 .num_resources = 1,
52 .resource = loki_ge1_resources,
53 + .dev = {
54 + .coherent_dma_mask = 0xffffffff,
55 + },
56 };
57
58 void __init loki_ge1_init(struct mv643xx_eth_platform_data *eth_data)
59 --- a/arch/arm/mach-mv78xx0/common.c
60 +++ b/arch/arm/mach-mv78xx0/common.c
61 @@ -321,6 +321,9 @@ static struct platform_device mv78xx0_ge
62 .id = 0,
63 .num_resources = 1,
64 .resource = mv78xx0_ge00_resources,
65 + .dev = {
66 + .coherent_dma_mask = 0xffffffff,
67 + },
68 };
69
70 void __init mv78xx0_ge00_init(struct mv643xx_eth_platform_data *eth_data)
71 @@ -375,6 +378,9 @@ static struct platform_device mv78xx0_ge
72 .id = 1,
73 .num_resources = 1,
74 .resource = mv78xx0_ge01_resources,
75 + .dev = {
76 + .coherent_dma_mask = 0xffffffff,
77 + },
78 };
79
80 void __init mv78xx0_ge01_init(struct mv643xx_eth_platform_data *eth_data)
81 @@ -429,6 +435,9 @@ static struct platform_device mv78xx0_ge
82 .id = 2,
83 .num_resources = 1,
84 .resource = mv78xx0_ge10_resources,
85 + .dev = {
86 + .coherent_dma_mask = 0xffffffff,
87 + },
88 };
89
90 void __init mv78xx0_ge10_init(struct mv643xx_eth_platform_data *eth_data)
91 @@ -496,6 +505,9 @@ static struct platform_device mv78xx0_ge
92 .id = 3,
93 .num_resources = 1,
94 .resource = mv78xx0_ge11_resources,
95 + .dev = {
96 + .coherent_dma_mask = 0xffffffff,
97 + },
98 };
99
100 void __init mv78xx0_ge11_init(struct mv643xx_eth_platform_data *eth_data)
101 --- a/arch/arm/mach-orion5x/common.c
102 +++ b/arch/arm/mach-orion5x/common.c
103 @@ -188,6 +188,9 @@ static struct platform_device orion5x_et
104 .id = 0,
105 .num_resources = 1,
106 .resource = orion5x_eth_resources,
107 + .dev = {
108 + .coherent_dma_mask = 0xffffffff,
109 + },
110 };
111
112 void __init orion5x_eth_init(struct mv643xx_eth_platform_data *eth_data)