Subject: [PATCH] powerpc: Add coherent_dma_mask setting to platform devices

From: Corey Minyard <[email-masked]>
Date: Mon, 01 Feb 2010 13:36:47 -0600

From: Corey Minyard <[email-masked]>

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 <[email-masked]>
---
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;
 }