summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFelipe Balbi <felipe.balbi@nokia.com>2008-08-08 12:40:54 +0300
committerGreg Kroah-Hartman <gregkh@suse.de>2008-08-13 17:33:01 -0700
commitca6d1b1333bc2e61e37982de1f28d8604c232414 (patch)
tree6675d284fc932e9125fc7fd083eebb7f0a1d5695 /include
parentf362a47560070ec0aaf68ac6b45901eeed1c844f (diff)
usb: musb: pass configuration specifics via pdata
Use platform_data to pass musb configuration-specific details to musb driver. This patch will prevent that other platforms selecting HAVE_CLK and enabling musb won't break tree building. The other parts of it will come when linux-omap merge up more omap2/3 board-files. Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Acked-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include')
-rw-r--r--include/linux/usb/musb.h38
1 files changed, 33 insertions, 5 deletions
diff --git a/include/linux/usb/musb.h b/include/linux/usb/musb.h
index d325a0d5bf4..630962c04ca 100644
--- a/include/linux/usb/musb.h
+++ b/include/linux/usb/musb.h
@@ -19,6 +19,36 @@ enum musb_mode {
struct clk;
+struct musb_hdrc_eps_bits {
+ const char name[16];
+ u8 bits;
+};
+
+struct musb_hdrc_config {
+ /* MUSB configuration-specific details */
+ unsigned multipoint:1; /* multipoint device */
+ unsigned dyn_fifo:1; /* supports dynamic fifo sizing */
+ unsigned soft_con:1; /* soft connect required */
+ unsigned utm_16:1; /* utm data witdh is 16 bits */
+ unsigned big_endian:1; /* true if CPU uses big-endian */
+ unsigned mult_bulk_tx:1; /* Tx ep required for multbulk pkts */
+ unsigned mult_bulk_rx:1; /* Rx ep required for multbulk pkts */
+ unsigned high_iso_tx:1; /* Tx ep required for HB iso */
+ unsigned high_iso_rx:1; /* Rx ep required for HD iso */
+ unsigned dma:1; /* supports DMA */
+ unsigned vendor_req:1; /* vendor registers required */
+
+ u8 num_eps; /* number of endpoints _with_ ep0 */
+ u8 dma_channels; /* number of dma channels */
+ u8 dyn_fifo_size; /* dynamic size in bytes */
+ u8 vendor_ctrl; /* vendor control reg width */
+ u8 vendor_stat; /* vendor status reg witdh */
+ u8 dma_req_chan; /* bitmask for required dma channels */
+ u8 ram_bits; /* ram address size */
+
+ struct musb_hdrc_eps_bits *eps_bits;
+};
+
struct musb_hdrc_platform_data {
/* MUSB_HOST, MUSB_PERIPHERAL, or MUSB_OTG */
u8 mode;
@@ -38,16 +68,14 @@ struct musb_hdrc_platform_data {
/* (HOST or OTG) msec/2 after VBUS on till power good */
u8 potpgt;
- /* TBD: chip defaults should probably go someplace else,
- * e.g. number of tx/rx endpoints, etc
- */
- unsigned multipoint:1;
-
/* Power the device on or off */
int (*set_power)(int state);
/* Turn device clock on or off */
int (*set_clock)(struct clk *clock, int is_on);
+
+ /* MUSB configuration-specific details */
+ struct musb_hdrc_config *config;
};