Skip to content

Commit

Permalink
usb: musb: ux500: take the dma_mask from coherent_dma_mask
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Lee Jones authored and Linus Walleij committed Jun 4, 2013
1 parent a20b1b7 commit 1e6eebb
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions arch/arm/mach-ux500/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/musb/ux500.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 1e6eebb

Please sign in to comment.