提交 a20b1b79 编写于 作者: L Lee Jones 提交者: Linus Walleij

usb: musb: ux500: move the MUSB HDRC configuration into the driver

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: NFelipe Balbi <balbi@ti.com>
Acked-by: NFabio Baltieri <fabio.baltieri@linaro.org>
Signed-off-by: NLee Jones <lee.jones@linaro.org>
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
上级 be2dbb09
...@@ -76,16 +76,8 @@ static struct ux500_musb_board_data musb_board_data = { ...@@ -76,16 +76,8 @@ static struct ux500_musb_board_data musb_board_data = {
static u64 ux500_musb_dmamask = DMA_BIT_MASK(32); 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 = { static struct musb_hdrc_platform_data musb_platform_data = {
.mode = MUSB_OTG, .mode = MUSB_OTG,
.config = &musb_hdrc_config,
.board_data = &musb_board_data, .board_data = &musb_board_data,
}; };
......
...@@ -30,6 +30,13 @@ ...@@ -30,6 +30,13 @@
#include "musb_core.h" #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 ux500_glue {
struct device *dev; struct device *dev;
struct platform_device *musb; struct platform_device *musb;
...@@ -229,6 +236,7 @@ static int ux500_probe(struct platform_device *pdev) ...@@ -229,6 +236,7 @@ static int ux500_probe(struct platform_device *pdev)
glue->clk = clk; glue->clk = clk;
pdata->platform_ops = &ux500_ops; pdata->platform_ops = &ux500_ops;
pdata->config = &ux500_musb_hdrc_config;
platform_set_drvdata(pdev, glue); platform_set_drvdata(pdev, glue);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册