From: Bryan O'Donoghue Date: Sun, 28 May 2006 18:24:29 +0100 Subject: [U-Boot-Users] [PATCH 6/14] Add USB console support as default on Adder87x board In-Reply-To: <17529.50330.63955.958168@astp0002.localdomain> References: <20060526220714.8297397e.bodonoghue@codehermit.ie> <17529.50330.63955.958168@astp0002.localdomain> Message-ID: <20060528182429.d7b39f9f.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 On Sun, 28 May 2006 18:41:14 +0300 Yuli Barcohen wrote: > 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? Yes they do. CONFIG_USB_DEVICE controls usbdcore_mpc8xx and CONFIG_USB_TTY binds usbtty to usbdcore_mpc8xx, the idea being that somebody might want to support a different sort of high level USB device instead of a console, perhaps, cdc_ethernet or rndis. In such a case CONFIG_USB_DEVICE would be defined but, something like CONFIG_USB_ETHERNET or CONFIG_USB_RNDIS might be defined, instead of CONFIG_USB_TTY. CONFIG_USBD_MANUFACTURER would be something like "CodeHermit", "Arabella Software" or "Acme" and then CONFIG_USBD_PRODUCT_NAME would be a product name "Acme Product X", so this would usually be very product specific and vendor specific. Since all board-specific configurations are kept in the BoardName.h file, my thought was that this was the appropiate place to define these values. > I think > that default values (manufacturer, name, IDs mentioned below) should be > defined in a common driver-specific file. If we had use of a Vendor id and two product ids, then would could have a default set of values here, as Linux does. However in the absence of a generous company giving U-Boot a VendorID for use with 'n' product id's it wouldn't really be possible for the above values be a default as such. However I can see some logic to the argument that someone like Arabella might want to have a usbd_vendor.h file, so that multiple vendors could be supported by a board port. > Bryan> +/* Never use the next two defines in any production system */ > > So why do you use them as default configuration for any Adder board? Indeed. Really one should have a Vendor ID, from the USB Implementors Forum, 0xFFFF and 0xFFFF are unassigned and are defined as place holders, which is why the patch to README states that these values need to be defined on a per-vendor basis. For example were my day-job company to use U-Boot with a USB console in a product, we'd define Vendor to 0x1865 and Product to 0xANumber. > 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. OK. How about if we say that 1) An AdderUSBCons defconfig will be made and 2) A usbd_vendor.h file shall be created, where the _Vendor_ specific defines to the USB console will be defined, thus decoupling the board port from being tied to any specific CONFIG_USBD_MANUFACTURER and so on ? If this is acceptable to you and everybody else, I'll do that straight away. Best Regards, Bryan -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://lists.denx.de/pipermail/u-boot/attachments/20060528/cdf05f3d/attachment.pgp