From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Brownell Date: Sat, 13 Jun 2009 04:13:59 -0700 Subject: [U-Boot] [patch] rm9200 ethernet driver: board-specific quirk (csb337) In-Reply-To: <20090613102610.GB3814@game.jcrosoft.org> References: <200906091114.24166.david-b@pacbell.net> <200906121502.46867.david-b@pacbell.net> <20090613102610.GB3814@game.jcrosoft.org> Message-ID: <200906130413.59441.david-b@pacbell.net> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Saturday 13 June 2009, Jean-Christophe PLAGNIOL-VILLARD wrote: > > > > The machine_is_X() macros are automatically #ifdeffed in > > the header; no size impact. ?Read ... > > If I use this pacth on the rm9200ek the u-boot.bin size will increase > for nothing I'm not following you. The lines are: #ifdef CONFIG_MACH_CSB337 # ifdef machine_arch_type # undef machine_arch_type # define machine_arch_type __machine_arch_type # else # define machine_arch_type MACH_TYPE_CSB337 # endif # define machine_is_csb337() (machine_arch_type == MACH_TYPE_CSB337) #else # define machine_is_csb337() (0) #endif ... and similar for EK. The csb337 config file sets CONFIG_MACH_CSB337, and nothing else does. Result: on rm9200ek, that test becomes if(0), while on csb337 it becomes if (X == X), where X == MACH_TYPE_CSB337. > If I was able to detect dynamicly on which board I will run ok > but it's not the case here > so please use > #ifdef CONFIG_MACH_xxx > #else > #endif See above. There already *IS* such an #ifdef, but it's just not cluttering up the guts of that driver.