From nobody Mon Feb 9 15:09:04 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+76763+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+76763+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1624030094; cv=none; d=zohomail.com; s=zohoarc; b=V7EgiungnjLZ1rjr5MXimLcwD0nqDagoF5m1x5pn17tJqQesFHMDb2Bui0DyA9ZvLpmUGwWuwzjck1u8Wh8B02q/dWAMG7cEGOXL//dOh6Xuk7V4XG+bvsdgfzxirUDms5UVytB0esgMh3UYOJfMAwp79KKSUQm3tsVMwAqra4w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1624030094; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=N7K1zIG1S6X2h/dFALeCJ0P8ISzPkImV9x6721IqgNI=; b=jrJS6sJBgWAhBaHlKKar+QbUi83Bl/Z12F9uJC35TZ9RKZuESNOV3Wpnz/vrAY7/SuQxG/esPVY1S934ggdG5aSQQrdVVwuWZRN27CWXs0fek+Qr8wdW4xW5q3C+mS7Ev8+UGqcRfd8PkLB5NtHbFyvNq3WoS3RC08nrlRG8A64= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+76763+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1624030094395714.3542399623483; Fri, 18 Jun 2021 08:28:14 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id SLRpYY1788612xzielUT7DU5; Fri, 18 Jun 2021 08:28:14 -0700 X-Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) by mx.groups.io with SMTP id smtpd.web11.9401.1624030088634153568 for ; Fri, 18 Jun 2021 08:28:08 -0700 X-Received: by mail-pl1-f177.google.com with SMTP id e1so4835462plh.8 for ; Fri, 18 Jun 2021 08:28:08 -0700 (PDT) X-Gm-Message-State: 8jswMfDBbrxw2n1Dd7E17l0fx1787277AA= X-Google-Smtp-Source: ABdhPJzARhaZ0Jg7f2PSzejb5pEfL/Gmf1aeTK8u1tbcmPG2727IAexX78iZVWb/9mG6bNnMQCLEKQ== X-Received: by 2002:a17:90a:7025:: with SMTP id f34mr21142559pjk.95.1624030087945; Fri, 18 Jun 2021 08:28:07 -0700 (PDT) X-Received: from embedded-PC.puresoft.int ([125.63.92.170]) by smtp.gmail.com with ESMTPSA id v15sm8326360pfm.216.2021.06.18.08.28.04 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Jun 2021 08:28:07 -0700 (PDT) From: "Vikas Singh via groups.io" To: devel@edk2.groups.io Cc: sami.mujawar@arm.com, leif@nuviainc.com, meenakshi.aggarwal@nxp.com, samer.el-haj-mahmoud@arm.com, v.sethi@nxp.com, arokia.samy@puresoftware.com, kuldip.dwivedi@puresoftware.com, ard.biesheuvel@arm.com, vikas.singh@nxp.com, Sunny.Wang@arm.com Subject: [edk2-devel] [PATCH V2 1/4] Platform/NXP: Make SoC version log in ConfigurationManager generic Date: Fri, 18 Jun 2021 20:57:37 +0530 Message-Id: <20210618152740.14819-2-vikas.singh@puresoftware.com> In-Reply-To: <20210618152740.14819-1-vikas.singh@puresoftware.com> References: <20210618152740.14819-1-vikas.singh@puresoftware.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,vikas.singh@puresoftware.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1624030094; bh=goFQl+l8ycUarLEcEId/a55tUCFWWGc6+0lk+/NfZ3M=; h=Cc:Date:From:Reply-To:Subject:To; b=M0X18GneHzddtuQExQvlVKyqg/84j454QdLM5bgRPurRrw7cOPcU1uG1N3UbiLzxGnM ym8si/2h0MzOqfDlLAy/jfZpPNyBGUAdvn6oDOpp6sibPCXsfLZXHOXH8PFG1If+m0QIC 8X9//dTe571fjCC0qurqHg++gJ2BPt26E78= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" This patch replaces the logic in ConfigurationManager to print platform name based on platform ID with a simple #define PLAT_SOC_NAME defined in platform headers. This also removes duplication of the SVR_LX2160A, SVR_SOC_VER, SVR_MAJOR and SVR_MINOR macro definitions between SoC headers and platform headers. Signed-off-by: Vikas Singh --- Platform/NXP/ConfigurationManagerPkg/ConfigurationManagerDxe/Configuration= Manager.c | 11 ++++------- Platform/NXP/LX2160aRdbPkg/Include/Platform.h = | 8 ++------ Silicon/NXP/LX2160A/LX2160A.dsc.inc = | 3 ++- 3 files changed, 8 insertions(+), 14 deletions(-) diff --git a/Platform/NXP/ConfigurationManagerPkg/ConfigurationManagerDxe/C= onfigurationManager.c b/Platform/NXP/ConfigurationManagerPkg/ConfigurationM= anagerDxe/ConfigurationManager.c index 80ce8412c4..39376d900b 100644 --- a/Platform/NXP/ConfigurationManagerPkg/ConfigurationManagerDxe/Configur= ationManager.c +++ b/Platform/NXP/ConfigurationManagerPkg/ConfigurationManagerDxe/Configur= ationManager.c @@ -2,7 +2,7 @@ Configuration Manager Dxe =20 Copyright 2020 NXP - Copyright 2020 Puresoftware Ltd + Copyright 2020-2021 Puresoftware Ltd =20 SPDX-License-Identifier: BSD-2-Clause-Patent =20 @@ -25,6 +25,7 @@ */ #include "ConfigurationManager.h" #include +#include =20 /** The platform configuration repository information. */ @@ -170,12 +171,8 @@ InitializePlatformRepository ( PlatformRepo =3D This->PlatRepoInfo; =20 Svr =3D SocGetSvr (); - if (SVR_SOC_VER(Svr) =3D=3D SVR_LX2160A) { - PlatformRepo->FslBoardRevision =3D SVR_MAJOR(Svr); - DEBUG ((DEBUG_INFO, "Fsl : SoC LX2160A Rev =3D 0x%x\n", PlatformRepo->= FslBoardRevision)); - } else { - DEBUG ((DEBUG_INFO, "Fsl : SoC Unknown Rev =3D 0x%x\n", PlatformRepo->= FslBoardRevision)); - } + PlatformRepo->FslBoardRevision =3D SVR_MAJOR(Svr); + DEBUG ((DEBUG_INFO, "Fsl : SoC =3D %s Rev =3D 0x%x\n", PLAT_SOC_NAME, Pl= atformRepo->FslBoardRevision)); =20 return EFI_SUCCESS; } diff --git a/Platform/NXP/LX2160aRdbPkg/Include/Platform.h b/Platform/NXP/L= X2160aRdbPkg/Include/Platform.h index 76a41d4369..f2e831f033 100644 --- a/Platform/NXP/LX2160aRdbPkg/Include/Platform.h +++ b/Platform/NXP/LX2160aRdbPkg/Include/Platform.h @@ -2,7 +2,7 @@ * Platform headers * * Copyright 2020 NXP - * Copyright 2020 Puresoftware Ltd + * Copyright 2020-2021 Puresoftware Ltd * * SPDX-License-Identifier: BSD-2-Clause-Patent * @@ -15,11 +15,7 @@ #define EFI_ACPI_ARM_OEM_REVISION 0x00000000 =20 // Soc defines -#define SVR_SOC_VER(svr) (((svr) >> 8) & 0xFFFFFE) -#define SVR_MAJOR(svr) (((svr) >> 4) & 0xf) -#define SVR_MINOR(svr) (((svr) >> 0) & 0xf) - -#define SVR_LX2160A 0x873600 +#define PLAT_SOC_NAME "LX2160ARDB" =20 // PCLK #define DCFG_BASE 0x1E00000 diff --git a/Silicon/NXP/LX2160A/LX2160A.dsc.inc b/Silicon/NXP/LX2160A/LX21= 60A.dsc.inc index ea7e54fa89..15a06bea1f 100644 --- a/Silicon/NXP/LX2160A/LX2160A.dsc.inc +++ b/Silicon/NXP/LX2160A/LX2160A.dsc.inc @@ -2,7 +2,7 @@ # LX2160A Soc package. # # Copyright 2018-2020 NXP -# Copyright 2020 Puresoftware Ltd +# Copyright 2020-2021 Puresoftware Ltd # # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -70,6 +70,7 @@ Platform/NXP/ConfigurationManagerPkg/ConfigurationManagerDxe/Configurati= onManagerDxe.inf { *_*_*_PLATFORM_FLAGS =3D -I$(WORKSPACE)/Platform/NXP/LX2160aRdbPkg/I= nclude + *_*_*_PLATFORM_FLAGS =3D -I$(WORKSPACE)/Silicon/NXP/Chassis3V2/Inclu= de } !endif =20 --=20 2.25.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#76763): https://edk2.groups.io/g/devel/message/76763 Mute This Topic: https://groups.io/mt/83630881/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-