From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bryan O'Donoghue Date: Wed, 31 May 2006 11:42:56 +0100 Subject: [U-Boot-Users] [PATCH 1/1] Supplemental USB patch to previous 14 patches. In-Reply-To: <20060530235951.50999353ADC@atlas.denx.de> References: <20060530225053.7575ab34@localhost.localdomain> <20060530235951.50999353ADC@atlas.denx.de> Message-ID: <20060531114256.4398ce08@localhost.localdomain> 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, 31 May 2006 01:59:51 +0200 Wolfgang Denk wrote: Hello Wolfgang. > Please hold on for a minute. The Makefile's purpose is to define > dependencies. It is actually not the place to put code and > configuration trickery there. Yes, I know, this is already in use > with other boards, but I would like to ask you to use such features > only when absolutely necessary. OK I'll implement this whichever way is your preference. I had made this addition to the Makefile as at last night's conversation Adder_config \ Adder87x_config \ AdderII_config \ +AdderUSB_config \ +Adder87xUSB_config \ +AdderIIUSB_config \ : unconfig $(if $(findstring AdderII,$@), \ @echo "#define CONFIG_MPC852T" > include/config.h) + $(if $(findstring USB,$@),\ + @echo "#define CONFIG_USB_TTY" >> include/config.h) @./mkconfig -a Adder ppc mpc8xx adder with the following in Adder.h /* USB TTY */ #ifdef CONFIG_USB_TTY #include /* Include optional Vendor info */ #define CFG_USB_EXTC_CLK 0x02 /* Oscillator on EXTC_CLK 2 */ #define CFG_USB_BRG_CLK 0x04 /* or use Baud rate generator 0x04 */ #define CFG_CONSOLE_IS_IN_ENV /* Console is in env */ #endif > If you just define a new make target name this is simple and readable > (just a single word in the Makefile), and can be evaluated in the > board config file instead. Hmm, I don't really understand how this would work, i.e. if the conditional include CONFIG_USB_TTY or other *doesn't* go into config.h then how does Adder.h know whether or not to include the console code? Bryan