]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
powerpc: Add missing reference to coherent_dma_mask
authorVitaly Bordug <vitb@kernel.crashing.org>
Wed, 9 Jul 2008 03:13:38 +0000 (13:13 +1000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 24 Jul 2008 16:14:10 +0000 (09:14 -0700)
commit ba0fc709e197415aadd46b9ec208dc4abaa21edd upstream

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.

Signed-off-by: Vitaly Bordug <vitb@kernel.crashing.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/powerpc/kernel/of_platform.c

index fb698d47082d3d10c17edcdff354ce4f832858b6..3ae33d488e064f7b857f35e75df209db76e7027d 100644 (file)
@@ -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.