From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f171.google.com (mail-pg1-f171.google.com [209.85.215.171]) by mx.groups.io with SMTP id smtpd.web08.9406.1624030092451897293 for ; Fri, 18 Jun 2021 08:28:12 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@puresoftware.com header.s=google header.b=Q3qjRTMc; spf=pass (domain: puresoftware.com, ip: 209.85.215.171, mailfrom: vikas.singh@puresoftware.com) Received: by mail-pg1-f171.google.com with SMTP id m2so8078398pgk.7 for ; Fri, 18 Jun 2021 08:28:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=puresoftware.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=aCnZdA4Am7JMlsekaA2dDzTIU58iAcmmJtkW1vmBn8A=; b=Q3qjRTMcttTXpGmbCuEdZjHrrM3T+NQ1KK2O9Wd1GBG8d3TglHuvnhn1G/0AlC9RBj BVAJq+t3qcDZ1/n59IP3xgjqqnZRduXKPuwj0MFEgdmtTU8u0s0qATHsAsIrDSdRkdqB 5jALEKeH8SsXVuI6eQYrIQ/F9VOLF2IPyog2w= 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=aCnZdA4Am7JMlsekaA2dDzTIU58iAcmmJtkW1vmBn8A=; b=i2JrdvtNgppoTI88o7PSbKg9X3l3mDmUfrPR32lXbouGQ8rv5pX2N3FYIO6Ah8MJLE t+QSjJkios+C/pU1mBbsVSRBB8OGFGOxeAqMCWjH4O5xQ7xP3LeSpRw48x8IS4WUBNgY jxGEMur2aymTDdWNC/okmObUBcDgNbj+wBqAMyVgdfRvY9ydsRFTSC6f9uKXIr9wHDKS ewX1WB2MScfddFtUzOOuStiPoShp5+qJi1dLIL+q0srHDOtnW4wrXn9MdrsLGxl3mb+d 5hUfzPusOmEjZz7w3w+Zg95tpPegjlOohZht6wyJOQV7ekcWAvjxJOIumfRtrtwnV0Ob 3L/A== X-Gm-Message-State: AOAM533qIfhktpdSFRUoQjGzzCWq3Hz5enF4Nqezs6kifyvnku3suPx9 XFKxdTR7qjduVaEPS6tGVqScIoypzvKEzK9RopQ= X-Google-Smtp-Source: ABdhPJyWlAsVfvPvchXRM27s2RZcHepjbd/7VVPCmn0FjVKxCpCZbHlHPPb/+VZ5q9QNuzMy7PUUFw== X-Received: by 2002:a05:6a00:7ca:b029:2fc:daf6:d0f0 with SMTP id n10-20020a056a0007cab02902fcdaf6d0f0mr5628592pfu.15.1624030091819; Fri, 18 Jun 2021 08:28:11 -0700 (PDT) Return-Path: Received: from embedded-PC.puresoft.int ([125.63.92.170]) by smtp.gmail.com with ESMTPSA id v15sm8326360pfm.216.2021.06.18.08.28.08 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Jun 2021 08:28:11 -0700 (PDT) From: "Vikas Singh" 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: [PATCH V2 2/4] Silicon/NXP: Add support of SVR handling for LS1046A SoC Date: Fri, 18 Jun 2021 20:57:38 +0530 Message-Id: <20210618152740.14819-3-vikas.singh@puresoftware.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210618152740.14819-1-vikas.singh@puresoftware.com> References: <20210618152740.14819-1-vikas.singh@puresoftware.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable This patch adds a generic method to get Silicon Version Register (SVR) on LS1046A SoC. This method will be generic for all platfroms based on LS1046A SoC, like - LS1046AFRWY, LS1046ARDB. Signed-off-by: Vikas Singh --- Silicon/NXP/LS1046A/Library/SocLib/SocLib.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Silicon/NXP/LS1046A/Library/SocLib/SocLib.c b/Silicon/NXP/LS10= 46A/Library/SocLib/SocLib.c index 8fa6a7dd00..003f5bd82f 100644 --- a/Silicon/NXP/LS1046A/Library/SocLib/SocLib.c +++ b/Silicon/NXP/LS1046A/Library/SocLib/SocLib.c @@ -2,6 +2,7 @@ SoC specific Library containg functions to initialize various SoC compon= ents=0D =0D Copyright 2017-2020 NXP=0D + Copyright 2021 Puresoftware Ltd=0D =0D SPDX-License-Identifier: BSD-2-Clause-Patent=0D =0D @@ -64,6 +65,21 @@ SocGetClock ( return ReturnValue;=0D }=0D =0D +/**=0D + Function to get SoC's System Version Register(SVR)=0D + **/=0D +UINT32=0D +SocGetSvr (=0D + VOID=0D + )=0D +{=0D + LS1046A_DEVICE_CONFIG *Dcfg;=0D +=0D + Dcfg =3D (LS1046A_DEVICE_CONFIG *)LS1046A_DCFG_ADDRESS;=0D +=0D + return DcfgRead32 ((UINTN)&Dcfg->Svr);=0D +}=0D +=0D /**=0D Function to select pins depending upon pcd using supplemental=0D configuration unit(SCFG) extended RCW controlled pinmux control=0D --=20 2.25.1