
Bryan O'Donoghue writes:
Bryan> Greetings list. This is a supplemental patch to the 14 Bryan> patches sent on the 26/05/06. It implements the various Bryan> changes to the patch set that I had with Yuli Barcohen Bryan> yesterday.
I'm afraid it's not exactly what we discussed. Please see below.
Bryan> Let me know if further changes are required.
Bryan> diff --git a/Makefile b/Makefile Bryan> --- a/Makefile Bryan> +++ b/Makefile Bryan> @@ -58,7 +58,7 @@ ifeq ($(HOSTARCH),ppc) Bryan> CROSS_COMPILE = else ifeq ($(ARCH),ppc) Bryan> -CROSS_COMPILE = powerpc-linux- Bryan> +CROSS_COMPILE = ppc_8xx-
I don't think changing default compiler for ALL PowerPC targets was your intention.
Bryan> endif ifeq ($(ARCH),arm) CROSS_COMPILE = arm-linux- Bryan> @@ -437,6 +437,9 @@ AdderII_config \ Bryan> @echo "#define CONFIG_MPC852T" > include/config.h) Bryan> @./mkconfig -a Adder ppc mpc8xx adder
Bryan> +AdderUSB_config: unconfig Bryan> + @./mkconfig -a AdderUSB ppc mpc8xx adder Bryan> +
I didn't mean to add entirely new board target. I think a new target should be added to the existing Adder targets which would add a #define for USB console just like "#define CONFIG_MPC852T" is added for AdderII. Conditional on this #define, BoardName.h can include usbd_vendor.h which we decided to create. In the current version of your patch, it's exactly opposite: usbd_vendor.h (AdderUSB.h in our case) includes BoardName.h (Adder.h). This means that for every board wishing to support USB console you have to create another BoardNameUSB.h (which is a clone of AdderUSB.h). What's about creating CodeHermit.h containing something like this:
#define CONFIG_USB_DEVICE /* Include UDC driver */ #define CFG_USB_EXTC_CLK 0x02 /* Oscillator on EXTC_CLK 2 */ #define CFG_USB_BRG_CLK 0x04 #define CFG_CONSOLE_IS_IN_ENV #define CONFIG_USBD_MANUFACTURER "CodeHermit.ie" #define CONFIG_USBD_PRODUCT_NAME "Das U-Boot" #define CONFIG_USBD_VENDORID 0xFFFF #define CONFIG_USBD_PRODUCTID_GSERIAL 0xFFFF #define CONFIG_USBD_PRODUCTID_CDCACM 0xFFFE
and adding to Adder.h
#ifdef CONFIG_USB_TTY #include <CodeHermit.h> #endif
"#define CONFIG_USB_TTY" would be added by the configuration target in the Makefile. Any other board can then include CodeHermit.h unchanged. To allow IDs overwriting, you can even use the following in CodeHermit.h:
#ifndef CONFIG_USBD_VENDORID #define CONFIG_USBD_VENDORID 0xFFFF #endif
and so on. Hopefully we can use Linux IDs (NetChip) instead of 0xFFFF as the defaults.