From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bryan O'Donoghue Date: Fri, 26 May 2006 22:08:30 +0100 Subject: [U-Boot-Users] [PATCH 9/14] Update omap_1510 stuff to do udc_irq locally and to contain placeholder flow control functions Message-ID: <20060526220830.dddb238d.bodonoghue@codehermit.ie> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Signed-off-by: Bryan O'Donoghue modified: drivers/usbdcore_omap1510.c Moves udc_irq to omap1510 so that a higher level protocol driver such as usbtty won't care about mpc8xx or omap1510 Adds udc_set_nak and udc_unset_nak to prevent link errors, however the functions will have to be implemented by someone with omap hardware. Without these functions implemented flow control has no effect, which is no difference from before ! --- drivers/usbdcore_omap1510.c | 29 ++++++++++++++++++++++++++++- 1 files changed, 28 insertions(+), 1 deletions(-) bed4ca075edc97c3d56aa828a63aafeb08dc4741 diff --git a/drivers/usbdcore_omap1510.c b/drivers/usbdcore_omap1510.c --- a/drivers/usbdcore_omap1510.c +++ b/drivers/usbdcore_omap1510.c @@ -645,7 +645,7 @@ static void omap1510_udc_state_changed ( static void omap1510_udc_setup (struct usb_endpoint_instance *endpoint) { UDCDBG ("-> Entering device setup"); - + do { const int setup_pktsize = 8; unsigned char *datap = @@ -1517,4 +1517,31 @@ void udc_startup_events (struct usb_devi udc_enable (device); } +/** + * udc_irq - do pseudo interrupts + */ +void udc_irq(void) +{ + /* Loop while we have interrupts. + * If we don't do this, the input chain + * polling delay is likely to miss + * host requests. + */ + while (inw (UDC_IRQ_SRC) & ~UDC_SOF_Flg) { + /* Handle any new IRQs */ + omap1510_udc_irq (); + omap1510_udc_noniso_irq (); + } +} + +/* Flow control */ +void udc_set_nak(int epid) +{ + /* TODO: implement this functionality in omap1510 */ +} + +void udc_unset_nak (int epid) +{ + /* TODO: implement this functionality in omap1510 */ +} #endif