From: Wolfgang Denk Date: Fri, 22 Oct 2010 10:05:43 +0200 Subject: [U-Boot] [PATCH 2/2] Add board support for hawkboard In-Reply-To: <20101022075016.GB8597@Hardy> References: <1287690234-6109-1-git-send-email-urwithsughosh@gmail.com> <20101021204435.08FE71359B7@gemini.denx.de> <20101022075016.GB8597@Hardy> Message-ID: <20101022080543.6424D136320@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Sughosh Ganu, In message <20101022075016.GB8597@Hardy> you wrote: > > > Is there not a better way than adding such a huge #ifdef block? > > Not sure about this one. I need the pinmux configuration functions > from this file. How about splitting the file, and using a separate file for the pinmux stuff? > > No. We don't need config.mk files for this any more. Please move > > settings to board config file. > > This is currently being used by da830evm and da850evm too. If ok, i > can cleanup for those files too, although i cannot test it on these > boards. Yes, cleanup patches (separate from this one) are welcome. > > Again: can we not avoid such a huge #ifdef block here? > > > We need this initialisation for the nand spl part alone, and this is > board specific. Can you please suggest any better way of handling > this. If it turns out that we have code that is common to NAND SPL and normal U-Boot, and other code that is not shared, these parts should be separated into different files so NAND SPL can build and use the common stuff and normal U-Boot additionally build and use the other stuff. > > > #if defined(CONFIG_ARM) && !defined(CONFIG_SYS_ARM_WITHOUT_RELOC) > > > -void board_init_f (ulong bootflag) > > > +void __board_init_f (ulong bootflag) > > > { > > > relocate_code (CONFIG_SYS_TEXT_BASE - TOTAL_MALLOC_LEN, NULL, > > > CONFIG_SYS_TEXT_BASE); > > > } > > > +void board_init_f (ulong bootflag)__attribute__((weak, alias("__board_init_f"))); > > > #endif > > > > This is a global change that affects all NAND booting boards. This > > must be submitted spearately, and you must explain in detail why you > > think you need that. Also please mention on which systems this change > > has been tested. > > For hawkboard, we need to do some board specific initialisation > which can be included in board_init_f. The freescale boards which Can you probably do it in any of the other, board dependent init functions? Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "Buy land. They've stopped making it." - Mark Twain