From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rodolfo Giometti Date: Wed, 9 May 2007 11:19:31 +0200 Subject: [U-Boot-Users] USB device configuration In-Reply-To: <20070509090311.GC11070@enneenne.com> References: <20070509090311.GC11070@enneenne.com> Message-ID: <20070509091930.GD11070@enneenne.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wed, May 09, 2007 at 11:03:11AM +0200, Rodolfo Giometti wrote: > Hello, > > during my PXA27x USB device support developing adventure I notice that > usbtty calls the functions: > > udc_init: PXA27x usbd start > udc_setup_ep: setting up endpoint addr 0 > udc_enable: enable device a2077f74, status 0 > udc_connect: > udc_setup_ep: setting up endpoint addr 1 > udc_setup_ep: setting up endpoint addr 82 > udc_setup_ep: setting up endpoint addr 83 > > Looking at PXA27x manual I read that I have to setup the endpoints and > __then__ enable UDC for normal operations! But looking above I see > that u-boot calls before the udc_enable() and then the function > udc_setup_ep()... I think that the correct sequence into usbtty should be: @@ -554,11 +554,11 @@ int drv_usbtty_init (void) usbtty_init_strings (); usbtty_init_instances (); + usbtty_init_endpoints (); + udc_startup_events (device_instance);/* Enable dev, init udc pointers */ udc_connect (); /* Enable pullup for host detection */ - usbtty_init_endpoints (); - /* Device initialization */ memset (&usbttydev, 0, sizeof (usbttydev)); Comments? Rodolfo -- GNU/Linux Solutions e-mail: giometti at enneenne.com Linux Device Driver giometti at gnudd.com Embedded Systems giometti at linux.it UNIX programming phone: +39 349 2432127