[PATCH] powerpc: Add coherent_dma_mask setting to platform devices

Corey Minyard minyard at acm.org
Tue Feb 2 06:36:47 EST 2010


From: Corey Minyard <cminyard at mvista.com>

DMA ops requires that coherent_dma_mask be set properly for a device,
but this was not being done for platform devices on powerpc.  The
MPSC drivers, in particular, need this for both serial and ethernet
or they won't be able to allocate memory.

Signed-off-by: Corey Minyard <cminyard at mvista.com>
---
How about this patch?  It seems to work ok and I suppose this makes
sense.  I'll send the uart setting in another patch.

Index: linux-2.6/arch/powerpc/kernel/setup-common.c
===================================================================
--- linux-2.6.orig/arch/powerpc/kernel/setup-common.c
+++ linux-2.6/arch/powerpc/kernel/setup-common.c
@@ -681,6 +681,7 @@ static int ppc_dflt_bus_notify(struct no
 		return 0;
 
 	set_dma_ops(dev, &dma_direct_ops);
+	pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
 
 	return NOTIFY_DONE;
 }


More information about the Linuxppc-dev mailing list