From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (EUR05-AM6-obe.outbound.protection.outlook.com [40.107.22.85]) by mx.groups.io with SMTP id smtpd.web10.13801.1584628604369301404 for ; Thu, 19 Mar 2020 07:36:44 -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=S0ZKQ8bq; spf=pass (domain: oss.nxp.com, ip: 40.107.22.85, mailfrom: pankaj.bansal@oss.nxp.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SHdF4Oxnxog5AfcmkRZz6Oeq7OeunvwQSG/eXzFxGez3TLl0wvQTTHC9YIzx7TQOte8qZcGAxMtKI9pgp41lXrLFZGzEcUc7jBjQoCJKCIw+CxKhdm/p6uimPuIMwsEAPX7XXtV8Pi4k7KthHeQITjdmXpzt13JSXuVBAV1Wpj/xSllo+0gsg1u40I1zQb7XfUa/YQGcRjtGolMHfaljQB2DFYkCAFPoSpTYO4SIl7j8GJSkWA/kjebfbjWvCIMi1yOYP1jyCK7KGheZjMBRZZdiC9270qjHNBlkcDFw0O7FBwTm6iGlOzYCJeZQmawRg/8ncDVu8kld8LfeTDbGfg== 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=f0X3hPt1JUtcj3WfUcu1AiCwuU6jmS/o96fvzP4kPFg=; b=H4P61J1HpzG6OnSdVBv4V+pD0r1Z7D4a2U9amnVZHJspKA7MKad4WOe02vRX8btFy4yKHpTTFFdNvDndcPRCEs1/APAbt/UEym6UTHahVN8eNsVNT7RCGxBdPH7ajd1cOmwMZ93Krpjzpe6/7GZEHe8l+ioCckloLhBPFpPvw5ZzJNuOAyL1cBKrUKAQh62NyGdgB7NVT050JVAu/DUGuIx3FlRfBSU6EJxP3C3619xAgwtiwLTAY6J8Xjiyaq7177mezbpOI/mmMTva30Vsb64AbFqWQRb8yASIlVXziEj3duc5vwDxrP4bYD37GowGWatYEufR+3SVkucSPYyc1g== 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=f0X3hPt1JUtcj3WfUcu1AiCwuU6jmS/o96fvzP4kPFg=; b=S0ZKQ8bqKDJvaax4/M11YBjthfZxm9RnOC49fqKFnW9JQm2KR1BjsZTiR1p7TDSyoc5TK/erpONIzdY+e866vrt1YB9Iwdyj4J9fxGOWnsq67cwaJ+/ZLsDAd/fWdiO5U3iPZhlxz6rBTgD+xqAa859+LrxdASoGbl2+EAaVqqg= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=pankaj.bansal@oss.nxp.com; Received: from VI1PR0401MB2496.eurprd04.prod.outlook.com (10.168.65.10) by VI1PR0401MB2254.eurprd04.prod.outlook.com (10.169.133.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2814.14; Thu, 19 Mar 2020 14:36:42 +0000 Received: from VI1PR0401MB2496.eurprd04.prod.outlook.com ([fe80::196a:28a9:bb9:2fae]) by VI1PR0401MB2496.eurprd04.prod.outlook.com ([fe80::196a:28a9:bb9:2fae%9]) with mapi id 15.20.2835.017; Thu, 19 Mar 2020 14:36:42 +0000 From: Pankaj Bansal To: Leif Lindholm , Meenakshi Aggarwal , Michael D Kinney , devel@edk2.groups.io, Varun Sethi , Samer El-Haj-Mahmoud , Jon Nettleton Subject: [PATCH v2 07/28] Silicon/NXP: Implement SerialUartClockLib Date: Fri, 20 Mar 2020 20:05:22 +0530 Message-ID: <20200320143543.18615-8-pankaj.bansal@oss.nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200320143543.18615-1-pankaj.bansal@oss.nxp.com> References: <20200320143543.18615-1-pankaj.bansal@oss.nxp.com> X-ClientProxiedBy: SG2PR02CA0042.apcprd02.prod.outlook.com (2603:1096:3:18::30) To VI1PR0401MB2496.eurprd04.prod.outlook.com (2603:10a6:800:56::10) Return-Path: pankaj.bansal@oss.nxp.com MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from uefi-workstation.ap.freescale.net (92.120.0.69) by SG2PR02CA0042.apcprd02.prod.outlook.com (2603:1096:3:18::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2835.19 via Frontend Transport; Thu, 19 Mar 2020 14:36:39 +0000 X-Mailer: git-send-email 2.17.1 X-Originating-IP: [92.120.0.69] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: e754b998-3711-46d6-2c67-08d7cc12f0c0 X-MS-TrafficTypeDiagnostic: VI1PR0401MB2254:|VI1PR0401MB2254: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1079; X-Forefront-PRVS: 0347410860 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4636009)(376002)(136003)(346002)(396003)(39860400002)(366004)(199004)(86362001)(316002)(110136005)(1076003)(956004)(66476007)(66556008)(2616005)(8936002)(44832011)(26005)(6506007)(81166006)(5660300002)(81156014)(66946007)(2906002)(186003)(6666004)(6486002)(8676002)(478600001)(52116002)(6512007)(16526019);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR0401MB2254;H:VI1PR0401MB2496.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:0; Received-SPF: None (protection.outlook.com: oss.nxp.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WqPP9eMyisHVnk9Ux9Hv+fZIsuV4fL6D1Gy9pnz7B80zOKb0v5mmfIbF3I2So0QbY1yLB/ocKGXx20GD15i0zEwuOGyMIfA28dHukVDJbYI7zh7mzgX02dt2Xh02QKySh2vspdarDzOwB27f77JvA6uEZiIWf7+4HbrKpgqY57JuTalE/x73GVPzGh+4WZu7Hxd9otF4nQm7eASe6gjrEbnUmeN9DioIjwTa8SuAsdF5dS9YnUupGg7bTt6oV5XVd5xIcQrBqR0ySMv1zL4RSvpcHRtDvUPknNhpLrgdENucP1dBN/tTENyywCq+k0pKOdJcwLgYNO8RWJMTKUFI7vEH1V0xURNFtHI+LjXLdmldibo8umqCpYoMtwsE/jkDsB8Ys8j4ocA/Cr67fMI37OoTvQTXCEMgKhb27Y54xcTRoP/OlAYg9hLqCrC+MZYV X-MS-Exchange-AntiSpam-MessageData: xwEWgHNUhAw1Y9RNf0c4zr0/u9SJAhnPVQspGUq2umos7QY6M4JAgTVXPQDO4hafXO9HAZI399+XY1u+bsM3w7gTI4tEErz+4bFxLmYNaafFRf4l+W0sgWxU96bkQYCS2t3wJavbJsSG0/Ur1DtwIA== X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: e754b998-3711-46d6-2c67-08d7cc12f0c0 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Mar 2020 14:36:42.0706 (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: K1V+AMBm8PFPQMHEH41QNzSrmFVURUfGh0u62hgaV6XD6HutvikLgsa/B6D3eM+jQXMsWFsXXdDLjiltyuio1g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0401MB2254 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain From: Pankaj Bansal Implement SerialUartClockLib for all NXP Layerscape Platforms. Signed-off-by: Pankaj Bansal --- .../SerialUartClockLib/SerialUartClockLib.c | 27 +++++++++++++++++++ .../SerialUartClockLib/SerialUartClockLib.inf | 26 ++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 Silicon/NXP/Library/SerialUartClockLib/SerialUartClockL= ib.c create mode 100644 Silicon/NXP/Library/SerialUartClockLib/SerialUartClockL= ib.inf diff --git a/Silicon/NXP/Library/SerialUartClockLib/SerialUartClockLib.c b/= Silicon/NXP/Library/SerialUartClockLib/SerialUartClockLib.c new file mode 100644 index 000000000000..9d49d7b4748b --- /dev/null +++ b/Silicon/NXP/Library/SerialUartClockLib/SerialUartClockLib.c @@ -0,0 +1,27 @@ +/** @file +* +* Copyright 2020 NXP +* +* SPDX-License-Identifier: BSD-2-Clause-Patent +* +**/ + +#include + +extern +UINT64 +GetBusFrequency ( + VOID + ); + +/** + Return clock in for Uart IP +**/ +UINT32 +EFIAPI +BaseSerialPortGetClock ( + VOID + ) +{ + return GetBusFrequency (); +} diff --git a/Silicon/NXP/Library/SerialUartClockLib/SerialUartClockLib.inf = b/Silicon/NXP/Library/SerialUartClockLib/SerialUartClockLib.inf new file mode 100644 index 000000000000..9a3e80cf521d --- /dev/null +++ b/Silicon/NXP/Library/SerialUartClockLib/SerialUartClockLib.inf @@ -0,0 +1,26 @@ +# @file +# Copyright 2020 NXP +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +# + +[Defines] + INF_VERSION =3D 1.27 + BASE_NAME =3D SerialUartClockLib + FILE_GUID =3D fa65495e-d3c8-4ea3-9737-994e9ccbaf11 + MODULE_TYPE =3D BASE + VERSION_STRING =3D 1.0 + LIBRARY_CLASS =3D SerialUartClockLib + +[Packages] + MdeModulePkg/MdeModulePkg.dec + MdePkg/MdePkg.dec + Silicon/NXP/NxpQoriqLs.dec + +[Sources.common] + SerialUartClockLib.c + +[LibraryClasses] + SocLib + --=20 2.17.1