From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR01-VE1-obe.outbound.protection.outlook.com (EUR01-VE1-obe.outbound.protection.outlook.com [40.107.14.71]) by mx.groups.io with SMTP id smtpd.web11.801.1591737689962251368 for ; Tue, 09 Jun 2020 14:21:30 -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=hq0zuPUz; spf=pass (domain: oss.nxp.com, ip: 40.107.14.71, mailfrom: wasim.khan@oss.nxp.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=A5hrLm0CgXSxWijv1R/423OFoJ/Lq+nSszw6knh2ISkXsaB7mmmplnp85IYiEyNCKqENP20e8qFTsMMSA1n0dRxipOqEk3ZaYVrxaiBgrgJTn4qJYMeRpc9E9lmMQ73p+NIC5Hb7ztpllP3L3dLaUgM4TIYUCVvFnKlg6xkbC0i9wvjr2KHESdSjULgXoifsCY66eXTfwrm+9njdJOUBTZKyLX9cSpCVnQSOxU5rnMkvYMKBXHkY1tFtTesETDkYUk/c9kn2nSzye8bvPXaqYS0rcOsQ/ZXZHQAinMKUa/DffrCpklJo0JVnKOwbklMXSXmVjMEtGDwHWIFm8FpQ0w== 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=WpIuAjf29MXTbDFEus3fx0i6FeMOqiABJr1nHOuDI40=; b=lQp+CMNkHMl95buhQFLeNgEjABno9pjcaWJNAmP4FmkT5Y+2J9A0d+6F/cuiYkU3in4FfGNQT2NyHoxl/zYaJsVBcZjqP2r1HNWWtF1jsTolknF/0kAuvk/5O/Z4wB9TxtaCOMxKabJFc/5JLmUVk9XGuD+mRdp3SJdzjDlNqbVIuqt8uSH5Xnv9LngrjZKewcYi2x+rfSsOqEmdgjAPH4uCAsiUrBx/uERR15Gth75zuNoCdrYXBfo6sCVKovH64X5hnzbTOXIJ9JzVRzCZ+Py0rwn9FxfKKHSsNY6cOwq6f53/LIkxvdC/+sZi4t3WqBMHqrBIqG8MmW042Dpn5g== 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=WpIuAjf29MXTbDFEus3fx0i6FeMOqiABJr1nHOuDI40=; b=hq0zuPUz9zRYSN6xGSPd9SBm3fetHfMd6aQKqp6XlzHrneZwvPiS67qb62728GvPg1hnhsklgxj+mybeEVCncoVJ2VRQgHPbL34kJliTw7faHregBfha8vHx0i+fvjna0cPbfmAooak0EUweN3x48RWRNMkxWjB/ugjbCPYx++s= 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 VE1PR04MB6350.eurprd04.prod.outlook.com (2603:10a6:803:122::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3066.19; Tue, 9 Jun 2020 21:21:27 +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:26 +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 4/8] Silicon/NXP: LS1043A: Add SocGetSvr API Date: Wed, 10 Jun 2020 02:50:55 +0530 Message-ID: <1591737659-8051-5-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:24 +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: b513f099-5c48-4bdc-0ce7-08d80cbb115a X-MS-TrafficTypeDiagnostic: VE1PR04MB6350: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1107; X-Forefront-PRVS: 042957ACD7 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: sxxOFFv//QsJcKhGQQ1AzGEJsLgG2qi8Y0IrJ//ySABQ3/WQ8jxbYUFQqDt3A7Y13C1rt4bfZrffwnLDzBdMDJy5LRxW4QHGCQRhro/x5IO1PhG9cn06bSmakmov2h+iIEYvpOF/AI0TvAmhtgE/3QyEY7UbOcgoXm9190e7eyX7DCBAtV4o2Vpk9dCzSRNgZiMsfsLZf4Mg6XjtMRtpUbygdSa7gW8OBz7DcgQedEmDuuYGXoOGwmlUSLjymiWHCH6ZFw3FnCd3zd1t+Uk2QUgcOBukEPuTlY/rxx3j/jDtUM2OdQ4HZ0q7B2XQa0Rqu7b6szRxzgOMlBxKvKLnIw== 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)(376002)(136003)(39850400004)(346002)(396003)(2906002)(4326008)(6666004)(66946007)(16526019)(66476007)(19627235002)(8676002)(6506007)(186003)(5660300002)(66556008)(8936002)(26005)(52116002)(956004)(6512007)(6486002)(316002)(478600001)(44832011)(83380400001)(2616005)(86362001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: r43adaUO7Yx9w7UehD7Nj1uJAZ5hRBdDUIazyKN8PZcybZkG2r8o6Xl1fSu7TsBx7ax/Ii413dkvvHwJwMpXcDKbpeMnpGOJ4+tdH3BtPrOYdcH4MaHPc/EpWx3gEiZxZXQnS5xHijI29dyjloRrHcrZJnl4VxGC9XAlM0aW0i3jVmAM6SJ4er1algKH7P7HV5dZgNE6rP7hc7D1Aasv8VhM5dqadkHNyH+OkXTkL6YGaRK89XvHz+Cj8QBt+dz/xxxwwSUEwN5lQQ6Rk6z+GDNx2Hp6cH25nmPu1M+muWQKvYVTcUqCbBAJm1Sfj/KMPLaEzF8TZQV4VT7InchIy3qzPZQW30a09nM7uzBwN2WNK4L5KJAO9jMpnOOt7/d2NkNgILWlFxIQn4iV2c7yvqYkCadsE/MhRGqlbQ4toe5Fmr6d0UvcApFW5bbEVvh14YHXjpJhvAYN50Et4WxVf4Nh4Q8KCHg1jFxBk+lWrKLNkGPItgbI3R/wrm0yaALa X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: b513f099-5c48-4bdc-0ce7-08d80cbb115a X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jun 2020 21:21:26.5715 (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: 0dXzadzVjrvxR0gHpwNq0tYnK1tzM7d4Eo0YtcW6asGnEXLdXWLD9Ar6vQAfgJ7aM3OakPGGDHi/OhlkIdl0Ew== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6350 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/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/Lib= rary/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 ); =20 +/** + 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/LS10= 43A/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 ( } =20 /** + Function to get SoC's System Version Register(SVR) + **/ +UINT32 +SocGetSvr ( + VOID + ) +{ + LS1043A_DEVICE_CONFIG *DeviceConfig; + + DeviceConfig =3D (LS1043A_DEVICE_CONFIG *)LS1043A_DCFG_ADDRESS; + return DcfgRead32 ((UINTN)&DeviceConfig->Svr); +} + +/** Function to initialize SoC specific constructs **/ VOID --=20 2.7.4