Add SocGetSvr API to get the System Version Register(SVR) Signed-off-by: Wasim Khan <wasim.khan@nxp.com> Reviewed-by: Leif Lindholm <leif@nuviainc.com>
@@ -49,4 +49,11 @@ SocInit (
VOID
);
+/**
+ Function to get System Version Register(SVR) of SoC
+**/
+UINT32
+SocGetSvr (
+ VOID
+ );
#endif // SOC_LIB_H__
@@ -63,6 +63,20 @@ SocGetClock (
return ReturnValue;
}
+ Function to get SoC's System Version Register(SVR)
+ **/
+ )
+{
+ LS1043A_DEVICE_CONFIG *DeviceConfig;
+
+ DeviceConfig = (LS1043A_DEVICE_CONFIG *)LS1043A_DCFG_ADDRESS;
+ return DcfgRead32 ((UINTN)&DeviceConfig->Svr);
+}
/**
Function to initialize SoC specific constructs
**/