From nobody Tue Nov 26 04:36:59 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+60325+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+60325+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one); dmarc=fail(p=none dis=none) header.from=nxp.com Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1590569589808140.0487403398048; Wed, 27 May 2020 01:53:09 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id q3rFYY1788612xZrTMPrQVd5; Wed, 27 May 2020 01:53:09 -0700 X-Received: from EUR03-DB5-obe.outbound.protection.outlook.com (EUR03-DB5-obe.outbound.protection.outlook.com [40.107.4.71]) by mx.groups.io with SMTP id smtpd.web11.2223.1590569588717610592 for ; Wed, 27 May 2020 01:53:09 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Z1vSUyYhxxgBwr4U0U+gzPYUJzEC3J9x2lRW4JqBst+asKk73C5rSCeabQqwVpwTdJkk4rUfwKgm+tv9gloPjG1e8zSC+aFjRvMKfpFCnhPwxOQoCVoOs7pY2B8HNKS2b8rFS0BsI6HQiBU8mJMDDeQvyT80B7zVL1M4x0aJRpNj4mkFuS5dQc8meghluOsjx7Xkm0P8N/fv28vYIVcDymg1Uzao6JBUeUyAKCzYiPWvHDYPieiMwZo+kOSkyhBQUKfpdKsDJw6ZkZh00XkpnI681AdmuuTtQn68Y1LXsJ0oF7ccU22kfEp+YcEL4rfzz7XCWJMa9QBHLWh0EHNUmQ== 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=aIxTSGRweqvIpVMQzejBCYh3YW+bI5ByCzRwknhDYoU=; b=hr/n7Idv3r27x6hBpxXfSSHbcDducuf55q8L0Fi0muWaKHPvv5NZHgZwZvrcmYHjDN1JAhbTTpSMyYxAL7JW3xdhrXCcFCyNxAvo4bjDBOnlcYKnLNlSNWwrbig+R+phC5QrIC/jR6foddCdFcCHb/qCM8ivwcwQ/p7QxtF4s5k+Ew/9nilhartRp1p9EwCWdpmxfKqZvz3f93/4AoK0kXXi6hItlIZCYHSqCiY1AeS4LI8ZeUZabS04e0D0INHLMz+1ZYFZo2HZDpG0y3Wgtih3iHsL2I7H6S/hMnzM/xGjAlsP9sR2Q6L6YGqvXKHdAdRaXoPW6U/wQ4gO8cZw5Q== 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 X-Received: from VI1PR04MB5933.eurprd04.prod.outlook.com (2603:10a6:803:ec::16) by VI1PR04MB3181.eurprd04.prod.outlook.com (2603:10a6:802:a::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.27; Wed, 27 May 2020 08:53:06 +0000 X-Received: from VI1PR04MB5933.eurprd04.prod.outlook.com ([fe80::45c4:8846:5327:9513]) by VI1PR04MB5933.eurprd04.prod.outlook.com ([fe80::45c4:8846:5327:9513%7]) with mapi id 15.20.3021.030; Wed, 27 May 2020 08:53:06 +0000 From: "Pankaj Bansal" To: Leif Lindholm , Meenakshi Aggarwal , Michael D Kinney , devel@edk2.groups.io, Varun Sethi , Samer El-Haj-Mahmoud , Jon Nettleton , Ard Biesheuvel Subject: [edk2-devel] [PATCH edk2-platforms v2 5/9] Silicon/NXP: Implement PL011UartClockLib for NXP platforms Date: Wed, 27 May 2020 14:21:31 +0530 Message-ID: <20200527085135.16717-6-pankaj.bansal@oss.nxp.com> In-Reply-To: <20200527085135.16717-1-pankaj.bansal@oss.nxp.com> References: <20200527085135.16717-1-pankaj.bansal@oss.nxp.com> X-ClientProxiedBy: SG2PR01CA0164.apcprd01.prod.exchangelabs.com (2603:1096:4:28::20) To VI1PR04MB5933.eurprd04.prod.outlook.com (2603:10a6:803:ec::16) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-Received: from uefi-workstation.ap.freescale.net (92.120.0.69) by SG2PR01CA0164.apcprd01.prod.exchangelabs.com (2603:1096:4:28::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.17 via Frontend Transport; Wed, 27 May 2020 08:53:03 +0000 X-Originating-IP: [92.120.0.69] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 64719994-dc1a-4334-5672-08d8021b5f56 X-MS-TrafficTypeDiagnostic: VI1PR04MB3181: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3631; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info: xsF0QY8wxseexapfNKN0/jFECjqk2QfrB93BRI14Y4QS9/CKWxqoFU+qTVfZul46FYnvE9fcBjiGz/kotjiw1voqvQe5h4mub6sr1mlv0/KoGcYwsm1WEJt6yqizz5QJVSwwpQMAQEPgmqAseTwYxBSWwjt9E5Re1bMzljlfxX8CtuK2IoTGe4sWhD1rUoe/R3MkTWC76x0jMr17H+qJDzg17cFkRkZVFimgKMFzMmCdXdPxLH9fuOmQ/y96z06iG7ed0TFoOVDPdEkVSj2LaUwEsfUf9YjQhNx/ERicMdH/XVd7QgXsAbbU3QU3B95J1JSo61FDAVlpD4NJsFDIwg== X-MS-Exchange-AntiSpam-MessageData: M1ATzaXN58UshBqx+tINaYOjn7EgSt/i8NurB5X7+t/acLD3Aad9BnztkFscrGKLCGzy9pipEKTb6/BDcZDCpjID3/srWv0BJ4dr66kXkB/QHG8mt7zJN41kfLIyiHt4i/SM0Y5xgFzqfMkt8F3La4CVvBSssqK01fV5ajp5ahOLH9kXDcnUWxWt1UKlRVZT6N586exChkhsIvE1wLbrklQX7mVWxKitH3ADhDsOHVlollekWl0aQZQSn4YIe1FFGOkHa5vUrAM0CnCw1JicBm5tQ4hBazEClNzG13v4ZK+Yc1F5MDN5JJruW1z45Aq98pyzXNQYr9hwoiuE62ziROWAtB5wOb2/IaNUT9lVW5FPOR5UaS8OYor7jQeLtfJg6SbfzPptTwY6uz+joEuTD9qxu9OrM4C9hu59dDyar+kmVhwn6hDTaHDuVFPVIIVhM/hx557hwp130SgsrkxGyvleRYlq8lys7x9CeWtA7v4= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 64719994-dc1a-4334-5672-08d8021b5f56 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 May 2020 08:53:06.2110 (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: YFE/XLwEOQZnXLAkzuPmrwcaFpIMX26R87S+8FkOBgznK0Na+oKXsn7zaxUyqCz8nYw8Nzs2ze3YAOh8EeAQnw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB3181 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,pankaj.bansal@nxp.com X-Gm-Message-State: 6hweWZNKHgWxcuvpI7kdyfK1x1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1590569589; bh=eEmGYUGRDPSyCciFogjEH1e3vd87aLNBwPeHeS6lJ9I=; h=Content-Type:Date:From:Reply-To:Subject:To; b=huQdMdy3FtxO0gaGRAAhmEKGtNhWolZhgBVszeN9c7gRzg4RXvvsMsrzFS/Ejvcmukm 4KNHU+xVvnbPxQbrA8Vlu3Kf+zPxMxcCnseL2jSr4jkARr7pFx2EV7BPV+CCjgLL1GSpk +FCJmNu2wedsp1wE9SuqRertsrtT7qNACNo= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" From: Pankaj Bansal In NXP SOCs the UART clock is derived from System clock after PLL multiplication. Therefore, add the PL011UartClockLib implementation for NXP platforms. Signed-off-by: Pankaj Bansal --- Notes: V2: - No change Silicon/NXP/Library/PL011UartClockLib/PL011UartClockLib.inf | 24 +++++++++= +++++++++++ Silicon/NXP/Library/PL011UartClockLib/PL011UartClockLib.c | 22 +++++++++= +++++++++ 2 files changed, 46 insertions(+) diff --git a/Silicon/NXP/Library/PL011UartClockLib/PL011UartClockLib.inf b/= Silicon/NXP/Library/PL011UartClockLib/PL011UartClockLib.inf new file mode 100644 index 000000000000..b771dba7697f --- /dev/null +++ b/Silicon/NXP/Library/PL011UartClockLib/PL011UartClockLib.inf @@ -0,0 +1,24 @@ +#/* @file +# Copyright 2018, 2020 NXP +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +#*/ + +[Defines] + INF_VERSION =3D 0x0001001A + BASE_NAME =3D PL011UartClockLib + FILE_GUID =3D af8fef24-afbb-472a-b8b7-13101a79703c + MODULE_TYPE =3D BASE + VERSION_STRING =3D 1.0 + LIBRARY_CLASS =3D PL011UartClockLib + +[Packages] + MdePkg/MdePkg.dec + Silicon/NXP/NxpQoriqLs.dec + +[Sources.common] + PL011UartClockLib.c + +[LibraryClasses] + ArmPlatformLib diff --git a/Silicon/NXP/Library/PL011UartClockLib/PL011UartClockLib.c b/Si= licon/NXP/Library/PL011UartClockLib/PL011UartClockLib.c new file mode 100644 index 000000000000..3814685585eb --- /dev/null +++ b/Silicon/NXP/Library/PL011UartClockLib/PL011UartClockLib.c @@ -0,0 +1,22 @@ +/** @file +* +* Copyright 2018, 2020 NXP +* +* SPDX-License-Identifier: BSD-2-Clause-Patent +* +**/ + +#include +#include + +/** + Return clock in for PL011 Uart IP +**/ +UINT32 +EFIAPI +PL011UartClockGetFreq ( + VOID + ) +{ + return gPlatformGetClockPpi.PlatformGetClock (NXP_UART_CLOCK, 0); +} --=20 2.17.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#60325): https://edk2.groups.io/g/devel/message/60325 Mute This Topic: https://groups.io/mt/74496020/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-