diff --git a/drivers/usb/musb/jz4740.c b/drivers/usb/musb/jz4740.c index cf4867f..26d47fc 100644 --- a/drivers/usb/musb/jz4740.c +++ b/drivers/usb/musb/jz4740.c @@ -85,6 +85,11 @@ static irqreturn_t jz4740_musb_interrupt(int irq, void *__hci) return retval; } +static struct musb_fifo_cfg jz4740_musb_fifo_cfg[] = { +{ .hw_ep_num = 1, .style = FIFO_TX, .maxpacket = 512, }, +{ .hw_ep_num = 1, .style = FIFO_RX, .maxpacket = 512, }, +{ .hw_ep_num = 2, .style = FIFO_TX, .maxpacket = 64, }, +}; static struct musb_hdrc_config jz4740_musb_config = { /* Silicon does not implement USB OTG. */ .multipoint = 0, @@ -92,6 +97,8 @@ static struct musb_hdrc_config jz4740_musb_config = { .num_eps = 4, /* RAMbits needed to configure EPs from table */ .ram_bits = 9, + .fifo_cfg = jz4740_musb_fifo_cfg, + .fifo_cfg_size = ARRAY_SIZE(jz4740_musb_fifo_cfg), }; static struct musb_hdrc_platform_data jz4740_musb_platform_data = { diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 6af3711..cd70cc8 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c @@ -1038,9 +1038,6 @@ static ushort fifo_mode = 4; #elif defined(CONFIG_USB_MUSB_UX500) \ || defined(CONFIG_USB_MUSB_UX500_MODULE) static ushort fifo_mode = 5; -#elif defined(CONFIG_USB_MUSB_JZ4740) \ - || defined(CONFIG_USB_MUSB_JZ4740_MODULE) -static ushort fifo_mode = 6; #else static ushort fifo_mode = 2; #endif @@ -1154,13 +1151,6 @@ static struct musb_fifo_cfg mode_5_cfg[] = { { .hw_ep_num = 15, .style = FIFO_RXTX, .maxpacket = 1024, }, }; -/* mode 6 - fits in 2KB */ -static struct musb_fifo_cfg mode_6_cfg[] = { -{ .hw_ep_num = 1, .style = FIFO_TX, .maxpacket = 512, }, -{ .hw_ep_num = 1, .style = FIFO_RX, .maxpacket = 512, }, -{ .hw_ep_num = 2, .style = FIFO_TX, .maxpacket = 64, }, -}; - /* * configure a fifo; for non-shared endpoints, this may be called * once for a tx fifo and once for an rx fifo. @@ -1283,10 +1273,6 @@ static int ep_config_from_table(struct musb *musb) cfg = mode_5_cfg; n = ARRAY_SIZE(mode_5_cfg); break; - case 6: - cfg = mode_6_cfg; - n = ARRAY_SIZE(mode_6_cfg); - break; } printk(KERN_DEBUG "%s: setup fifo_mode %d\n",