From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Grandegger Date: Fri, 18 May 2007 17:01:49 +0200 Subject: [U-Boot-Users] Ideas on U-Boot configuration with FDT In-Reply-To: <464DBCB4.3050409@freescale.com> References: <464D6D4A.4000200@grandegger.com> <464DB7C1.4050509@freescale.com> <464DBBB2.1060006@grandegger.com> <464DBCB4.3050409@freescale.com> Message-ID: <464DBFDD.6030209@grandegger.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Timur Tabi wrote: > Wolfgang Grandegger wrote: > >>> I think fdt_checkboard() (or boardcheck) should be run from inside >>> the fdt_open_into() command. This takes advantage of the existing >>> mechanism of fdt_open_into() to return an error. It also allows for >>> a device tree to be opened after U-Boot has booted. >> >> But it's too late for initial initialization (before RAM is available). > > Just make it so that fdt_open_into() is called early: > > checkboard, > INIT_FUNC_WATCHDOG_INIT > #if defined(CFG_FDT_ADDR_FLASH) > init_fdt, > #endif > #if defined(CONFIG_MISC_INIT_F) > misc_init_f, > #endif > INIT_FUNC_WATCHDOG_RESET > #if defined(CONFIG_HARD_I2C) || defined(CONFIG_SOFT_I2C) > init_func_i2c, > #endif > > and init_fdt() calls fdt_open_into(). RAM is _not_ available at that stage. >> Using the FDT directly from ROM is not recommended because access >> might be slow, but we likely need it for early initialization. > > I don't access speed is important for the reading the FDT, especially > flash vs. RAM. It's not that much slower. Depends, you might be right for FLASH on a 32-bit bus. On slow ROM devices and slow processors, it matters. Wolfgang.