Skip to contentSkip to conversation

powerpc: Add missing reference to coherent_dma_mask

PATCH Vitaly Bordug 1 participant 1 message Jul 8, 2008 PowerPC

lore
Share & tools
lore
#0 lore raw

There is dma_mask in of_device upon of_platform_device_create() but we don't actually set coherent_dma_mask. This may cause weird behavior of USB subsystem using of_device USB host drivers.

---

 arch/powerpc/kernel/of_platform.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/powerpc/kernel/of_platform.c +2 -0
index e79ad8a..3f37a6e 100644
@@ -76,6 +76,8 @@ struct of_device* of_platform_device_create(struct device_node *np,
 		return NULL;
 
 	dev->dma_mask = 0xffffffffUL;
+	dev->dev.coherent_dma_mask = DMA_32BIT_MASK;
+
 	dev->dev.bus = &of_platform_bus_type;
 
 	/* We do not fill the DMA ops for platform devices by default.