ChangeSet 1.2020.1.40, 2005/03/07 22:56:17-08:00, [EMAIL PROTECTED] [PATCH] USB: omap_udc handles two more devel boards
This teaches omap_udc how to work on two more OMAP development boards: - OMAP 5912 OSK, a starter kit; - OMAP 1710 H3, more or less an H2 with a newer OMAP chip (0.90 nm etc). It also adds slightly more informative debug dumps for transceiver configuration. Signed-off-by: David Brownell <[EMAIL PROTECTED]> Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]> drivers/usb/gadget/Kconfig | 2 +- drivers/usb/gadget/omap_udc.c | 30 ++++++++++++++++++------------ 2 files changed, 19 insertions(+), 13 deletions(-) diff -Nru a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig --- a/drivers/usb/gadget/Kconfig 2005-03-08 16:52:24 -08:00 +++ b/drivers/usb/gadget/Kconfig 2005-03-08 16:52:24 -08:00 @@ -194,7 +194,7 @@ config USB_GADGET_OMAP boolean "OMAP USB Device Controller" depends on ARCH_OMAP - select ISP1301_OMAP if MACH_OMAP_H2 + select ISP1301_OMAP if MACH_OMAP_H2 || MACH_OMAP_H3 help Many Texas Instruments OMAP processors have flexible full speed USB device controllers, with support for up to 30 diff -Nru a/drivers/usb/gadget/omap_udc.c b/drivers/usb/gadget/omap_udc.c --- a/drivers/usb/gadget/omap_udc.c 2005-03-08 16:52:24 -08:00 +++ b/drivers/usb/gadget/omap_udc.c 2005-03-08 16:52:24 -08:00 @@ -2,7 +2,7 @@ * omap_udc.c -- for OMAP full speed udc; most chips support OTG. * * Copyright (C) 2004 Texas Instruments, Inc. - * Copyright (C) 2004 David Brownell + * Copyright (C) 2004-2005 David Brownell * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -2046,7 +2046,10 @@ pullup_disable (udc); } - if (machine_is_omap_innovator()) + /* boards that don't have VBUS sensing can't autogate 48MHz; + * can't enter deep sleep while a gadget driver is active. + */ + if (machine_is_omap_innovator() || machine_is_omap_osk()) omap_vbus_session(&udc->gadget, 1); done: @@ -2064,7 +2067,7 @@ if (!driver || driver != udc->driver) return -EINVAL; - if (machine_is_omap_innovator()) + if (machine_is_omap_innovator() || machine_is_omap_osk()) omap_vbus_session(&udc->gadget, 0); if (udc->transceiver) @@ -2157,13 +2160,13 @@ } } -static char *trx_mode(unsigned m) +static char *trx_mode(unsigned m, int enabled) { switch (m) { - case 3: - case 0: return "6wire"; + case 0: return enabled ? "*6wire" : "unused"; case 1: return "4wire"; case 2: return "3wire"; + case 3: return "6wire"; default: return "unknown"; } } @@ -2171,17 +2174,20 @@ static int proc_otg_show(struct seq_file *s) { u32 tmp; + u32 trans; tmp = OTG_REV_REG; - seq_printf(s, "OTG rev %d.%d, transceiver_ctrl %08x\n", - tmp >> 4, tmp & 0xf, - USB_TRANSCEIVER_CTRL_REG); + trans = USB_TRANSCEIVER_CTRL_REG; + seq_printf(s, "OTG rev %d.%d, transceiver_ctrl %03x\n", + tmp >> 4, tmp & 0xf, trans); tmp = OTG_SYSCON_1_REG; seq_printf(s, "otg_syscon1 %08x usb2 %s, usb1 %s, usb0 %s," FOURBITS "\n", tmp, - trx_mode(USB2_TRX_MODE(tmp)), - trx_mode(USB1_TRX_MODE(tmp)), - trx_mode(USB0_TRX_MODE(tmp)), + trx_mode(USB2_TRX_MODE(tmp), trans & CONF_USB2_UNI_R), + trx_mode(USB1_TRX_MODE(tmp), trans & CONF_USB1_UNI_R), + (USB0_TRX_MODE(tmp) == 0) + ? "internal" + : trx_mode(USB0_TRX_MODE(tmp), 1), (tmp & OTG_IDLE_EN) ? " !otg" : "", (tmp & HST_IDLE_EN) ? " !host" : "", (tmp & DEV_IDLE_EN) ? " !dev" : "", ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_ide95&alloc_id396&op=click _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel