Skip to content

Commit

Permalink
usb: musb: ux500: move the MUSB HDRC configuration into the driver
Browse files Browse the repository at this point in the history
The MUSB HDRC configuration never changes between each of the ux500
supported platforms, so there's little point passing it though platform
data. If we set it in the driver instead, we can make good use of it
when booting with either ATAGs or 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 be2dbb0 commit a20b1b7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 0 additions & 8 deletions arch/arm/mach-ux500/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,8 @@ static struct ux500_musb_board_data musb_board_data = {

static u64 ux500_musb_dmamask = DMA_BIT_MASK(32);

static struct musb_hdrc_config musb_hdrc_config = {
.multipoint = true,
.dyn_fifo = true,
.num_eps = 16,
.ram_bits = 16,
};

static struct musb_hdrc_platform_data musb_platform_data = {
.mode = MUSB_OTG,
.config = &musb_hdrc_config,
.board_data = &musb_board_data,
};

Expand Down
8 changes: 8 additions & 0 deletions drivers/usb/musb/ux500.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@

#include "musb_core.h"

static struct musb_hdrc_config ux500_musb_hdrc_config = {
.multipoint = true,
.dyn_fifo = true,
.num_eps = 16,
.ram_bits = 16,
};

struct ux500_glue {
struct device *dev;
struct platform_device *musb;
Expand Down Expand Up @@ -229,6 +236,7 @@ static int ux500_probe(struct platform_device *pdev)
glue->clk = clk;

pdata->platform_ops = &ux500_ops;
pdata->config = &ux500_musb_hdrc_config;

platform_set_drvdata(pdev, glue);

Expand Down

0 comments on commit a20b1b7

Please sign in to comment.