[U-Boot-Users] [PATCH 6/14] Add USB console support as default on Adder87x board

Yuli Barcohen yuli at arabellasw.com
Sun May 28 17:41:14 CEST 2006


>>>>> Bryan O'Donoghue writes:

    Bryan> Adds some CONFIG/CFG variables to support a USB console by
    Bryan> default on the Adder87x

...

    Bryan> +#if 1
    Bryan> +#define CONFIG_USB_DEVICE /* Include UDC driver */
    Bryan> +#define CONFIG_USB_TTY /* Bind the TTY driver to UDC */
    Bryan> +#define CONFIG_USBD_MANUFACTURER "CodeHermit.ie"
    Bryan> +#define CONFIG_USBD_PRODUCT_NAME "Das U-Boot"

The values above are not Adder-specific. Do they need to be copied to
configuration files of every board which uses USB console? I think
that default values (manufacturer, name, IDs mentioned below) should be
defined in a common driver-specific file.

    Bryan> +/* Never use the next two defines in any production system */

So why do you use them as default configuration for any Adder board? The
default configuration should allow for building working U-Boot image
from unchanged source. With such defaults, the sources always must be
changed before build. I'd suggest adding another configuration target to
the main Makefile for building Adder U-Boot with USB console.

    Bryan> +#define CONFIG_USBD_VENDORID 0xFFFF /* Some mythical vendor */
    Bryan> +#define CONFIG_USBD_PRODUCTID 0xFFFF /* Some mythical device */
    Bryan> +
    Bryan> +#define CFG_USB_EXTC_CLK 0x02 /* Oscillator on EXTC_CLK> 2 */
    Bryan> +#define CFG_USB_BRG_CLK 0x04 /* or use Baud rate generator 0x04 */
    Bryan> +#define CFG_CONSOLE_IS_IN_ENV
    Bryan> +#endif
    Bryan> +

-- 
========================================================================
 Yuli Barcohen       | Phone +972-9-765-1788 |  Software Project Leader
 yuli at arabellasw.com | Fax   +972-9-765-7494 | Arabella Software, Israel
========================================================================





More information about the U-Boot mailing list