From: Simon Glass Date: Sat, 21 Dec 2019 09:13:39 -0700 Subject: [PATCH 4/5] dm: Avoid initing built-in devices when chain loading In-Reply-To: <20191221161340.27047-1-sjg@chromium.org> References: <20191221161340.27047-1-sjg@chromium.org> Message-ID: <20191221161340.27047-5-sjg@chromium.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de When U-Boot is not the first-stage bootloader we don't want to init devices early during boot. Add a check to avoid this. Signed-off-by: Simon Glass --- common/board_r.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/board_r.c b/common/board_r.c index e711de64b5..4e0dfac4fc 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -320,6 +320,9 @@ static int initr_dm_devices(void) { int ret; + if (!ll_boot_init()) + return 0; + if (IS_ENABLED(CONFIG_TIMER_EARLY)) { ret = dm_timer_init(); if (ret) -- 2.24.1.735.g03f4e72817-goog