Skip to content

Commit

Permalink
powerpc: Add coherent_dma_mask to mv64x60 devices
Browse files Browse the repository at this point in the history
DMA ops requires that coherent_dma_mask be set properly for a device,
but this was not being done for devices on the MV64x60 that use DMA.
Both the serial and ethernet devices need this or they won't be able
to allocate memory.

Signed-off-by: Corey Minyard <cminyard@mvista.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
  • Loading branch information
Corey Minyard authored and Benjamin Herrenschmidt committed Feb 17, 2010
1 parent ec144a8 commit e0508b1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/powerpc/sysdev/mv64x60_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include <linux/mv643xx.h>
#include <linux/platform_device.h>
#include <linux/of_platform.h>
#include <linux/dma-mapping.h>

#include <asm/prom.h>

Expand Down Expand Up @@ -189,6 +190,7 @@ static int __init mv64x60_mpsc_device_setup(struct device_node *np, int id)
pdev = platform_device_alloc(MPSC_CTLR_NAME, port_number);
if (!pdev)
return -ENOMEM;
pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32);

err = platform_device_add_resources(pdev, r, 5);
if (err)
Expand Down Expand Up @@ -302,6 +304,7 @@ static int __init mv64x60_eth_device_setup(struct device_node *np, int id,
if (!pdev)
return -ENOMEM;

pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
err = platform_device_add_resources(pdev, r, 1);
if (err)
goto error;
Expand Down

0 comments on commit e0508b1

Please sign in to comment.