public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Wasim Khan <wasim.khan@oss.nxp.com>
To: devel@edk2.groups.io, meenakshi.aggarwal@nxp.com,
	V.Sethi@nxp.com, ard.biesheuvel@arm.com, leif@nuviainc.com
Cc: Wasim Khan <wasim.khan@nxp.com>
Subject: [PATCH edk2-platforms 4/8] Silicon/NXP: LS1043A: Add SocGetSvr API
Date: Wed, 10 Jun 2020 02:50:55 +0530	[thread overview]
Message-ID: <1591737659-8051-5-git-send-email-wasim.khan@oss.nxp.com> (raw)
In-Reply-To: <1591737659-8051-1-git-send-email-wasim.khan@oss.nxp.com>

From: Wasim Khan <wasim.khan@nxp.com>

Add SocGetSvr API to get the System Version Register(SVR)

Signed-off-by: Wasim Khan <wasim.khan@nxp.com>
---
 Silicon/NXP/Include/Library/SocLib.h        |  7 +++++++
 Silicon/NXP/LS1043A/Library/SocLib/SocLib.c | 14 ++++++++++++++
 2 files changed, 21 insertions(+)

diff --git a/Silicon/NXP/Include/Library/SocLib.h b/Silicon/NXP/Include/Library/SocLib.h
index 7b25107e4746..b770671c1331 100644
--- a/Silicon/NXP/Include/Library/SocLib.h
+++ b/Silicon/NXP/Include/Library/SocLib.h
@@ -49,4 +49,11 @@ SocInit (
   VOID
   );
 
+/**
+  Function to get System Version Register(SVR) of SoC
+**/
+UINT32
+SocGetSvr (
+  VOID
+  );
 #endif // SOC_LIB_H__
diff --git a/Silicon/NXP/LS1043A/Library/SocLib/SocLib.c b/Silicon/NXP/LS1043A/Library/SocLib/SocLib.c
index 39fb4c14e0b9..3ebbf7df4476 100644
--- a/Silicon/NXP/LS1043A/Library/SocLib/SocLib.c
+++ b/Silicon/NXP/LS1043A/Library/SocLib/SocLib.c
@@ -64,6 +64,20 @@ SocGetClock (
 }
 
 /**
+  Function to get SoC's System Version Register(SVR)
+ **/
+UINT32
+SocGetSvr (
+  VOID
+  )
+{
+  LS1043A_DEVICE_CONFIG  *DeviceConfig;
+
+  DeviceConfig = (LS1043A_DEVICE_CONFIG  *)LS1043A_DCFG_ADDRESS;
+  return DcfgRead32 ((UINTN)&DeviceConfig->Svr);
+}
+
+/**
   Function to initialize SoC specific constructs
  **/
 VOID
-- 
2.7.4


  parent reply	other threads:[~2020-06-09 21:21 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-09 21:20 [PATCH edk2-platforms 0/8] Silicon/NXP: Add SVR and DEVDISRn configuration Wasim Khan
2020-06-09 21:20 ` [PATCH edk2-platforms 1/8] Silicon/NXP: Chassis2: Add SVR and DEVDISRn device configuration Wasim Khan
2020-06-09 21:20 ` [PATCH edk2-platforms 2/8] Silicon/NXP: Chassis2: define SVR macros Wasim Khan
2020-06-17 14:54   ` Leif Lindholm
2020-06-18  9:59     ` Wasim Khan (OSS)
2020-06-18 15:28       ` Leif Lindholm
2020-06-09 21:20 ` [PATCH edk2-platforms 3/8] Silicon/NXP: LS1043A: Define SVR for LS1043A SoC Wasim Khan
2020-06-09 21:20 ` Wasim Khan [this message]
2020-06-09 21:20 ` [PATCH edk2-platforms 5/8] Silicon/NXP: Chassis3V2: Add SVR and DEVDISRn in device configuration Wasim Khan
2020-06-09 21:20 ` [PATCH edk2-platforms 6/8] Silicon/NXP: Chassis3V2: define SVR macros Wasim Khan
2020-06-09 21:20 ` [PATCH edk2-platforms 7/8] Silicon/NXP: LX2160A: Define SVR for LX2160A SoC Wasim Khan
2020-06-09 21:20 ` [PATCH edk2-platforms 8/8] Silicon/NXP: LX2160A: Add SocGetSvr API Wasim Khan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1591737659-8051-5-git-send-email-wasim.khan@oss.nxp.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox