usb: musb: ux500: move the MUSB HDRC configuration into the driver
authorLee Jones <lee.jones@linaro.org>
Wed, 15 May 2013 09:51:44 +0000 (10:51 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 4 Jun 2013 09:12:03 +0000 (11:12 +0200)
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>
arch/arm/mach-ux500/usb.c
drivers/usb/musb/ux500.c

index a21c2e1b7333a797d5323d539f3cbd958335b83c..49d6e571f5aff8a688551575024c8c07bfbb872e 100644 (file)
@@ -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,
 };
 
index 2c80004e0a83029b52b7ea13f2d4c97194f40412..371776f76ba2031a744da417936a7f8646b4edc6 100644 (file)
 
 #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;
@@ -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);