diff options
author | maheswarudu <v.maheswarudu@stericsson.com> | 2011-12-01 11:16:45 +0100 |
---|---|---|
committer | Philippe Langlais <philippe.langlais@stericsson.com> | 2012-05-22 11:03:15 +0200 |
commit | 23cd36b39f99de25aecd25af14a48ba3348dcffd (patch) | |
tree | 27563478b53add33b5f0a201b1e0655665424d6f | |
parent | 4342282398add40291a8542bd51e770948819899 (diff) |
ux500: USB: platform specific musb fifo cfg
Pass the musb fifo configuration through ux500
platform file.
ST-Ericsson ID: 367200
ST-Ericsson FOSS-OUT ID: NA
ST-Ericsson Linux next: NA
Signed-off-by: maheswarudu <v.maheswarudu@stericsson.com>
Change-Id: If7aaddeb85198dc9edce605efec9a87bbfb6658c
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/40604
Reviewed-by: QATOOLS
Reviewed-by: QABUILD
Tested-by: Tobias ANDERSON <tobias.xx.andersson@stericsson.com>
Reviewed-by: Rajaram REGUPATHY <ragupathy.rajaram@stericsson.com>
Reviewed-by: Rabin VINCENT <rabin.vincent@stericsson.com>
Conflicts:
drivers/usb/musb/musb_core.c
-rw-r--r-- | arch/arm/mach-ux500/usb.c | 40 | ||||
-rw-r--r-- | drivers/usb/musb/musb_core.c | 3 |
2 files changed, 40 insertions, 3 deletions
diff --git a/arch/arm/mach-ux500/usb.c b/arch/arm/mach-ux500/usb.c index 0a8929bd58b..50d6f6d3788 100644 --- a/arch/arm/mach-ux500/usb.c +++ b/arch/arm/mach-ux500/usb.c @@ -98,7 +98,47 @@ static u64 ux500_musb_dmamask = DMA_BIT_MASK(0); #endif static struct ux500_pins *usb_gpio_pins; +/** + * Fifo mode + * Sum of maxpacket <= 12 KB + * As ux500 provides 12 KB buffer size only + * + * Enable Double buffer for Mass Storage Class + * endpoint. + */ +static struct musb_fifo_cfg ux500_mode_cfg[] = { +{ .hw_ep_num = 1, .style = FIFO_TX, .maxpacket = 512, .mode = BUF_DOUBLE, }, +{ .hw_ep_num = 1, .style = FIFO_RX, .maxpacket = 512, .mode = BUF_DOUBLE, }, +{ .hw_ep_num = 2, .style = FIFO_TX, .maxpacket = 512, .mode = BUF_DOUBLE, }, +{ .hw_ep_num = 2, .style = FIFO_RX, .maxpacket = 512, .mode = BUF_DOUBLE, }, +{ .hw_ep_num = 3, .style = FIFO_TX, .maxpacket = 512, }, +{ .hw_ep_num = 3, .style = FIFO_RX, .maxpacket = 512, }, +{ .hw_ep_num = 4, .style = FIFO_TX, .maxpacket = 512, }, +{ .hw_ep_num = 4, .style = FIFO_RX, .maxpacket = 512, }, +{ .hw_ep_num = 5, .style = FIFO_TX, .maxpacket = 512, }, +{ .hw_ep_num = 5, .style = FIFO_RX, .maxpacket = 512, }, +{ .hw_ep_num = 6, .style = FIFO_TX, .maxpacket = 32, }, +{ .hw_ep_num = 6, .style = FIFO_RX, .maxpacket = 32, }, +{ .hw_ep_num = 7, .style = FIFO_TX, .maxpacket = 32, }, +{ .hw_ep_num = 7, .style = FIFO_RX, .maxpacket = 32, }, +{ .hw_ep_num = 8, .style = FIFO_TX, .maxpacket = 32, }, +{ .hw_ep_num = 8, .style = FIFO_RX, .maxpacket = 32, }, +{ .hw_ep_num = 9, .style = FIFO_TX, .maxpacket = 32, }, +{ .hw_ep_num = 9, .style = FIFO_RX, .maxpacket = 32, }, +{ .hw_ep_num = 10, .style = FIFO_TX, .maxpacket = 32, }, +{ .hw_ep_num = 10, .style = FIFO_RX, .maxpacket = 32, }, +{ .hw_ep_num = 11, .style = FIFO_TX, .maxpacket = 32, }, +{ .hw_ep_num = 11, .style = FIFO_RX, .maxpacket = 32, }, +{ .hw_ep_num = 12, .style = FIFO_TX, .maxpacket = 32, }, +{ .hw_ep_num = 12, .style = FIFO_RX, .maxpacket = 32, }, +{ .hw_ep_num = 13, .style = FIFO_RXTX, .maxpacket = 512, }, +{ .hw_ep_num = 14, .style = FIFO_RXTX, .maxpacket = 1024, }, +{ .hw_ep_num = 15, .style = FIFO_RXTX, .maxpacket = 1024, }, +}; + static struct musb_hdrc_config musb_hdrc_config = { + .fifo_cfg = ux500_mode_cfg, /* Fifo configuration */ + .fifo_cfg_size = ARRAY_SIZE(ux500_mode_cfg), .multipoint = true, .dyn_fifo = true, .num_eps = 16, diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 2f0f8a48d1a..5faac98ca30 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c @@ -1036,9 +1036,6 @@ static void musb_shutdown(struct platform_device *pdev) || defined(CONFIG_USB_MUSB_AM35X) \ || defined(CONFIG_USB_MUSB_AM35X_MODULE) static ushort __devinitdata fifo_mode = 4; -#elif defined(CONFIG_USB_MUSB_UX500) \ - || defined(CONFIG_USB_MUSB_UX500_MODULE) -static ushort __devinitdata fifo_mode = 5; #else static ushort __devinitdata fifo_mode = 2; #endif |