Skip to content

Commit 81fca03

Browse files
Thomas Bogendoerferpaulburton
authored andcommitted
MIPS: SGI-IP22: provide missing dma_mask/coherent_dma_mask
Set dma_masks for SGIWD93 and SGISEEQ otherwise DMA allocations fails and causes not working SCSI/ethernet. Signed-off-by: Thomas Bogendoerfer <[email protected]> Signed-off-by: Paul Burton <[email protected]> Cc: Ralf Baechle <[email protected]> Cc: James Hogan <[email protected]> Cc: [email protected] Cc: [email protected]
1 parent 67eebf7 commit 81fca03

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

arch/mips/sgi-ip22/ip22-platform.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#include <linux/if_ether.h>
44
#include <linux/kernel.h>
55
#include <linux/platform_device.h>
6+
#include <linux/dma-mapping.h>
67

78
#include <asm/paccess.h>
89
#include <asm/sgi/ip22.h>
@@ -25,13 +26,17 @@ static struct sgiwd93_platform_data sgiwd93_0_pd = {
2526
.irq = SGI_WD93_0_IRQ,
2627
};
2728

29+
static u64 sgiwd93_0_dma_mask = DMA_BIT_MASK(32);
30+
2831
static struct platform_device sgiwd93_0_device = {
2932
.name = "sgiwd93",
3033
.id = 0,
3134
.num_resources = ARRAY_SIZE(sgiwd93_0_resources),
3235
.resource = sgiwd93_0_resources,
3336
.dev = {
3437
.platform_data = &sgiwd93_0_pd,
38+
.dma_mask = &sgiwd93_0_dma_mask,
39+
.coherent_dma_mask = DMA_BIT_MASK(32),
3540
},
3641
};
3742

@@ -49,13 +54,17 @@ static struct sgiwd93_platform_data sgiwd93_1_pd = {
4954
.irq = SGI_WD93_1_IRQ,
5055
};
5156

57+
static u64 sgiwd93_1_dma_mask = DMA_BIT_MASK(32);
58+
5259
static struct platform_device sgiwd93_1_device = {
5360
.name = "sgiwd93",
5461
.id = 1,
5562
.num_resources = ARRAY_SIZE(sgiwd93_1_resources),
5663
.resource = sgiwd93_1_resources,
5764
.dev = {
5865
.platform_data = &sgiwd93_1_pd,
66+
.dma_mask = &sgiwd93_1_dma_mask,
67+
.coherent_dma_mask = DMA_BIT_MASK(32),
5968
},
6069
};
6170

@@ -96,13 +105,17 @@ static struct resource sgiseeq_0_resources[] = {
96105

97106
static struct sgiseeq_platform_data eth0_pd;
98107

108+
static u64 sgiseeq_dma_mask = DMA_BIT_MASK(32);
109+
99110
static struct platform_device eth0_device = {
100111
.name = "sgiseeq",
101112
.id = 0,
102113
.num_resources = ARRAY_SIZE(sgiseeq_0_resources),
103114
.resource = sgiseeq_0_resources,
104115
.dev = {
105116
.platform_data = &eth0_pd,
117+
.dma_mask = &sgiseeq_dma_mask,
118+
.coherent_dma_mask = DMA_BIT_MASK(32),
106119
},
107120
};
108121

0 commit comments

Comments
 (0)