[U-Boot] [PATCH] usbtty/omap: update to current API
Jean-Christophe PLAGNIOL-VILLARD
plagnioj at jcrosoft.com
Mon Nov 10 17:05:00 CET 2008
On 20:59 Sun 09 Nov , Wolfgang Denk wrote:
> Dear Jean-Christophe PLAGNIOL-VILLARD,
>
> In message <1226254923-8378-1-git-send-email-plagnioj at jcrosoft.com> you wrote:
> > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
>
> Please explain what exactly you are trying to change / fix here.
>
> > diff --git a/drivers/serial/usbtty.c b/drivers/serial/usbtty.c
> > index e738c56..448defa 100644
> > --- a/drivers/serial/usbtty.c
> > +++ b/drivers/serial/usbtty.c
> > @@ -22,14 +22,13 @@
> > */
> >
> > #include <common.h>
> > -
> > +#include <config.h> /* If defined, override Linux identifiers with
> > + * vendor specific ones */
>
> "If defined" - what needs to be defined to have any impact here?
>
> And why do we care about Linux identifiers here? That's U-Boot, not
> Linux.
Yes I may remove the comment because I've allow to not overwrite them
>
> > +#ifndef CONFIG_USBD_VENDORID
> > #define CONFIG_USBD_VENDORID 0x0525 /* Linux/NetChip */
> > +#endif
> > +#ifndef CONFIG_USBD_PRODUCTID_GSERIAL
> > #define CONFIG_USBD_PRODUCTID_GSERIAL 0xa4a6 /* gserial */
> > +#endif
> > +#ifndef CONFIG_USBD_PRODUCTID_CDCACM
> > #define CONFIG_USBD_PRODUCTID_CDCACM 0xa4a7 /* CDC ACM */
> > +#endif
> > +#ifndef CONFIG_USBD_MANUFACTURER
> > #define CONFIG_USBD_MANUFACTURER "Das U-Boot"
> > +#endif
> > +#ifndef CONFIG_USBD_PRODUCT_NAME
> > #define CONFIG_USBD_PRODUCT_NAME U_BOOT_VERSION
> > +#endif
> >
> > -
> > +#ifndef CONFIG_USBD_CONFIGURATION_STR
> > #define CONFIG_USBD_CONFIGURATION_STR "TTY via USB"
> > +#endif
>
> All these new config options need to be documented in the README.
>
this not new config option this is present option which is supposed to be
define in the config file or use this defaul one.
I'll take a look on the README anyway and add it if nor present
> > /* Called to start packet transmission. */
> > -void udc_endpoint_write (struct usb_endpoint_instance *endpoint)
> > +int udc_endpoint_write (struct usb_endpoint_instance *endpoint)
> > {
> > unsigned short epnum =
> > endpoint->endpoint_address & USB_ENDPOINT_NUMBER_MASK;
> > @@ -1081,6 +1081,8 @@ void udc_endpoint_write (struct usb_endpoint_instance *endpoint)
> > /* deselect the endpoint FIFO */
> > outw (UDC_EP_Dir | epnum, UDC_EP_NUM);
> > }
> > +
> > + return 0;
> > }
>
> If the only way to exit the function is by returning 0 at the end,
> then we should rather leave this as is and have this function return
> void - otherwise we suggest that different values could be returned
> which is not the case.
on mpc8xx they do return -1 if failed
and they share to same api
Best Regards,
J.
More information about the U-Boot
mailing list