Commit b1e479e3 authored by Manuel Lauss's avatar Manuel Lauss Committed by Paul Burton

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

Makes au1000-eth work again, tested on DB1500.
Signed-off-by: default avatarManuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: default avatarPaul Burton <paul.burton@mips.com>
Cc: Linux-MIPS <linux-mips@linux-mips.org>
parent 81fca03a
...@@ -131,9 +131,7 @@ static void __init alchemy_setup_uarts(int ctype) ...@@ -131,9 +131,7 @@ static void __init alchemy_setup_uarts(int ctype)
} }
/* The dmamask must be set for OHCI/EHCI to work */ static u64 alchemy_all_dmamask = DMA_BIT_MASK(32);
static u64 alchemy_ohci_dmamask = DMA_BIT_MASK(32);
static u64 __maybe_unused alchemy_ehci_dmamask = DMA_BIT_MASK(32);
/* Power on callback for the ehci platform driver */ /* Power on callback for the ehci platform driver */
static int alchemy_ehci_power_on(struct platform_device *pdev) static int alchemy_ehci_power_on(struct platform_device *pdev)
...@@ -231,7 +229,7 @@ static void __init alchemy_setup_usb(int ctype) ...@@ -231,7 +229,7 @@ static void __init alchemy_setup_usb(int ctype)
res[1].flags = IORESOURCE_IRQ; res[1].flags = IORESOURCE_IRQ;
pdev->name = "ohci-platform"; pdev->name = "ohci-platform";
pdev->id = 0; pdev->id = 0;
pdev->dev.dma_mask = &alchemy_ohci_dmamask; pdev->dev.dma_mask = &alchemy_all_dmamask;
pdev->dev.platform_data = &alchemy_ohci_pdata; pdev->dev.platform_data = &alchemy_ohci_pdata;
if (platform_device_register(pdev)) if (platform_device_register(pdev))
...@@ -251,7 +249,7 @@ static void __init alchemy_setup_usb(int ctype) ...@@ -251,7 +249,7 @@ static void __init alchemy_setup_usb(int ctype)
res[1].flags = IORESOURCE_IRQ; res[1].flags = IORESOURCE_IRQ;
pdev->name = "ehci-platform"; pdev->name = "ehci-platform";
pdev->id = 0; pdev->id = 0;
pdev->dev.dma_mask = &alchemy_ehci_dmamask; pdev->dev.dma_mask = &alchemy_all_dmamask;
pdev->dev.platform_data = &alchemy_ehci_pdata; pdev->dev.platform_data = &alchemy_ehci_pdata;
if (platform_device_register(pdev)) if (platform_device_register(pdev))
...@@ -271,7 +269,7 @@ static void __init alchemy_setup_usb(int ctype) ...@@ -271,7 +269,7 @@ static void __init alchemy_setup_usb(int ctype)
res[1].flags = IORESOURCE_IRQ; res[1].flags = IORESOURCE_IRQ;
pdev->name = "ohci-platform"; pdev->name = "ohci-platform";
pdev->id = 1; pdev->id = 1;
pdev->dev.dma_mask = &alchemy_ohci_dmamask; pdev->dev.dma_mask = &alchemy_all_dmamask;
pdev->dev.platform_data = &alchemy_ohci_pdata; pdev->dev.platform_data = &alchemy_ohci_pdata;
if (platform_device_register(pdev)) if (platform_device_register(pdev))
...@@ -338,7 +336,11 @@ static struct platform_device au1xxx_eth0_device = { ...@@ -338,7 +336,11 @@ static struct platform_device au1xxx_eth0_device = {
.name = "au1000-eth", .name = "au1000-eth",
.id = 0, .id = 0,
.num_resources = MAC_RES_COUNT, .num_resources = MAC_RES_COUNT,
.dev.platform_data = &au1xxx_eth0_platform_data, .dev = {
.dma_mask = &alchemy_all_dmamask,
.coherent_dma_mask = DMA_BIT_MASK(32),
.platform_data = &au1xxx_eth0_platform_data,
},
}; };
static struct resource au1xxx_eth1_resources[][MAC_RES_COUNT] __initdata = { static struct resource au1xxx_eth1_resources[][MAC_RES_COUNT] __initdata = {
...@@ -370,7 +372,11 @@ static struct platform_device au1xxx_eth1_device = { ...@@ -370,7 +372,11 @@ static struct platform_device au1xxx_eth1_device = {
.name = "au1000-eth", .name = "au1000-eth",
.id = 1, .id = 1,
.num_resources = MAC_RES_COUNT, .num_resources = MAC_RES_COUNT,
.dev.platform_data = &au1xxx_eth1_platform_data, .dev = {
.dma_mask = &alchemy_all_dmamask,
.coherent_dma_mask = DMA_BIT_MASK(32),
.platform_data = &au1xxx_eth1_platform_data,
},
}; };
void __init au1xxx_override_eth_cfg(unsigned int port, void __init au1xxx_override_eth_cfg(unsigned int port,
......
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