History

MIPS: Alchemy: add DMA masks for on-chip ethernet

Makes au1000-eth work again, tested on DB1500.

Manuel Lauss committed 7 years ago

Commit b1e479e1 parent 81fca031 file · +14 −8Browse files

Unified · Split

arch/mips/alchemy/common/platform.c+14−8
@@ -131,9 +131,7 @@ static void __init alchemy_setup_uarts(int ctype) · 130 unmodified lines
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) · 91 unmodified lines
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) · 13 unmodified lines
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) · 13 unmodified lines
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 = { · 60 unmodified lines
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 = { · 25 unmodified lines
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,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t