Date:2013-12-17 09:56:10 (9 years 9 months ago)
Author:Lars C.
Commit:8187ff71326489faec0f04786170207ec4197f01
Message:usb: musb-jz4740: Move jz4740 specific fifo config to the jz4740 glue

No need to clutter the core with jz4740 specific details. Move the FIFO config
to the jz4740 glue code.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Files: drivers/usb/musb/jz4740.c (2 diffs)
drivers/usb/musb/musb_core.c (3 diffs)

Change Details

drivers/usb/musb/jz4740.c
8585    return retval;
8686}
8787
88static struct musb_fifo_cfg jz4740_musb_fifo_cfg[] = {
89{ .hw_ep_num = 1, .style = FIFO_TX, .maxpacket = 512, },
90{ .hw_ep_num = 1, .style = FIFO_RX, .maxpacket = 512, },
91{ .hw_ep_num = 2, .style = FIFO_TX, .maxpacket = 64, },
92};
8893static struct musb_hdrc_config jz4740_musb_config = {
8994    /* Silicon does not implement USB OTG. */
9095    .multipoint = 0,
...... 
9297    .num_eps = 4,
9398    /* RAMbits needed to configure EPs from table */
9499    .ram_bits = 9,
100    .fifo_cfg = jz4740_musb_fifo_cfg,
101    .fifo_cfg_size = ARRAY_SIZE(jz4740_musb_fifo_cfg),
95102};
96103
97104static struct musb_hdrc_platform_data jz4740_musb_platform_data = {
drivers/usb/musb/musb_core.c
10381038#elif defined(CONFIG_USB_MUSB_UX500) \
10391039    || defined(CONFIG_USB_MUSB_UX500_MODULE)
10401040static ushort fifo_mode = 5;
1041#elif defined(CONFIG_USB_MUSB_JZ4740) \
1042    || defined(CONFIG_USB_MUSB_JZ4740_MODULE)
1043static ushort fifo_mode = 6;
10441041#else
10451042static ushort fifo_mode = 2;
10461043#endif
...... 
11541151{ .hw_ep_num = 15, .style = FIFO_RXTX, .maxpacket = 1024, },
11551152};
11561153
1157/* mode 6 - fits in 2KB */
1158static struct musb_fifo_cfg mode_6_cfg[] = {
1159{ .hw_ep_num = 1, .style = FIFO_TX, .maxpacket = 512, },
1160{ .hw_ep_num = 1, .style = FIFO_RX, .maxpacket = 512, },
1161{ .hw_ep_num = 2, .style = FIFO_TX, .maxpacket = 64, },
1162};
1163
11641154/*
11651155 * configure a fifo; for non-shared endpoints, this may be called
11661156 * once for a tx fifo and once for an rx fifo.
...... 
12831273        cfg = mode_5_cfg;
12841274        n = ARRAY_SIZE(mode_5_cfg);
12851275        break;
1286    case 6:
1287        cfg = mode_6_cfg;
1288        n = ARRAY_SIZE(mode_6_cfg);
1289        break;
12901276    }
12911277
12921278    printk(KERN_DEBUG "%s: setup fifo_mode %d\n",

Archive Download the corresponding diff file



interactive