Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3D928C432BE for ; Thu, 26 Aug 2021 21:43:01 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 8343160F4A for ; Thu, 26 Aug 2021 21:43:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 8343160F4A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6F32083211; Thu, 26 Aug 2021 23:42:48 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com 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=gmail.com header.i=@gmail.com header.b="GVYchbDJ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3002483216; Thu, 26 Aug 2021 23:42:28 +0200 (CEST) Received: from mail-oi1-x234.google.com (mail-oi1-x234.google.com [IPv6:2607:f8b0:4864:20::234]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id AB17183218 for ; Thu, 26 Aug 2021 23:42:17 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=mr.nuke.me@gmail.com Received: by mail-oi1-x234.google.com with SMTP id s20so6707781oiw.3 for ; Thu, 26 Aug 2021 14:42:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NQ1FcGsMJO2x70RHgnSKydCnHM0mFjYPDny6+5kvnAg=; b=GVYchbDJ1uFs1Mk0wrn6chF1/xdlRMLTvhONneF3LTAQD+diBikj5Fz2lJzcYn+t0g fah+qoQrM2hX8oFNKGreavdedEZozOOLalBM7nEmSPhZo8eCxbPBlEzIJvD2c6ix4nGZ muoj/jfFY/pOH+E/R5ZE5nFGi2HWmOyO7E83pSQb4e98pYvoZzsLcqiGa8wi6CJOZ11G FffwoEiSDPRsHDw7sdh771gPGJGgFPWZiFhTwUzEFoFD1HJS8dzqaepg7jSjGNdygHEb wtGVAhI+5HljV005InA7S288pMdcMMJR3dwYCJozjkd1HDMJlBdT0D3AGLGDNLWGW0HF nhBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=NQ1FcGsMJO2x70RHgnSKydCnHM0mFjYPDny6+5kvnAg=; b=LQ4hLS21Gqsbd0iBALDS4/8loNzuHswbAveGEy1PXCmNJWr3mUOdJlh+xT4FUgmXrF 7nu6nhPOekxuoPFmL6BtItq8oARfpByh45H2VvH4CtHlLUBzbWrO51S/Tq4odmA0uei2 BrrMl5+3B6oMM7U3wFJszmy44FmWKzESuvAIpwExpWg193XQf33ZSVwtzRV4gQTZ6i5p 5AC3gMGW9/9wph6jMDj/ipercY2V/yg4frEe15ZlU9udnHcDZUNAIiIhYpMtpRBqLfGO HRD3khDHm2iSry/def3vO8vmzghp7JTAi7ciMs9ZKN7djeRmmVwrJq1Yq4bsbxSc4jJi 6A0w== X-Gm-Message-State: AOAM530MIHHMSqZtS/P9T5GHLYTvAYMNaRhFBl6o6E5mIumc0hzHmeSi a7aLZtjL5y5jXubwG1ZofMLqIwwyhwE= X-Google-Smtp-Source: ABdhPJw0VCMtWwu5ESGryIp+H6pJsRQH98HANRYacOJOdlMehlCI8m5CewJDp5yx9KDVY03pT+mUtw== X-Received: by 2002:aca:accd:: with SMTP id v196mr11555214oie.152.1630014135843; Thu, 26 Aug 2021 14:42:15 -0700 (PDT) Received: from nuclearis3.lan (c-98-195-139-126.hsd1.tx.comcast.net. [98.195.139.126]) by smtp.gmail.com with ESMTPSA id 14sm858852otl.78.2021.08.26.14.42.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Aug 2021 14:42:15 -0700 (PDT) From: Alexandru Gagniuc To: u-boot@lists.denx.de Cc: patrick.delaunay@foss.st.com, marex@denx.de, Alexandru Gagniuc Subject: [PATCH 03/10] board: stm32mp1: Implement board_fit_config_name_match() for SPL Date: Thu, 26 Aug 2021 16:42:02 -0500 Message-Id: <20210826214209.254461-4-mr.nuke.me@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210826214209.254461-1-mr.nuke.me@gmail.com> References: <20210826214209.254461-1-mr.nuke.me@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean This function is needed when loading a FIT image from SPL. It selects the correct configuration node for the current board. Implement it. Signed-off-by: Alexandru Gagniuc --- board/st/stm32mp1/spl.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/board/st/stm32mp1/spl.c b/board/st/stm32mp1/spl.c index bb210d7727..543c037ad8 100644 --- a/board/st/stm32mp1/spl.c +++ b/board/st/stm32mp1/spl.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include @@ -92,3 +93,12 @@ void board_debug_uart_init(void) #endif } #endif + +int board_fit_config_name_match(const char *name) +{ + if (of_machine_is_compatible("st,stm32mp157c-dk2")) + return !strstr(name, "stm32mp157c-dk2"); + + /* Okay, it's most likely an EV board */ + return !strstr(name, "stm32mp157") + !strstr(name, "-ev"); +} -- 2.31.1