diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-21 00:26:12 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-21 00:26:12 -0400 |
commit | 7a9b149212f3716c598afe973b6261fd58453b7a (patch) | |
tree | 477716d84c71da124448b72278e98da28aadbd3d /arch | |
parent | 3d62e3fdce8ef265a3706c52ae1ca6ab84e30f0e (diff) | |
parent | e26bcf37234c67624f62d9fc95f922b8dbda1363 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (229 commits)
USB: remove unused usb_buffer_alloc and usb_buffer_free macros
usb: musb: update gfp/slab.h includes
USB: ftdi_sio: fix legacy SIO-device header
USB: kl5usb105: reimplement using generic framework
USB: kl5usb105: minor clean ups
USB: kl5usb105: fix memory leak
USB: io_ti: use kfifo to implement write buffering
USB: io_ti: remove unsused private counter
USB: ti_usb: use kfifo to implement write buffering
USB: ir-usb: fix incorrect write-buffer length
USB: aircable: fix incorrect write-buffer length
USB: safe_serial: straighten out read processing
USB: safe_serial: reimplement read using generic framework
USB: safe_serial: reimplement write using generic framework
usb-storage: always print quirks
USB: usb-storage: trivial debug improvements
USB: oti6858: use port write fifo
USB: oti6858: use kfifo to implement write buffering
USB: cypress_m8: use kfifo to implement write buffering
USB: cypress_m8: remove unused drain define
...
Fix up conflicts (due to usb_buffer_alloc/free renaming) in
drivers/input/tablet/acecad.c
drivers/input/tablet/kbtab.c
drivers/input/tablet/wacom_sys.c
drivers/media/video/gspca/gspca.c
sound/usb/usbaudio.c
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-omap2/board-omap3evm.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-omap2/usb-ehci.c | 155 | ||||
-rw-r--r-- | arch/arm/mach-omap2/usb-musb.c | 1 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/usb.h | 24 |
4 files changed, 183 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c index 017bb2f4f7d2..7d7b5bc8dc31 100644 --- a/arch/arm/mach-omap2/board-omap3evm.c +++ b/arch/arm/mach-omap2/board-omap3evm.c | |||
@@ -702,6 +702,9 @@ static void __init omap3_evm_init(void) | |||
702 | omap_mux_init_gpio(21, OMAP_PIN_INPUT_PULLUP); | 702 | omap_mux_init_gpio(21, OMAP_PIN_INPUT_PULLUP); |
703 | ehci_pdata.reset_gpio_port[1] = 21; | 703 | ehci_pdata.reset_gpio_port[1] = 21; |
704 | 704 | ||
705 | /* EVM REV >= E can supply 500mA with EXTVBUS programming */ | ||
706 | musb_board_data.power = 500; | ||
707 | musb_board_data.extvbus = 1; | ||
705 | } else { | 708 | } else { |
706 | /* setup EHCI phy reset on MDC */ | 709 | /* setup EHCI phy reset on MDC */ |
707 | omap_mux_init_gpio(135, OMAP_PIN_OUTPUT); | 710 | omap_mux_init_gpio(135, OMAP_PIN_OUTPUT); |
diff --git a/arch/arm/mach-omap2/usb-ehci.c b/arch/arm/mach-omap2/usb-ehci.c index ee9f548d5d81..c68f799e83c5 100644 --- a/arch/arm/mach-omap2/usb-ehci.c +++ b/arch/arm/mach-omap2/usb-ehci.c | |||
@@ -236,3 +236,158 @@ void __init usb_ehci_init(const struct ehci_hcd_omap_platform_data *pdata) | |||
236 | 236 | ||
237 | #endif /* CONFIG_USB_EHCI_HCD */ | 237 | #endif /* CONFIG_USB_EHCI_HCD */ |
238 | 238 | ||
239 | #if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) | ||
240 | |||
241 | static struct resource ohci_resources[] = { | ||
242 | { | ||
243 | .start = OMAP34XX_OHCI_BASE, | ||
244 | .end = OMAP34XX_OHCI_BASE + SZ_1K - 1, | ||
245 | .flags = IORESOURCE_MEM, | ||
246 | }, | ||
247 | { | ||
248 | .start = OMAP34XX_UHH_CONFIG_BASE, | ||
249 | .end = OMAP34XX_UHH_CONFIG_BASE + SZ_1K - 1, | ||
250 | .flags = IORESOURCE_MEM, | ||
251 | }, | ||
252 | { | ||
253 | .start = OMAP34XX_USBTLL_BASE, | ||
254 | .end = OMAP34XX_USBTLL_BASE + SZ_4K - 1, | ||
255 | .flags = IORESOURCE_MEM, | ||
256 | }, | ||
257 | { /* general IRQ */ | ||
258 | .start = INT_34XX_OHCI_IRQ, | ||
259 | .flags = IORESOURCE_IRQ, | ||
260 | } | ||
261 | }; | ||
262 | |||
263 | static u64 ohci_dmamask = DMA_BIT_MASK(32); | ||
264 | |||
265 | static struct platform_device ohci_device = { | ||
266 | .name = "ohci-omap3", | ||
267 | .id = 0, | ||
268 | .dev = { | ||
269 | .dma_mask = &ohci_dmamask, | ||
270 | .coherent_dma_mask = 0xffffffff, | ||
271 | }, | ||
272 | .num_resources = ARRAY_SIZE(ohci_resources), | ||
273 | .resource = ohci_resources, | ||
274 | }; | ||
275 | |||
276 | static void setup_ohci_io_mux(const enum ohci_omap3_port_mode *port_mode) | ||
277 | { | ||
278 | switch (port_mode[0]) { | ||
279 | case OMAP_OHCI_PORT_MODE_PHY_6PIN_DATSE0: | ||
280 | case OMAP_OHCI_PORT_MODE_PHY_6PIN_DPDM: | ||
281 | case OMAP_OHCI_PORT_MODE_TLL_6PIN_DATSE0: | ||
282 | case OMAP_OHCI_PORT_MODE_TLL_6PIN_DPDM: | ||
283 | omap_mux_init_signal("mm1_rxdp", | ||
284 | OMAP_PIN_INPUT_PULLDOWN); | ||
285 | omap_mux_init_signal("mm1_rxdm", | ||
286 | OMAP_PIN_INPUT_PULLDOWN); | ||
287 | /* FALLTHROUGH */ | ||
288 | case OMAP_OHCI_PORT_MODE_PHY_4PIN_DPDM: | ||
289 | case OMAP_OHCI_PORT_MODE_TLL_4PIN_DPDM: | ||
290 | omap_mux_init_signal("mm1_rxrcv", | ||
291 | OMAP_PIN_INPUT_PULLDOWN); | ||
292 | /* FALLTHROUGH */ | ||
293 | case OMAP_OHCI_PORT_MODE_PHY_3PIN_DATSE0: | ||
294 | case OMAP_OHCI_PORT_MODE_TLL_3PIN_DATSE0: | ||
295 | omap_mux_init_signal("mm1_txen_n", OMAP_PIN_OUTPUT); | ||
296 | /* FALLTHROUGH */ | ||
297 | case OMAP_OHCI_PORT_MODE_TLL_2PIN_DATSE0: | ||
298 | case OMAP_OHCI_PORT_MODE_TLL_2PIN_DPDM: | ||
299 | omap_mux_init_signal("mm1_txse0", | ||
300 | OMAP_PIN_INPUT_PULLDOWN); | ||
301 | omap_mux_init_signal("mm1_txdat", | ||
302 | OMAP_PIN_INPUT_PULLDOWN); | ||
303 | break; | ||
304 | case OMAP_OHCI_PORT_MODE_UNUSED: | ||
305 | /* FALLTHROUGH */ | ||
306 | default: | ||
307 | break; | ||
308 | } | ||
309 | switch (port_mode[1]) { | ||
310 | case OMAP_OHCI_PORT_MODE_PHY_6PIN_DATSE0: | ||
311 | case OMAP_OHCI_PORT_MODE_PHY_6PIN_DPDM: | ||
312 | case OMAP_OHCI_PORT_MODE_TLL_6PIN_DATSE0: | ||
313 | case OMAP_OHCI_PORT_MODE_TLL_6PIN_DPDM: | ||
314 | omap_mux_init_signal("mm2_rxdp", | ||
315 | OMAP_PIN_INPUT_PULLDOWN); | ||
316 | omap_mux_init_signal("mm2_rxdm", | ||
317 | OMAP_PIN_INPUT_PULLDOWN); | ||
318 | /* FALLTHROUGH */ | ||
319 | case OMAP_OHCI_PORT_MODE_PHY_4PIN_DPDM: | ||
320 | case OMAP_OHCI_PORT_MODE_TLL_4PIN_DPDM: | ||
321 | omap_mux_init_signal("mm2_rxrcv", | ||
322 | OMAP_PIN_INPUT_PULLDOWN); | ||
323 | /* FALLTHROUGH */ | ||
324 | case OMAP_OHCI_PORT_MODE_PHY_3PIN_DATSE0: | ||
325 | case OMAP_OHCI_PORT_MODE_TLL_3PIN_DATSE0: | ||
326 | omap_mux_init_signal("mm2_txen_n", OMAP_PIN_OUTPUT); | ||
327 | /* FALLTHROUGH */ | ||
328 | case OMAP_OHCI_PORT_MODE_TLL_2PIN_DATSE0: | ||
329 | case OMAP_OHCI_PORT_MODE_TLL_2PIN_DPDM: | ||
330 | omap_mux_init_signal("mm2_txse0", | ||
331 | OMAP_PIN_INPUT_PULLDOWN); | ||
332 | omap_mux_init_signal("mm2_txdat", | ||
333 | OMAP_PIN_INPUT_PULLDOWN); | ||
334 | break; | ||
335 | case OMAP_OHCI_PORT_MODE_UNUSED: | ||
336 | /* FALLTHROUGH */ | ||
337 | default: | ||
338 | break; | ||
339 | } | ||
340 | switch (port_mode[2]) { | ||
341 | case OMAP_OHCI_PORT_MODE_PHY_6PIN_DATSE0: | ||
342 | case OMAP_OHCI_PORT_MODE_PHY_6PIN_DPDM: | ||
343 | case OMAP_OHCI_PORT_MODE_TLL_6PIN_DATSE0: | ||
344 | case OMAP_OHCI_PORT_MODE_TLL_6PIN_DPDM: | ||
345 | omap_mux_init_signal("mm3_rxdp", | ||
346 | OMAP_PIN_INPUT_PULLDOWN); | ||
347 | omap_mux_init_signal("mm3_rxdm", | ||
348 | OMAP_PIN_INPUT_PULLDOWN); | ||
349 | /* FALLTHROUGH */ | ||
350 | case OMAP_OHCI_PORT_MODE_PHY_4PIN_DPDM: | ||
351 | case OMAP_OHCI_PORT_MODE_TLL_4PIN_DPDM: | ||
352 | omap_mux_init_signal("mm3_rxrcv", | ||
353 | OMAP_PIN_INPUT_PULLDOWN); | ||
354 | /* FALLTHROUGH */ | ||
355 | case OMAP_OHCI_PORT_MODE_PHY_3PIN_DATSE0: | ||
356 | case OMAP_OHCI_PORT_MODE_TLL_3PIN_DATSE0: | ||
357 | omap_mux_init_signal("mm3_txen_n", OMAP_PIN_OUTPUT); | ||
358 | /* FALLTHROUGH */ | ||
359 | case OMAP_OHCI_PORT_MODE_TLL_2PIN_DATSE0: | ||
360 | case OMAP_OHCI_PORT_MODE_TLL_2PIN_DPDM: | ||
361 | omap_mux_init_signal("mm3_txse0", | ||
362 | OMAP_PIN_INPUT_PULLDOWN); | ||
363 | omap_mux_init_signal("mm3_txdat", | ||
364 | OMAP_PIN_INPUT_PULLDOWN); | ||
365 | break; | ||
366 | case OMAP_OHCI_PORT_MODE_UNUSED: | ||
367 | /* FALLTHROUGH */ | ||
368 | default: | ||
369 | break; | ||
370 | } | ||
371 | } | ||
372 | |||
373 | void __init usb_ohci_init(const struct ohci_hcd_omap_platform_data *pdata) | ||
374 | { | ||
375 | platform_device_add_data(&ohci_device, pdata, sizeof(*pdata)); | ||
376 | |||
377 | /* Setup Pin IO MUX for OHCI */ | ||
378 | if (cpu_is_omap34xx()) | ||
379 | setup_ohci_io_mux(pdata->port_mode); | ||
380 | |||
381 | if (platform_device_register(&ohci_device) < 0) { | ||
382 | pr_err("Unable to register FS-USB (OHCI) device\n"); | ||
383 | return; | ||
384 | } | ||
385 | } | ||
386 | |||
387 | #else | ||
388 | |||
389 | void __init usb_ohci_init(const struct ohci_hcd_omap_platform_data *pdata) | ||
390 | { | ||
391 | } | ||
392 | |||
393 | #endif /* CONFIG_USB_OHCI_HCD */ | ||
diff --git a/arch/arm/mach-omap2/usb-musb.c b/arch/arm/mach-omap2/usb-musb.c index 6d41fa7b2ce8..96f6787e00b2 100644 --- a/arch/arm/mach-omap2/usb-musb.c +++ b/arch/arm/mach-omap2/usb-musb.c | |||
@@ -107,6 +107,7 @@ void __init usb_musb_init(struct omap_musb_board_data *board_data) | |||
107 | musb_plat.board_data = board_data; | 107 | musb_plat.board_data = board_data; |
108 | musb_plat.power = board_data->power >> 1; | 108 | musb_plat.power = board_data->power >> 1; |
109 | musb_plat.mode = board_data->mode; | 109 | musb_plat.mode = board_data->mode; |
110 | musb_plat.extvbus = board_data->extvbus; | ||
110 | 111 | ||
111 | if (platform_device_register(&musb_device) < 0) | 112 | if (platform_device_register(&musb_device) < 0) |
112 | printk(KERN_ERR "Unable to register HS-USB (MUSB) device\n"); | 113 | printk(KERN_ERR "Unable to register HS-USB (MUSB) device\n"); |
diff --git a/arch/arm/plat-omap/include/plat/usb.h b/arch/arm/plat-omap/include/plat/usb.h index 876ca8d5e927..98eef5360e6d 100644 --- a/arch/arm/plat-omap/include/plat/usb.h +++ b/arch/arm/plat-omap/include/plat/usb.h | |||
@@ -13,6 +13,20 @@ enum ehci_hcd_omap_mode { | |||
13 | EHCI_HCD_OMAP_MODE_TLL, | 13 | EHCI_HCD_OMAP_MODE_TLL, |
14 | }; | 14 | }; |
15 | 15 | ||
16 | enum ohci_omap3_port_mode { | ||
17 | OMAP_OHCI_PORT_MODE_UNUSED, | ||
18 | OMAP_OHCI_PORT_MODE_PHY_6PIN_DATSE0, | ||
19 | OMAP_OHCI_PORT_MODE_PHY_6PIN_DPDM, | ||
20 | OMAP_OHCI_PORT_MODE_PHY_3PIN_DATSE0, | ||
21 | OMAP_OHCI_PORT_MODE_PHY_4PIN_DPDM, | ||
22 | OMAP_OHCI_PORT_MODE_TLL_6PIN_DATSE0, | ||
23 | OMAP_OHCI_PORT_MODE_TLL_6PIN_DPDM, | ||
24 | OMAP_OHCI_PORT_MODE_TLL_3PIN_DATSE0, | ||
25 | OMAP_OHCI_PORT_MODE_TLL_4PIN_DPDM, | ||
26 | OMAP_OHCI_PORT_MODE_TLL_2PIN_DATSE0, | ||
27 | OMAP_OHCI_PORT_MODE_TLL_2PIN_DPDM, | ||
28 | }; | ||
29 | |||
16 | struct ehci_hcd_omap_platform_data { | 30 | struct ehci_hcd_omap_platform_data { |
17 | enum ehci_hcd_omap_mode port_mode[OMAP3_HS_USB_PORTS]; | 31 | enum ehci_hcd_omap_mode port_mode[OMAP3_HS_USB_PORTS]; |
18 | unsigned phy_reset:1; | 32 | unsigned phy_reset:1; |
@@ -21,6 +35,13 @@ struct ehci_hcd_omap_platform_data { | |||
21 | int reset_gpio_port[OMAP3_HS_USB_PORTS]; | 35 | int reset_gpio_port[OMAP3_HS_USB_PORTS]; |
22 | }; | 36 | }; |
23 | 37 | ||
38 | struct ohci_hcd_omap_platform_data { | ||
39 | enum ohci_omap3_port_mode port_mode[OMAP3_HS_USB_PORTS]; | ||
40 | |||
41 | /* Set this to true for ES2.x silicon */ | ||
42 | unsigned es2_compatibility:1; | ||
43 | }; | ||
44 | |||
24 | /*-------------------------------------------------------------------------*/ | 45 | /*-------------------------------------------------------------------------*/ |
25 | 46 | ||
26 | #define OMAP1_OTG_BASE 0xfffb0400 | 47 | #define OMAP1_OTG_BASE 0xfffb0400 |
@@ -47,6 +68,7 @@ struct omap_musb_board_data { | |||
47 | u8 interface_type; | 68 | u8 interface_type; |
48 | u8 mode; | 69 | u8 mode; |
49 | u16 power; | 70 | u16 power; |
71 | unsigned extvbus:1; | ||
50 | }; | 72 | }; |
51 | 73 | ||
52 | enum musb_interface {MUSB_INTERFACE_ULPI, MUSB_INTERFACE_UTMI}; | 74 | enum musb_interface {MUSB_INTERFACE_ULPI, MUSB_INTERFACE_UTMI}; |
@@ -55,6 +77,8 @@ extern void usb_musb_init(struct omap_musb_board_data *board_data); | |||
55 | 77 | ||
56 | extern void usb_ehci_init(const struct ehci_hcd_omap_platform_data *pdata); | 78 | extern void usb_ehci_init(const struct ehci_hcd_omap_platform_data *pdata); |
57 | 79 | ||
80 | extern void usb_ohci_init(const struct ohci_hcd_omap_platform_data *pdata); | ||
81 | |||
58 | #endif | 82 | #endif |
59 | 83 | ||
60 | void omap_usb_init(struct omap_usb_config *pdata); | 84 | void omap_usb_init(struct omap_usb_config *pdata); |