Skip to content

Commit b1e479e

Browse files
mlauss2paulburton
authored andcommitted
MIPS: Alchemy: add DMA masks for on-chip ethernet
Makes au1000-eth work again, tested on DB1500. Signed-off-by: Manuel Lauss <[email protected]> Signed-off-by: Paul Burton <[email protected]> Cc: Linux-MIPS <[email protected]>
1 parent 81fca03 commit b1e479e

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

arch/mips/alchemy/common/platform.c

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,7 @@ static void __init alchemy_setup_uarts(int ctype)
131131
}
132132

133133

134-
/* The dmamask must be set for OHCI/EHCI to work */
135-
static u64 alchemy_ohci_dmamask = DMA_BIT_MASK(32);
136-
static u64 __maybe_unused alchemy_ehci_dmamask = DMA_BIT_MASK(32);
134+
static u64 alchemy_all_dmamask = DMA_BIT_MASK(32);
137135

138136
/* Power on callback for the ehci platform driver */
139137
static int alchemy_ehci_power_on(struct platform_device *pdev)
@@ -231,7 +229,7 @@ static void __init alchemy_setup_usb(int ctype)
231229
res[1].flags = IORESOURCE_IRQ;
232230
pdev->name = "ohci-platform";
233231
pdev->id = 0;
234-
pdev->dev.dma_mask = &alchemy_ohci_dmamask;
232+
pdev->dev.dma_mask = &alchemy_all_dmamask;
235233
pdev->dev.platform_data = &alchemy_ohci_pdata;
236234

237235
if (platform_device_register(pdev))
@@ -251,7 +249,7 @@ static void __init alchemy_setup_usb(int ctype)
251249
res[1].flags = IORESOURCE_IRQ;
252250
pdev->name = "ehci-platform";
253251
pdev->id = 0;
254-
pdev->dev.dma_mask = &alchemy_ehci_dmamask;
252+
pdev->dev.dma_mask = &alchemy_all_dmamask;
255253
pdev->dev.platform_data = &alchemy_ehci_pdata;
256254

257255
if (platform_device_register(pdev))
@@ -271,7 +269,7 @@ static void __init alchemy_setup_usb(int ctype)
271269
res[1].flags = IORESOURCE_IRQ;
272270
pdev->name = "ohci-platform";
273271
pdev->id = 1;
274-
pdev->dev.dma_mask = &alchemy_ohci_dmamask;
272+
pdev->dev.dma_mask = &alchemy_all_dmamask;
275273
pdev->dev.platform_data = &alchemy_ohci_pdata;
276274

277275
if (platform_device_register(pdev))
@@ -338,7 +336,11 @@ static struct platform_device au1xxx_eth0_device = {
338336
.name = "au1000-eth",
339337
.id = 0,
340338
.num_resources = MAC_RES_COUNT,
341-
.dev.platform_data = &au1xxx_eth0_platform_data,
339+
.dev = {
340+
.dma_mask = &alchemy_all_dmamask,
341+
.coherent_dma_mask = DMA_BIT_MASK(32),
342+
.platform_data = &au1xxx_eth0_platform_data,
343+
},
342344
};
343345

344346
static struct resource au1xxx_eth1_resources[][MAC_RES_COUNT] __initdata = {
@@ -370,7 +372,11 @@ static struct platform_device au1xxx_eth1_device = {
370372
.name = "au1000-eth",
371373
.id = 1,
372374
.num_resources = MAC_RES_COUNT,
373-
.dev.platform_data = &au1xxx_eth1_platform_data,
375+
.dev = {
376+
.dma_mask = &alchemy_all_dmamask,
377+
.coherent_dma_mask = DMA_BIT_MASK(32),
378+
.platform_data = &au1xxx_eth1_platform_data,
379+
},
374380
};
375381

376382
void __init au1xxx_override_eth_cfg(unsigned int port,

0 commit comments

Comments
 (0)