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
131}131}
132 132
133 133
134/* The dmamask must be set for OHCI/EHCI to work */134static u64 alchemy_all_dmamask = DMA_BIT_MASK(32);
135static u64 alchemy_ohci_dmamask = DMA_BIT_MASK(32);
136static u64 __maybe_unused alchemy_ehci_dmamask = DMA_BIT_MASK(32);
137 135
138/* Power on callback for the ehci platform driver */136/* Power on callback for the ehci platform driver */
139static int alchemy_ehci_power_on(struct platform_device *pdev)137static int alchemy_ehci_power_on(struct platform_device *pdev)
@@ -231,7 +229,7 @@ static void __init alchemy_setup_usb(int ctype) · 91 unmodified lines
231 res[1].flags = IORESOURCE_IRQ;229 res[1].flags = IORESOURCE_IRQ;
232 pdev->name = "ohci-platform";230 pdev->name = "ohci-platform";
233 pdev->id = 0;231 pdev->id = 0;
234 pdev->dev.dma_mask = &alchemy_ohci_dmamask;232 pdev->dev.dma_mask = &alchemy_all_dmamask;
235 pdev->dev.platform_data = &alchemy_ohci_pdata;233 pdev->dev.platform_data = &alchemy_ohci_pdata;
236 234
237 if (platform_device_register(pdev))235 if (platform_device_register(pdev))
@@ -251,7 +249,7 @@ static void __init alchemy_setup_usb(int ctype) · 13 unmodified lines
251 res[1].flags = IORESOURCE_IRQ;249 res[1].flags = IORESOURCE_IRQ;
252 pdev->name = "ehci-platform";250 pdev->name = "ehci-platform";
253 pdev->id = 0;251 pdev->id = 0;
254 pdev->dev.dma_mask = &alchemy_ehci_dmamask;252 pdev->dev.dma_mask = &alchemy_all_dmamask;
255 pdev->dev.platform_data = &alchemy_ehci_pdata;253 pdev->dev.platform_data = &alchemy_ehci_pdata;
256 254
257 if (platform_device_register(pdev))255 if (platform_device_register(pdev))
@@ -271,7 +269,7 @@ static void __init alchemy_setup_usb(int ctype) · 13 unmodified lines
271 res[1].flags = IORESOURCE_IRQ;269 res[1].flags = IORESOURCE_IRQ;
272 pdev->name = "ohci-platform";270 pdev->name = "ohci-platform";
273 pdev->id = 1;271 pdev->id = 1;
274 pdev->dev.dma_mask = &alchemy_ohci_dmamask;272 pdev->dev.dma_mask = &alchemy_all_dmamask;
275 pdev->dev.platform_data = &alchemy_ohci_pdata;273 pdev->dev.platform_data = &alchemy_ohci_pdata;
276 274
277 if (platform_device_register(pdev))275 if (platform_device_register(pdev))
@@ -338,7 +336,11 @@ static struct platform_device au1xxx_eth0_device = { · 60 unmodified lines
338 .name = "au1000-eth",336 .name = "au1000-eth",
339 .id = 0,337 .id = 0,
340 .num_resources = MAC_RES_COUNT,338 .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 },
342};344};
343 345
344static struct resource au1xxx_eth1_resources[][MAC_RES_COUNT] __initdata = {346static struct resource au1xxx_eth1_resources[][MAC_RES_COUNT] __initdata = {
@@ -370,7 +372,11 @@ static struct platform_device au1xxx_eth1_device = { · 25 unmodified lines
370 .name = "au1000-eth",372 .name = "au1000-eth",
371 .id = 1,373 .id = 1,
372 .num_resources = MAC_RES_COUNT,374 .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 },
374};380};
375 381
376void __init au1xxx_override_eth_cfg(unsigned int port,382void __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