From mboxrd@z Thu Jan 1 00:00:00 1970 From: Timur Tabi Date: Fri, 18 May 2007 09:48:20 -0500 Subject: [U-Boot-Users] Ideas on U-Boot configuration with FDT In-Reply-To: <464DBBB2.1060006@grandegger.com> References: <464D6D4A.4000200@grandegger.com> <464DB7C1.4050509@freescale.com> <464DBBB2.1060006@grandegger.com> Message-ID: <464DBCB4.3050409@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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(). > 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. -- Timur Tabi Linux Kernel Developer @ Freescale