From: Wolfgang Denk Date: Sun, 19 Sep 2010 00:58:47 +0200 Subject: [U-Boot] [PATCH 12/26 v2][NEXT] ARM: add relocation support In-Reply-To: <4C953EC4.2090604@free.fr> References: <4C62E8C3.8050006@denx.de> <1284721853-8298-1-git-send-email-hs@denx.de> <1284721853-8298-2-git-send-email-hs@denx.de> <1284721853-8298-3-git-send-email-hs@denx.de> <1284721853-8298-4-git-send-email-hs@denx.de> <1284721853-8298-5-git-send-email-hs@denx.de> <1284721853-8298-6-git-send-email-hs@denx.de> <1284721853-8298-7-git-send-email-hs@denx.de> <1284721853-8298-8-git-send-email-hs@denx.de> <1284721853-8298-9-git-send-email-hs@denx.de> <1284721853-8298-10-git-send-email-hs@denx.de> <1284721853-8298-11-git-send-email-hs@denx.de> <1284721853-8298-12-git-send-email-hs@denx.de> <1284721853-8298-13-git-send-email-hs@denx.de> <4C953EC4.2090604@free.fr> Message-ID: <20100918225847.7F657157D71@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 Albert ARIBAUD, In message <4C953EC4.2090604@free.fr> you wrote: > > > +#if defined(CONFIG_BOARD_EARLY_INIT_F) > > + board_early_init_f, > > +#endif > > + timer_init, /* initialize timer */ > > +#ifdef CONFIG_FSL_ESDHC > > + get_clocks, > > +#endif > > + env_init, /* initialize environment */ > > + init_baudrate, /* initialze baudrate settings */ > > + serial_init, /* serial communications setup */ > > + console_init_f, /* stage 1 init of console */ > > + display_banner, /* say that we are here */ > > +#if defined(CONFIG_DISPLAY_CPUINFO) > > + print_cpuinfo, /* display cpu info (and speed) */ > > +#endif > > +#if defined(CONFIG_DISPLAY_BOARDINFO) > > + checkboard, /* display board info */ > > +#endif > > +#if defined(CONFIG_HARD_I2C) || defined(CONFIG_SOFT_I2C) > > + init_func_i2c, > > +#endif > > + dram_init, /* configure available RAM banks */ > > +#if defined(CONFIG_CMD_PCI) || defined (CONFIG_PCI) > > + arm_pci_init, > > +#endif > > + NULL, > > +}; > > Are all these inits really required at board_init_f stage? I understand Good question... > initializing the console in order to print out diagnostic and error > messages before RAM is initialized, and I understand initializing RAM of > course, but are I2C or PCI init needed before relocation? Can't they > wait until board_init_r? I2C may be needed for example if you have the environment stored in a I2C EEPROM - but then this is needed before init_baudrate ... CONFIG_PCI - I don't think this is used at all by any ARM board yet. My understanding is that Heiko might be preparing arch/arm/lib/board.c for merging with arch/powerpc/lib/board.c ... 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 Do not simplify the design of a program if a way can be found to make it complex and wonderful.