diff options
author | Felipe Balbi <felipe.balbi@nokia.com> | 2008-08-08 05:40:54 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-08-13 20:33:01 -0400 |
commit | ca6d1b1333bc2e61e37982de1f28d8604c232414 (patch) | |
tree | 6675d284fc932e9125fc7fd083eebb7f0a1d5695 /include/linux/usb/musb.h | |
parent | f362a47560070ec0aaf68ac6b45901eeed1c844f (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/linux/usb/musb.h')
-rw-r--r-- | include/linux/usb/musb.h | 38 |
1 files changed, 33 insertions, 5 deletions
diff --git a/include/linux/usb/musb.h b/include/linux/usb/musb.h index d325a0d5bf4f..630962c04ca4 100644 --- a/include/linux/usb/musb.h +++ b/include/linux/usb/musb.h | |||
@@ -19,6 +19,36 @@ enum musb_mode { | |||
19 | 19 | ||
20 | struct clk; | 20 | struct clk; |
21 | 21 | ||
22 | struct musb_hdrc_eps_bits { | ||
23 | const char name[16]; | ||
24 | u8 bits; | ||
25 | }; | ||
26 | |||
27 | struct musb_hdrc_config { | ||
28 | /* MUSB configuration-specific details */ | ||
29 | unsigned multipoint:1; /* multipoint device */ | ||
30 | unsigned dyn_fifo:1; /* supports dynamic fifo sizing */ | ||
31 | unsigned soft_con:1; /* soft connect required */ | ||
32 | unsigned utm_16:1; /* utm data witdh is 16 bits */ | ||
33 | unsigned big_endian:1; /* true if CPU uses big-endian */ | ||
34 | unsigned mult_bulk_tx:1; /* Tx ep required for multbulk pkts */ | ||
35 | unsigned mult_bulk_rx:1; /* Rx ep required for multbulk pkts */ | ||
36 | unsigned high_iso_tx:1; /* Tx ep required for HB iso */ | ||
37 | unsigned high_iso_rx:1; /* Rx ep required for HD iso */ | ||
38 | unsigned dma:1; /* supports DMA */ | ||
39 | unsigned vendor_req:1; /* vendor registers required */ | ||
40 | |||
41 | u8 num_eps; /* number of endpoints _with_ ep0 */ | ||
42 | u8 dma_channels; /* number of dma channels */ | ||
43 | u8 dyn_fifo_size; /* dynamic size in bytes */ | ||
44 | u8 vendor_ctrl; /* vendor control reg width */ | ||
45 | u8 vendor_stat; /* vendor status reg witdh */ | ||
46 | u8 dma_req_chan; /* bitmask for required dma channels */ | ||
47 | u8 ram_bits; /* ram address size */ | ||
48 | |||
49 | struct musb_hdrc_eps_bits *eps_bits; | ||
50 | }; | ||
51 | |||
22 | struct musb_hdrc_platform_data { | 52 | struct musb_hdrc_platform_data { |
23 | /* MUSB_HOST, MUSB_PERIPHERAL, or MUSB_OTG */ | 53 | /* MUSB_HOST, MUSB_PERIPHERAL, or MUSB_OTG */ |
24 | u8 mode; | 54 | u8 mode; |
@@ -38,16 +68,14 @@ struct musb_hdrc_platform_data { | |||
38 | /* (HOST or OTG) msec/2 after VBUS on till power good */ | 68 | /* (HOST or OTG) msec/2 after VBUS on till power good */ |
39 | u8 potpgt; | 69 | u8 potpgt; |
40 | 70 | ||
41 | /* TBD: chip defaults should probably go someplace else, | ||
42 | * e.g. number of tx/rx endpoints, etc | ||
43 | */ | ||
44 | unsigned multipoint:1; | ||
45 | |||
46 | /* Power the device on or off */ | 71 | /* Power the device on or off */ |
47 | int (*set_power)(int state); | 72 | int (*set_power)(int state); |
48 | 73 | ||
49 | /* Turn device clock on or off */ | 74 | /* Turn device clock on or off */ |
50 | int (*set_clock)(struct clk *clock, int is_on); | 75 | int (*set_clock)(struct clk *clock, int is_on); |
76 | |||
77 | /* MUSB configuration-specific details */ | ||
78 | struct musb_hdrc_config *config; | ||
51 | }; | 79 | }; |
52 | 80 | ||
53 | 81 | ||