From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f177.google.com (mail-pg1-f177.google.com [209.85.215.177]) by mx.groups.io with SMTP id smtpd.web10.57959.1622555456104188503 for ; Tue, 01 Jun 2021 06:50:56 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@puresoftware.com header.s=google header.b=WtBT3Cnn; spf=pass (domain: puresoftware.com, ip: 209.85.215.177, mailfrom: vikas.singh@puresoftware.com) Received: by mail-pg1-f177.google.com with SMTP id 27so10760115pgy.3 for ; Tue, 01 Jun 2021 06:50:56 -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=J0ULY5a0H9qa1DFzUHTijWLzz6UbEH/KJRXYyTJWt6Q=; b=WtBT3CnnZfPFZLziAEmQn6JsAtmR90ndImNJB8Egp3v3UGmZnsoXjxyJOqSUlyiVyp 4gcV/om983wLEhtrahG8xrGvrfv4e0VHgPj4A6b0mAgE9cZj3hhALZ7PpssrYaaXvltO A9nA5VL6patA445m4mGtYmXr+FCZKc196rNdc= 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=J0ULY5a0H9qa1DFzUHTijWLzz6UbEH/KJRXYyTJWt6Q=; b=RMBpUN6Jh9LTjNHVzZW/6tZEksPnUZhLg+yanXQnNMUq7GA3dJ+oLI7ZNZESHs/vsp S5JKyBU3SdErC2gKusp/bQP/zR1dfXh53S9jlDsmyypymMj/BzLSpjCKq/vjW5KQR3pB IPTqJB5azJX2iC/pSYteIVAwl53wYqb570+l+pUkqKkJRI6RsLpsL22tqoeq9Yvu9DyK 0eeHswiof+lxsDkTlwdDmUcPpRRZPuWv3CmMkUXwIroq9ANR1kVGGDcU2C1uDhMkZNl6 Jd0Nyv4vBaFuv5mRc1MAWbULM8JbQ27kgI++rKZDQD/dJPOLDEX6CCzMAnuhs7p9ke7f qWjA== X-Gm-Message-State: AOAM532Llkv2GbaNINBXJgyO0f1AUCo9HmNyHkpP7p9q11kMEESnke+U P9CJOxCX3/dmp2yyLt5IkUyNXutqTqQAxwGT5fQ= X-Google-Smtp-Source: ABdhPJx9kWX1w+6SAhBfpA+sabx5wgPAe1IeqDf/+6WDuO1V1Q0cxLLXcFGiribKgFEE4pmvsYfNXA== X-Received: by 2002:a63:b30a:: with SMTP id i10mr28113630pgf.306.1622555455543; Tue, 01 Jun 2021 06:50:55 -0700 (PDT) Return-Path: Received: from embedded-PC.puresoft.int ([125.63.92.170]) by smtp.gmail.com with ESMTPSA id d22sm14504798pgb.15.2021.06.01.06.50.52 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 Jun 2021 06:50:55 -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 V0 2/4] Silicon/NXP: Add support of SVR handling for LS1046FRWY Date: Tue, 1 Jun 2021 19:20:32 +0530 Message-Id: <20210601135034.22386-3-vikas.singh@puresoftware.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210601135034.22386-1-vikas.singh@puresoftware.com> References: <20210601135034.22386-1-vikas.singh@puresoftware.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable This change set intend to add a generic method to get access to SoC's Silicon Version Register (SVR) and its handling for LS1046aFrwy platform. 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