From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Roese Date: Mon, 17 Nov 2008 14:56:13 +0100 Subject: [U-Boot] [PATCH] MIPS: Add board_early_init_f() to init_sequence In-Reply-To: <491FC552.6060102@ruby.dti.ne.jp> References: <1226492282-27777-1-git-send-email-sr@denx.de> <491FC552.6060102@ruby.dti.ne.jp> Message-ID: <200811171456.13382.sr@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 On Sunday 16 November 2008, Shinya Kuribayashi wrote: > > +int __board_early_init_f(void) > > +{ > > + /* > > + * Nothing to do in this dummy implementation > > + */ > > + return 0; > > +} > > +int board_early_init_f(void) __attribute__((weak, > > alias("__board_early_init_f"))); + > > /* > > * The Malloc area is immediately below the monitor copy in DRAM > > */ > > @@ -167,6 +176,7 @@ static int init_baudrate (void) > > typedef int (init_fnc_t) (void); > > > > init_fnc_t *init_sequence[] = { > > + board_early_init_f, > > timer_init, > > env_init, /* initialize environment */ > > #ifdef CONFIG_INCA_IP > > This is ok. I don't know why people prefers alias, though :-) Just because we don't need the ugly #ifdef's by using weak aliases. It has some drawbacks of course but in general the resulting source code looks "cleaner". Thanks. Best regards, Stefan ===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de =====================================================================