usb: musb: ux500: take the dma_mask from coherent_dma_mask
authorLee Jones <lee.jones@linaro.org>
Wed, 15 May 2013 09:51:45 +0000 (10:51 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 4 Jun 2013 09:12:03 +0000 (11:12 +0200)
The dma_mask will always be the same as the coherent_dma_mask, so let's
cut down on the platform_data burden and set it as such in the driver.
This also saves us from supporting it separately when we come to enable
this driver for Device Tree.

Cc: linux-usb@vger.kernel.org
Acked-by: Felipe Balbi <balbi@ti.com>
Acked-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
arch/arm/mach-ux500/usb.c
drivers/usb/musb/ux500.c

index 49d6e571f5aff8a688551575024c8c07bfbb872e..2f9abe99dfaa1a684764bed0a2da2b5fea6b6e6a 100644 (file)
@@ -74,8 +74,6 @@ static struct ux500_musb_board_data musb_board_data = {
        .dma_filter = stedma40_filter,
 };
 
-static u64 ux500_musb_dmamask = DMA_BIT_MASK(32);
-
 static struct musb_hdrc_platform_data musb_platform_data = {
        .mode = MUSB_OTG,
        .board_data = &musb_board_data,
@@ -98,7 +96,6 @@ struct platform_device ux500_musb_device = {
        .id = 0,
        .dev = {
                .platform_data = &musb_platform_data,
-               .dma_mask = &ux500_musb_dmamask,
                .coherent_dma_mask = DMA_BIT_MASK(32),
        },
        .num_resources = ARRAY_SIZE(usb_resources),
index 371776f76ba2031a744da417936a7f8646b4edc6..3cf10bcaf118f5aff3fd14dcb8384a48b9c561e2 100644 (file)
@@ -228,7 +228,7 @@ static int ux500_probe(struct platform_device *pdev)
        }
 
        musb->dev.parent                = &pdev->dev;
-       musb->dev.dma_mask              = pdev->dev.dma_mask;
+       musb->dev.dma_mask              = &pdev->dev.coherent_dma_mask;
        musb->dev.coherent_dma_mask     = pdev->dev.coherent_dma_mask;
 
        glue->dev                       = &pdev->dev;