From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR04-VI1-obe.outbound.protection.outlook.com (EUR04-VI1-obe.outbound.protection.outlook.com [40.107.8.70]) by mx.groups.io with SMTP id smtpd.web11.805.1591737698405107946 for ; Tue, 09 Jun 2020 14:21:38 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@nxp1.onmicrosoft.com header.s=selector2-nxp1-onmicrosoft-com header.b=URyzrq1c; spf=pass (domain: oss.nxp.com, ip: 40.107.8.70, mailfrom: wasim.khan@oss.nxp.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Jci6aaANptvRWUv24R+dwPkdLS052pXF+HtobJOvWt8mcMBx6sXTuoi7NsgLVV6dn9tW0466xKXYEwBlP+HaZxEeOaFN6OBLYYp0uS0h9h4klaNtd6xB3tfCVnKVDHShvxA1VNdRU18mM+oeil4B5PpZIoy7MJfK/aub04cpW3ZdlndFAbVVV7EUSH1wAzIB/jE9uLlNll/Fk9wRVRoOVGW08j4cLbOrztJ/KaIw9HPx+E1cKcl6I3YoM4LeWrR8b7crgbJgajSjH456ewKOXkQVpCFiSkBUCD2SKmFHrdQQ2oMLBUDZTzBqQxKv6ZClKCKMK0pRxNOSEXUwC+9DHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YbBNWf4WZE0npGsSC0fvtIVO1H/fQtseoRvQjcPFCbI=; b=Vln+hluDSFwto8VAMmm5MFZmxDQemuwY3NWREEb4b7l8cGefJ9mHoKqFzzWNY0oJCi5C/YWfkBTu+ZQRL4KJsz763MiEBdpd+15T1f+UFJ1QchHSfNdIqSw82wBvbQOdFhCEvB6LtUzm+/9tyvrLDh8R1/eTZgKybzGAsEHw0dSwJRvrvTnbkB3WnzexoREIJZf9tk1H3BcjqwTvmKmzTzOy7Gu6xw23UMlmO7YbJyoR6YE925N8K2VSgOTJ5JQUgWdONRTIMWOGidFqMbe6JaGVJTS1DQaB9i6QfhUNoRZu4EWcbLciaF/xreAdj43jisjVrIUTDiKyQfQkdKCyDA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YbBNWf4WZE0npGsSC0fvtIVO1H/fQtseoRvQjcPFCbI=; b=URyzrq1cKiTvb/hAjNa91WrrIaORHqHMgSQ6juKYzEG9k77PvciPeifp/fT49JVwyICmNPTI/M0HRtLPjsbEFTXz+Yt8ro1UbS8KJkxAETQmb5uu/CUtMw9pTSe3cZNlJ4FA9+9kpiO5lZ2Qu294X9IAM+w7aJCshT+114azjU8= Authentication-Results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=oss.nxp.com; Received: from VE1PR04MB6702.eurprd04.prod.outlook.com (2603:10a6:803:123::13) by VE1PR04MB6720.eurprd04.prod.outlook.com (2603:10a6:803:123::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3066.18; Tue, 9 Jun 2020 21:21:36 +0000 Received: from VE1PR04MB6702.eurprd04.prod.outlook.com ([fe80::81c4:97a6:7592:f225]) by VE1PR04MB6702.eurprd04.prod.outlook.com ([fe80::81c4:97a6:7592:f225%7]) with mapi id 15.20.3088.018; Tue, 9 Jun 2020 21:21:36 +0000 From: Wasim Khan To: devel@edk2.groups.io, meenakshi.aggarwal@nxp.com, V.Sethi@nxp.com, ard.biesheuvel@arm.com, leif@nuviainc.com CC: Wasim Khan Subject: [PATCH edk2-platforms 8/8] Silicon/NXP: LX2160A: Add SocGetSvr API Date: Wed, 10 Jun 2020 02:50:59 +0530 Message-ID: <1591737659-8051-9-git-send-email-wasim.khan@oss.nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1591737659-8051-1-git-send-email-wasim.khan@oss.nxp.com> References: <1591737659-8051-1-git-send-email-wasim.khan@oss.nxp.com> X-ClientProxiedBy: BMXPR01CA0039.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:c::25) To VE1PR04MB6702.eurprd04.prod.outlook.com (2603:10a6:803:123::13) Return-Path: wasim.khan@oss.nxp.com MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from wasimk-VirtualBox.nxp.com (157.37.179.16) by BMXPR01CA0039.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:c::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3088.18 via Frontend Transport; Tue, 9 Jun 2020 21:21:34 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [157.37.179.16] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: f17708ef-a797-4176-1457-08d80cbb1729 X-MS-TrafficTypeDiagnostic: VE1PR04MB6720: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:989; X-Forefront-PRVS: 042957ACD7 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: m8kRgMITsCHXBT1NJ1JlRCYrwXc4qVOen3OdOZP3g9N7rMKn3K/Xk/54rQjgo2QNFLJcJ+WC6yrXnctXqEUr2u2ddrwqGeVd91at81GYS24k12GO7tOtJnPzltSuHzLX/BUTWwWpdJET6Mvzvy5xETjLaHwJ3cfpMBT6vsnef/Nqrs5bNonK/afVw4ErhHPDZmgHiEfZJq0mNQCwmdY2N6rvKtA3zP4Uq88Z5BS2UON31gkeLoNPnXU5qrd1nW4KiwkRkJARm4y+Z7ptcveZoI3R4IdRoYBXyrwdNv/OdoyKP3cbcJQS9AK2/OVp6N6WfRd71GrOYJcijDrNpJrdcw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VE1PR04MB6702.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(366004)(136003)(39850400004)(396003)(376002)(346002)(6512007)(44832011)(66946007)(5660300002)(66556008)(26005)(6486002)(4744005)(86362001)(83380400001)(186003)(6666004)(66476007)(19627235002)(2906002)(4326008)(16526019)(6506007)(8676002)(8936002)(956004)(316002)(478600001)(2616005)(52116002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: CA3UwWPI9z/isXDkzne4xGMhbnqt8pb3CsUncmmKGI+iCe1ImW+rAHwUYMr1SQdB3rEp+/Mmsbsjgsfs3k1rKnLySgxMbSNDt+mlpzMpJZvizeGl9haZTsocvIDq0V+ol44DP6rY1ta6ZALFLCdZbj15LwBfEc2+uR2sgf/G3QORmX1MfKmvlbGLuK+YetXWBvf1Fz1wfX03aA17zklFyZEHWJnLmfzqYU+EiMibYfSYFRevRFuXj6p/kRwHHzgWd4CrDnWgtfByy2U4AJ+8t3l5Ai0C9wmf7SoRYvFRagozM5dyyOuJbJBw65em+XzgtlctoUDFC2Vx2/4S4n7XyzTnfDNf4hCI9lMw9dPi98jUarxlWT9Wqspr9zenrzjMAgOskBHBF2WE8L7h4MlLofWGCBbioU9Hsp73IoBrJR5Z1a9XINwIYHnDwu08U8wqmT53na6xvdrMFMlpR8RVPNSmpwajuSvw25J1nREebXLj1dzmtm2Vh7rRh0myGWPc X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f17708ef-a797-4176-1457-08d80cbb1729 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jun 2020 21:21:36.3109 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: w7GAyazDz5pIzcnb+ptBiBWBbwHH95pusLXeCe/rUJpWveqtLkjt9UMBWu0zT03oiBRQ6kuhWONaHJq5i41uFw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6720 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain From: Wasim Khan Add SocGetSvr API to get the System Version Register(SVR) Signed-off-by: Wasim Khan --- Silicon/NXP/LX2160A/Library/SocLib/SocLib.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Silicon/NXP/LX2160A/Library/SocLib/SocLib.c b/Silicon/NXP/LX21= 60A/Library/SocLib/SocLib.c index 6f774eb7dc6c..3939afb2fb0c 100644 --- a/Silicon/NXP/LX2160A/Library/SocLib/SocLib.c +++ b/Silicon/NXP/LX2160A/Library/SocLib/SocLib.c @@ -67,6 +67,20 @@ SocGetClock ( } =20 /** + Function to get SoC's System Version Register(SVR) + **/ +UINT32 +SocGetSvr ( + VOID + ) +{ + LX2160A_DEVICE_CONFIG *DeviceConfig; + + DeviceConfig =3D (LX2160A_DEVICE_CONFIG *)LX2160A_DCFG_ADDRESS; + return DcfgRead32 ((UINTN)&DeviceConfig->Svr); +} + +/** Function to initialize SoC specific constructs **/ VOID --=20 2.7.4