Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3756CC00144 for ; Mon, 1 Aug 2022 10:33:14 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3ABEB84506; Mon, 1 Aug 2022 12:31:29 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=fris.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=fris.de header.i=@fris.de header.b="Gab6pu8p"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1E16C84577; Mon, 1 Aug 2022 12:31:18 +0200 (CEST) Received: from mail.fris.de (mail.fris.de [IPv6:2a01:4f8:c2c:390b::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 459108456C for ; Mon, 1 Aug 2022 12:30:57 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=fris.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=frieder@fris.de Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 9F7C7BFB1D; Mon, 1 Aug 2022 12:30:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fris.de; s=dkim; t=1659349856; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=ky92nrJIVmf1MWJ68Ce9GPFZFNw9QfCmvgZykeh4TAw=; b=Gab6pu8pu8rktpyoqRBMVKAdJHXNT/fNKLseV+tMkMAHKA+wIogS4cy1QGmgJFd5xTcQDZ XXEVAYix9a0luZzNm8dAe//oOK/+Hrr+oHmX+GiTEeDidFmHBs8xvt5mwj/atJrpZwyVJP 2Y7+9PFUVURvH0dSZl6u4YJMQdIu9w0XPKPb7LUkbFAGZehH0X1b0SW7//OAwNM40ajmBs jpvUAIrg4NwXHbNmeiJm//f/bj/5MHyTjrXYG5kvbnG8wDTjjjk8ww/TEDFMQ7sEp8mbib PTlL/L6vQTsCSxMNcGt7OETMCEyQlGrlJ7PyXFhblPqaH+Oe8TF0junqdPoJfg== From: Frieder Schrempf To: Frieder Schrempf , u-boot@lists.denx.de Cc: Fabio Estevam , Simon Glass , Stefano Babic , Sughosh Ganu Subject: [PATCH v2 13/19] imx: kontron-sl-mx8mm: Prepare for other i.MX8MM SoM types Date: Mon, 1 Aug 2022 12:30:15 +0200 Message-Id: <20220801103027.96820-14-frieder@fris.de> In-Reply-To: <20220801103027.96820-1-frieder@fris.de> References: <20220801103027.96820-1-frieder@fris.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Last-TLS-Session-Version: TLSv1.3 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean From: Frieder Schrempf This sets an env variable 'som_type' from the board code. It can later be used by environment scripts, e. g. to select the proper devicetree for the board. Signed-off-by: Frieder Schrempf --- Changes in v2: * add missing CONFIG_BOARD_LATE_INIT --- board/kontron/sl-mx8mm/sl-mx8mm.c | 6 ++++++ configs/kontron-sl-mx8mm_defconfig | 1 + 2 files changed, 7 insertions(+) diff --git a/board/kontron/sl-mx8mm/sl-mx8mm.c b/board/kontron/sl-mx8mm/sl-mx8mm.c index 416c4cbb407..9cbae6add16 100644 --- a/board/kontron/sl-mx8mm/sl-mx8mm.c +++ b/board/kontron/sl-mx8mm/sl-mx8mm.c @@ -121,6 +121,12 @@ int board_init(void) return 0; } +int board_late_init(void) +{ + env_set("som_type", "n801x"); + return 0; +} + enum env_location env_get_location(enum env_operation op, int prio) { enum boot_device boot_dev = get_boot_device(); diff --git a/configs/kontron-sl-mx8mm_defconfig b/configs/kontron-sl-mx8mm_defconfig index 5dcee988478..a5c48a3fbca 100644 --- a/configs/kontron-sl-mx8mm_defconfig +++ b/configs/kontron-sl-mx8mm_defconfig @@ -31,6 +31,7 @@ CONFIG_SPL_LOAD_FIT=y # CONFIG_USE_SPL_FIT_GENERATOR is not set CONFIG_OF_BOARD_SETUP=y CONFIG_BOARD_TYPES=y +CONFIG_BOARD_LATE_INIT=y CONFIG_SPL_HAS_BSS_LINKER_SECTION=y CONFIG_SPL_BSS_START_ADDR=0x910000 CONFIG_SPL_BSS_MAX_SIZE=0x2000 -- 2.37.1