Commit 81fca03a authored by Thomas Bogendoerfer's avatar Thomas Bogendoerfer Committed by Paul Burton

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: default avatarThomas Bogendoerfer <tbogendoerfer@suse.de>
Signed-off-by: default avatarPaul 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
parent 67eebf72
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
#include <linux/if_ether.h> #include <linux/if_ether.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/dma-mapping.h>
#include <asm/paccess.h> #include <asm/paccess.h>
#include <asm/sgi/ip22.h> #include <asm/sgi/ip22.h>
...@@ -25,6 +26,8 @@ static struct sgiwd93_platform_data sgiwd93_0_pd = { ...@@ -25,6 +26,8 @@ static struct sgiwd93_platform_data sgiwd93_0_pd = {
.irq = SGI_WD93_0_IRQ, .irq = SGI_WD93_0_IRQ,
}; };
static u64 sgiwd93_0_dma_mask = DMA_BIT_MASK(32);
static struct platform_device sgiwd93_0_device = { static struct platform_device sgiwd93_0_device = {
.name = "sgiwd93", .name = "sgiwd93",
.id = 0, .id = 0,
...@@ -32,6 +35,8 @@ static struct platform_device sgiwd93_0_device = { ...@@ -32,6 +35,8 @@ static struct platform_device sgiwd93_0_device = {
.resource = sgiwd93_0_resources, .resource = sgiwd93_0_resources,
.dev = { .dev = {
.platform_data = &sgiwd93_0_pd, .platform_data = &sgiwd93_0_pd,
.dma_mask = &sgiwd93_0_dma_mask,
.coherent_dma_mask = DMA_BIT_MASK(32),
}, },
}; };
...@@ -49,6 +54,8 @@ static struct sgiwd93_platform_data sgiwd93_1_pd = { ...@@ -49,6 +54,8 @@ static struct sgiwd93_platform_data sgiwd93_1_pd = {
.irq = SGI_WD93_1_IRQ, .irq = SGI_WD93_1_IRQ,
}; };
static u64 sgiwd93_1_dma_mask = DMA_BIT_MASK(32);
static struct platform_device sgiwd93_1_device = { static struct platform_device sgiwd93_1_device = {
.name = "sgiwd93", .name = "sgiwd93",
.id = 1, .id = 1,
...@@ -56,6 +63,8 @@ static struct platform_device sgiwd93_1_device = { ...@@ -56,6 +63,8 @@ static struct platform_device sgiwd93_1_device = {
.resource = sgiwd93_1_resources, .resource = sgiwd93_1_resources,
.dev = { .dev = {
.platform_data = &sgiwd93_1_pd, .platform_data = &sgiwd93_1_pd,
.dma_mask = &sgiwd93_1_dma_mask,
.coherent_dma_mask = DMA_BIT_MASK(32),
}, },
}; };
...@@ -96,6 +105,8 @@ static struct resource sgiseeq_0_resources[] = { ...@@ -96,6 +105,8 @@ static struct resource sgiseeq_0_resources[] = {
static struct sgiseeq_platform_data eth0_pd; static struct sgiseeq_platform_data eth0_pd;
static u64 sgiseeq_dma_mask = DMA_BIT_MASK(32);
static struct platform_device eth0_device = { static struct platform_device eth0_device = {
.name = "sgiseeq", .name = "sgiseeq",
.id = 0, .id = 0,
...@@ -103,6 +114,8 @@ static struct platform_device eth0_device = { ...@@ -103,6 +114,8 @@ static struct platform_device eth0_device = {
.resource = sgiseeq_0_resources, .resource = sgiseeq_0_resources,
.dev = { .dev = {
.platform_data = &eth0_pd, .platform_data = &eth0_pd,
.dma_mask = &sgiseeq_dma_mask,
.coherent_dma_mask = DMA_BIT_MASK(32),
}, },
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment