Thread (5 messages) 5 messages, 2 authors, 2010-02-02
STALE5964d

[PATCH] powerpc: Add coherent_dma_mask setting to platform devices

From: Corey Minyard <hidden>
Date: 2010-02-01 20:37:38

From: Corey Minyard <redacted>

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 <redacted>
---
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;
 }
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help