diff options
author | Felipe Balbi <felipe.balbi@nokia.com> | 2010-03-12 10:29:06 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-05-20 13:21:31 -0700 |
commit | e6c213b2968cbee4cfb8f89f2d685b9ad07eefbd (patch) | |
tree | bbe7c6bd630c3fef4dc1062b762c5fba9b7d1d6d /include/linux/usb | |
parent | bd5afa9eac6daa408412a31a6c69e87e8bd28c7e (diff) | |
download | blackbird-op-linux-e6c213b2968cbee4cfb8f89f2d685b9ad07eefbd.tar.gz blackbird-op-linux-e6c213b2968cbee4cfb8f89f2d685b9ad07eefbd.zip |
usb: musb: allow board to pass down fifo mode
boards might want to optimize their fifo configuration
to the particular needs of that specific board. Allow
that by moving all related data structures to
<linux/usb/musb.h>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux/usb')
-rw-r--r-- | include/linux/usb/musb.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/include/linux/usb/musb.h b/include/linux/usb/musb.h index 7acef0234c0e..f3d68f62dae8 100644 --- a/include/linux/usb/musb.h +++ b/include/linux/usb/musb.h @@ -22,12 +22,47 @@ enum musb_mode { struct clk; +enum musb_fifo_style { + FIFO_RXTX, + FIFO_TX, + FIFO_RX +} __attribute__ ((packed)); + +enum musb_buf_mode { + BUF_SINGLE, + BUF_DOUBLE +} __attribute__ ((packed)); + +struct musb_fifo_cfg { + u8 hw_ep_num; + enum musb_fifo_style style; + enum musb_buf_mode mode; + u16 maxpacket; +}; + +#define MUSB_EP_FIFO(ep, st, m, pkt) \ +{ \ + .hw_ep_num = ep, \ + .style = st, \ + .mode = m, \ + .maxpacket = pkt, \ +} + +#define MUSB_EP_FIFO_SINGLE(ep, st, pkt) \ + MUSB_EP_FIFO(ep, st, BUF_SINGLE, pkt) + +#define MUSB_EP_FIFO_DOUBLE(ep, st, pkt) \ + MUSB_EP_FIFO(ep, st, BUF_DOUBLE, pkt) + struct musb_hdrc_eps_bits { const char name[16]; u8 bits; }; struct musb_hdrc_config { + struct musb_fifo_cfg *fifo_cfg; /* board fifo configuration */ + unsigned fifo_cfg_size; /* size of the fifo configuration */ + /* MUSB configuration-specific details */ unsigned multipoint:1; /* multipoint device */ unsigned dyn_fifo:1 __deprecated; /* supports dynamic fifo sizing */ |