diff options
author | Thomas Bogendoerfer <tbogendoerfer@suse.de> | 2019-05-13 07:16:08 -0400 |
---|---|---|
committer | Paul Burton <paul.burton@mips.com> | 2019-05-13 15:02:55 -0400 |
commit | 81fca03ae741d8b1f21cdc5de7a93826cde27959 (patch) | |
tree | 3d3229c17b54c168dc638001606266e5da796f2a | |
parent | 67eebf7213046e65d8fb1f37f5fd10d5fb71e098 (diff) |
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 <tbogendoerfer@suse.de>
Signed-off-by: Paul Burton <paul.burton@mips.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: James Hogan <jhogan@kernel.org>
Cc: linux-mips@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
-rw-r--r-- | arch/mips/sgi-ip22/ip22-platform.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/mips/sgi-ip22/ip22-platform.c b/arch/mips/sgi-ip22/ip22-platform.c index 37ad26716579..0b2002e02a47 100644 --- a/arch/mips/sgi-ip22/ip22-platform.c +++ b/arch/mips/sgi-ip22/ip22-platform.c | |||
@@ -3,6 +3,7 @@ | |||
3 | #include <linux/if_ether.h> | 3 | #include <linux/if_ether.h> |
4 | #include <linux/kernel.h> | 4 | #include <linux/kernel.h> |
5 | #include <linux/platform_device.h> | 5 | #include <linux/platform_device.h> |
6 | #include <linux/dma-mapping.h> | ||
6 | 7 | ||
7 | #include <asm/paccess.h> | 8 | #include <asm/paccess.h> |
8 | #include <asm/sgi/ip22.h> | 9 | #include <asm/sgi/ip22.h> |
@@ -25,6 +26,8 @@ static struct sgiwd93_platform_data sgiwd93_0_pd = { | |||
25 | .irq = SGI_WD93_0_IRQ, | 26 | .irq = SGI_WD93_0_IRQ, |
26 | }; | 27 | }; |
27 | 28 | ||
29 | static u64 sgiwd93_0_dma_mask = DMA_BIT_MASK(32); | ||
30 | |||
28 | static struct platform_device sgiwd93_0_device = { | 31 | static struct platform_device sgiwd93_0_device = { |
29 | .name = "sgiwd93", | 32 | .name = "sgiwd93", |
30 | .id = 0, | 33 | .id = 0, |
@@ -32,6 +35,8 @@ static struct platform_device sgiwd93_0_device = { | |||
32 | .resource = sgiwd93_0_resources, | 35 | .resource = sgiwd93_0_resources, |
33 | .dev = { | 36 | .dev = { |
34 | .platform_data = &sgiwd93_0_pd, | 37 | .platform_data = &sgiwd93_0_pd, |
38 | .dma_mask = &sgiwd93_0_dma_mask, | ||
39 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
35 | }, | 40 | }, |
36 | }; | 41 | }; |
37 | 42 | ||
@@ -49,6 +54,8 @@ static struct sgiwd93_platform_data sgiwd93_1_pd = { | |||
49 | .irq = SGI_WD93_1_IRQ, | 54 | .irq = SGI_WD93_1_IRQ, |
50 | }; | 55 | }; |
51 | 56 | ||
57 | static u64 sgiwd93_1_dma_mask = DMA_BIT_MASK(32); | ||
58 | |||
52 | static struct platform_device sgiwd93_1_device = { | 59 | static struct platform_device sgiwd93_1_device = { |
53 | .name = "sgiwd93", | 60 | .name = "sgiwd93", |
54 | .id = 1, | 61 | .id = 1, |
@@ -56,6 +63,8 @@ static struct platform_device sgiwd93_1_device = { | |||
56 | .resource = sgiwd93_1_resources, | 63 | .resource = sgiwd93_1_resources, |
57 | .dev = { | 64 | .dev = { |
58 | .platform_data = &sgiwd93_1_pd, | 65 | .platform_data = &sgiwd93_1_pd, |
66 | .dma_mask = &sgiwd93_1_dma_mask, | ||
67 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
59 | }, | 68 | }, |
60 | }; | 69 | }; |
61 | 70 | ||
@@ -96,6 +105,8 @@ static struct resource sgiseeq_0_resources[] = { | |||
96 | 105 | ||
97 | static struct sgiseeq_platform_data eth0_pd; | 106 | static struct sgiseeq_platform_data eth0_pd; |
98 | 107 | ||
108 | static u64 sgiseeq_dma_mask = DMA_BIT_MASK(32); | ||
109 | |||
99 | static struct platform_device eth0_device = { | 110 | static struct platform_device eth0_device = { |
100 | .name = "sgiseeq", | 111 | .name = "sgiseeq", |
101 | .id = 0, | 112 | .id = 0, |
@@ -103,6 +114,8 @@ static struct platform_device eth0_device = { | |||
103 | .resource = sgiseeq_0_resources, | 114 | .resource = sgiseeq_0_resources, |
104 | .dev = { | 115 | .dev = { |
105 | .platform_data = ð0_pd, | 116 | .platform_data = ð0_pd, |
117 | .dma_mask = &sgiseeq_dma_mask, | ||
118 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
106 | }, | 119 | }, |
107 | }; | 120 | }; |
108 | 121 | ||