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 2A96BC4332F for ; Sun, 11 Dec 2022 14:13:30 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1FB0885369; Sun, 11 Dec 2022 15:13:28 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=intel.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=intel.com header.i=@intel.com header.b="NCFPeIB/"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id EC62D853A2; Sun, 11 Dec 2022 15:13:26 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 354E285369 for ; Sun, 11 Dec 2022 15:13:24 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=jitloonl@ecsmtp.png.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1670768004; x=1702304004; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=XCyENVypm2N5GGp7M7yht7ILNnbdYpL4jHrk8vbLgE8=; b=NCFPeIB/38vlU1qmLZpoW0liltc39exfK0WKN9rDHb0SgdIkInwdIGB5 FCS0SKL/n0FJL5000rS75X9GbWAV1p5gHghV6jS6OlVgxg261ACXb8Wi+ 4ljezUzN9in2k3WAZUCeNGzqJsFUoYw9rw2+JZWwQjJWGK+y+lSst0oLM kZVIxCuYtI7VWowiktDFvgAMV5LLtqoHp14rmP6B0PqjutSHzaxsAH9U7 LNtsMHtUJ8evwfzJ0Awy02mH04snVEspmwTs5dPY4MWi5INKdI1AwSqsQ meeLQt2+d8ziQ0TjWVTRerDU5UHa0FBxDx9KjYL3xZNyV8nfNDBYUs3nA w==; X-IronPort-AV: E=McAfee;i="6500,9779,10558"; a="403960093" X-IronPort-AV: E=Sophos;i="5.96,236,1665471600"; d="scan'208";a="403960093" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Dec 2022 06:13:22 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10558"; a="790213643" X-IronPort-AV: E=Sophos;i="5.96,236,1665471600"; d="scan'208";a="790213643" Received: from pglmail07.png.intel.com ([10.221.193.207]) by fmsmga001.fm.intel.com with ESMTP; 11 Dec 2022 06:13:17 -0800 Received: from localhost (pgli0028.png.intel.com [10.221.84.177]) by pglmail07.png.intel.com (Postfix) with ESMTP id 7BA2C2706; Sun, 11 Dec 2022 22:13:12 +0800 (+08) Received: by localhost (Postfix, from userid 12048045) id 445EAE00218; Sun, 11 Dec 2022 22:13:12 +0800 (+08) From: Jit Loon Lim To: u-boot@lists.denx.de Cc: Jagan Teki , Vignesh R , Marek , Simon , Tien Fong , Kok Kiang , Siew Chin , Sin Hui , Raaj , Dinesh , Boon Khai , Alif , Teik Heng , Hazim , Jit Loon Lim , Sieu Mun Tang , Yau Wai Gan Subject: [PATCH] arm: socfpga: Enable U-boot FIT Config Name Match with Board ID Date: Sun, 11 Dec 2022 22:13:10 +0800 Message-Id: <20221211141310.18059-1-jit.loon.lim@intel.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: Yau Wai Gan U-boot FIT configuration shall be selected based on the Board ID that is set. Signed-off-by: Yau Wai Gan Signed-off-by: Jit Loon Lim --- arch/arm/mach-socfpga/board.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-socfpga/board.c b/arch/arm/mach-socfpga/board.c index 11abf864f5..a9086d9fbe 100644 --- a/arch/arm/mach-socfpga/board.c +++ b/arch/arm/mach-socfpga/board.c @@ -131,13 +131,16 @@ u8 socfpga_get_board_id(void) } -#ifdef CONFIG_SPL_BUILD -__weak int board_fit_config_name_match(const char *name) +#if IS_ENABLED(CONFIG_SPL_BUILD) && IS_ENABLED(CONFIG_TARGET_SOCFPGA_SOC64) +int board_fit_config_name_match(const char *name) { - /* Just empty function now - can't decide what to choose */ - debug("%s: %s\n", __func__, name); + char board_name[10]; - return 0; + sprintf(board_name, "board_%u", socfpga_get_board_id()); + + debug("Board name: %s\n", board_name); + + return strcmp(name, board_name); } #endif -- 2.26.2