diff options
author | Mike Rapoport <mike@compulab.co.il> | 2011-04-27 04:56:12 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2011-05-09 11:15:31 -0400 |
commit | 9e18630b689d658d65bf59508bfec084f61ff5c6 (patch) | |
tree | b9c1583d0d8eea28ad02b2a96ccf7116c8312fe2 /arch/arm/mach-omap2/usb-musb.c | |
parent | 9a3f39ff36e11ea6b6c8b5f90337a864cb7e81f6 (diff) |
omap: musb: introduce default board config
Most boards use exactly the same configuration for musb initialization.
Create a default that can be shared amount different boards.
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/usb-musb.c')
-rw-r--r-- | arch/arm/mach-omap2/usb-musb.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/usb-musb.c b/arch/arm/mach-omap2/usb-musb.c index 35559f77e2de..dfa5a3cb5a17 100644 --- a/arch/arm/mach-omap2/usb-musb.c +++ b/arch/arm/mach-omap2/usb-musb.c | |||
@@ -108,7 +108,13 @@ static void usb_musb_mux_init(struct omap_musb_board_data *board_data) | |||
108 | } | 108 | } |
109 | } | 109 | } |
110 | 110 | ||
111 | void __init usb_musb_init(struct omap_musb_board_data *board_data) | 111 | static struct omap_musb_board_data musb_default_board_data = { |
112 | .interface_type = MUSB_INTERFACE_ULPI, | ||
113 | .mode = MUSB_OTG, | ||
114 | .power = 100, | ||
115 | }; | ||
116 | |||
117 | void __init usb_musb_init(struct omap_musb_board_data *musb_board_data) | ||
112 | { | 118 | { |
113 | struct omap_hwmod *oh; | 119 | struct omap_hwmod *oh; |
114 | struct omap_device *od; | 120 | struct omap_device *od; |
@@ -116,6 +122,12 @@ void __init usb_musb_init(struct omap_musb_board_data *board_data) | |||
116 | struct device *dev; | 122 | struct device *dev; |
117 | int bus_id = -1; | 123 | int bus_id = -1; |
118 | const char *oh_name, *name; | 124 | const char *oh_name, *name; |
125 | struct omap_musb_board_data *board_data; | ||
126 | |||
127 | if (musb_board_data) | ||
128 | board_data = musb_board_data; | ||
129 | else | ||
130 | board_data = &musb_default_board_data; | ||
119 | 131 | ||
120 | if (cpu_is_omap3517() || cpu_is_omap3505()) { | 132 | if (cpu_is_omap3517() || cpu_is_omap3505()) { |
121 | } else if (cpu_is_omap44xx()) { | 133 | } else if (cpu_is_omap44xx()) { |