From nobody Tue Nov 26 04:28:07 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+60326+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+60326+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 1590569592688186.83382496974878; Wed, 27 May 2020 01:53:12 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 2egpYY1788612xpWzuFigcSZ; Wed, 27 May 2020 01:53:12 -0700 X-Received: from EUR03-AM5-obe.outbound.protection.outlook.com (EUR03-AM5-obe.outbound.protection.outlook.com [40.107.3.42]) by mx.groups.io with SMTP id smtpd.web11.2224.1590569591541636898 for ; Wed, 27 May 2020 01:53:11 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=D5oTkeUQ4dcUqT6DZuCwkyAoqMVYYciVrSnhvVbjj9xFCds118nbxvf8Bpw6/YdoG7usKumOZufhmujPZwT9cR0et8nSQALWgVddTPh/yPXssUVShlGhyRo99csyhbsAD6SPsUTvjbfhMr9nU8VAjakpOOAx1TeTKS/ChDbM366d6A8SeAn1VsEHeHCtzL3ITl2uNaoEAXI5TgM0WlTOTIwS6dA+P/ft88dFWu49r5b43+MbW5ndPvihh9np1kY18KMGoWnNb53vfDVKZcRWo+RbqtpLqIQT5Zflp4cHRWqdeSQZnlIeDIkT0sPS+djJ/LSh8KnKDInN/8qllciyfw== 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=hndXk980Vw+4d7kCmnLKret7wWPWHr1tjEow8iqHfFo=; b=LLUfFFUw00/XNaJSK4VCNGFJadVGRFcQD5TnwaHyHO0Sh2L86tBbFQJY94nnuUV18XPTh/o8nYzsVJoGxVZwdSBBGo1ch2uOUhvmVeokd96N7KCmcIlXoFdE0VJJxh1nEkOkd8IIpyvJFpmlqieqOSDI5EyLE+hW7pCdLuUlFpQmbfLIubN4I78Lbphl/bRFbJLLwGHTqyea+EVQ7FRA79wLdf/TspVDpNU1nKMpDrm5p9fL09ZqE+Vu7YLuheQ65dFhd9tjBgGHO5zgoxK7c5o77GQfQCXz4MKWzIDahfQ2fheU+1MHYvCEHfh4EtvKMNzeL7eghW8xbbLYmkRz/w== 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:09 +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:09 +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 6/9] Silicon/NXP: Add Chassis3V2 Package Date: Wed, 27 May 2020 14:21:32 +0530 Message-ID: <20200527085135.16717-7-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:06 +0000 X-Originating-IP: [92.120.0.69] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 493c0e2a-6158-4a3c-9fae-08d8021b610e 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:5797; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info: NBKNAkl6vMlBPA/WNrLw2PRW+fxki1eTWP6/qies0CDJKGi4YyqXzRueOCqvqvc4LrkOH5H6WHJCvxn9u4OhE5UNUJUKJerIJ/H12Bb4Ufg7MgcNuEC+PC66ApSQRkAs4PkN4cbHgvMAg1s4HN2WRriA0z5qjlQPfsUFAX/vUF5ASUda2X0UVtUEHlYjxzFDBuk4NiFhEIqjqXbBzaWvn+YrprtR9Dmi6zkMLrTWzhDz9r9+ha3SAlrfWf4wKW8kQ2KWeN3IG7HbvxtoNFP3n4BkHT8jV7MyWyFnXT+ro+E3x+ebwTCc5AuUc+TQRVo3Kzw3s30Yi+sR86oAy1fn3Q== X-MS-Exchange-AntiSpam-MessageData: 4n4z//x6NU1xvnnV3ZoiHqP+mr9bLdH/zxOemaUXz4w4+2jX2GSowb2qR7jInnvpdYh+FNllzsYglGnq5kiCQkofEtVD6RcWsFS2WNBtCdP/eJ9Q1CjqZXLvE5oXlWoiIe183pw7tPxHZ2KsGTqSqS+evgKYZYt7xfCHhde+spHf0XZDLhSlJvy3yjbJBPjB6460WMLku3HmoN4oyFDnnKgoOtkkk+u/n2hoZDfSlHz0K9Gglk0mqBihWbjTioVKJ1ecg3Wy9/NU0K50CnrnLMGxlw1SA8UdqhoTPNftbJNvbTE1VcK2BowuOQ9HNiF3NOqhQJ3U5Fm9JK+j6StkBQOpdRj1b2IkQrMNJO3gzJ2EnbzisXSm5dArUmVyaugWAPOPeDstyplOCK5nQqiXtbdrF0vBltWj96l4rSf7zUghWtFzTQw3tFZ7NBoJmJwJBphRI2slC2Z1Qvf2n8RHI/ygLVWyTHWd6p0dUL0pL0U= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 493c0e2a-6158-4a3c-9fae-08d8021b610e X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 May 2020 08:53:09.1224 (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: UjZNjowVavmtRPTctpFmBGVgmSn0zuWApcRn66aYZHlp9TR3Jlq4fzxK97h+XSkLFljavf/u5nuscDaLuHCYOQ== 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: qKeRETqgxTt4H6zBAh1qg9Ivx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1590569592; bh=him6zKEMGJLDMBAlcA1nhJQSvmZqcgjNddnCH78/0Fw=; h=Content-Type:Date:From:Reply-To:Subject:To; b=LbyK21riBS4aoHAH/wCOHLsk6MFoz13bQLrCGSVfjyeZBmKI2nm4QnEGjd2R4wd/TDG ULhNYcEhtw1+wnJ9FQ7QskSjIgI97v4hzTHzO2LUXAqcEhU2xe+fNQD98fIQZjq33ngJ0 Doy90f2v7b17RUHbjLmfUtachgVYUjthsbk= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" From: Pankaj Bansal Chassis3V2 is the new chassis on which LS1028A and LX2160A SOCs are based. Add the Chassis3V2 package. Signed-off-by: Pankaj Bansal --- Notes: V2: - No change Silicon/NXP/Chassis3V2/Chassis3V2.dec | 22 ++++++ Silicon/NXP/Chassis3V2/Chassis3V2.dsc.inc | 10 +++ Silicon/NXP/Chassis3V2/Library/ChassisLib/ChassisLib.inf | 33 +++++++++ Silicon/NXP/Chassis3V2/Include/Chassis.h | 26 +++++++ Silicon/NXP/Chassis3V2/Library/ChassisLib/ChassisLib.c | 71 ++++++++++++= ++++++++ 5 files changed, 162 insertions(+) diff --git a/Silicon/NXP/Chassis3V2/Chassis3V2.dec b/Silicon/NXP/Chassis3V2= /Chassis3V2.dec new file mode 100644 index 000000000000..f7269e6bf6de --- /dev/null +++ b/Silicon/NXP/Chassis3V2/Chassis3V2.dec @@ -0,0 +1,22 @@ +# @file +# NXP Layerscape processor package. +# +# Copyright 2017, 2020 NXP +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +# + +[Defines] + DEC_SPECIFICATION =3D 1.27 + PACKAGE_VERSION =3D 0.1 + +##########################################################################= ###### +# +# Include Section - list of Include Paths that are provided by this packag= e. +# Comments are used for Keywords and Module Types. +# +# +##########################################################################= ###### +[Includes.common] + Include # Root include for the package diff --git a/Silicon/NXP/Chassis3V2/Chassis3V2.dsc.inc b/Silicon/NXP/Chassi= s3V2/Chassis3V2.dsc.inc new file mode 100644 index 000000000000..b9f388a59f2a --- /dev/null +++ b/Silicon/NXP/Chassis3V2/Chassis3V2.dsc.inc @@ -0,0 +1,10 @@ +# @file +# +# Copyright 2018-2020 NXP +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +# + +[LibraryClasses.common] + ChassisLib|Silicon/NXP/Chassis3V2/Library/ChassisLib/ChassisLib.inf diff --git a/Silicon/NXP/Chassis3V2/Library/ChassisLib/ChassisLib.inf b/Sil= icon/NXP/Chassis3V2/Library/ChassisLib/ChassisLib.inf new file mode 100644 index 000000000000..75b68cc4ca2d --- /dev/null +++ b/Silicon/NXP/Chassis3V2/Library/ChassisLib/ChassisLib.inf @@ -0,0 +1,33 @@ +# @file +# +# Copyright 2020 NXP +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +# + +[Defines] + INF_VERSION =3D 1.27 + BASE_NAME =3D Chassis3V2Lib + FILE_GUID =3D fae0d077-5fc2-494f-b8e1-c51a3023ee3e + MODULE_TYPE =3D BASE + VERSION_STRING =3D 1.0 + LIBRARY_CLASS =3D ChassisLib + +[Packages] + ArmPkg/ArmPkg.dec + MdePkg/MdePkg.dec + Silicon/NXP/Chassis3V2/Chassis3V2.dec + Silicon/NXP/NxpQoriqLs.dec + +[LibraryClasses] + IoAccessLib + IoLib + PcdLib + SerialPortLib + +[Sources.common] + ChassisLib.c + +[FeaturePcd] + gNxpQoriqLsTokenSpaceGuid.PcdDcfgBigEndian diff --git a/Silicon/NXP/Chassis3V2/Include/Chassis.h b/Silicon/NXP/Chassis= 3V2/Include/Chassis.h new file mode 100644 index 000000000000..0fd70132d897 --- /dev/null +++ b/Silicon/NXP/Chassis3V2/Include/Chassis.h @@ -0,0 +1,26 @@ +/** @file + + Copyright 2018-2020 NXP + + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ +#ifndef CHASSIS_H__ +#define CHASSIS_H__ + +#include + +#define NXP_LAYERSCAPE_CHASSIS3V2_DCFG_ADDRESS 0x1E00000 + +/** + The Device Configuration Unit provides general purpose configuration and + status for the device. These registers only support 32-bit accesses. +**/ +#pragma pack(1) +typedef struct { + UINT8 Reserved0[0x100 - 0x0]; + UINT32 RcwSr[32]; // Reset Control Word Status Register +} NXP_LAYERSCAPE_CHASSIS3V2_DEVICE_CONFIG; +#pragma pack() + +#endif // CHASSIS_H__ diff --git a/Silicon/NXP/Chassis3V2/Library/ChassisLib/ChassisLib.c b/Silic= on/NXP/Chassis3V2/Library/ChassisLib/ChassisLib.c new file mode 100644 index 000000000000..30f8f945b233 --- /dev/null +++ b/Silicon/NXP/Chassis3V2/Library/ChassisLib/ChassisLib.c @@ -0,0 +1,71 @@ +/** @file + Chassis specific functions common to all SOCs based on a specific Chessis + + Copyright 2018-2020 NXP + + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#include +#include +#include +#include +#include +#include + +/** + Read Dcfg register + + @param Address The MMIO register to read. + + @return The value read. +**/ +UINT32 +EFIAPI +DcfgRead32 ( + IN UINTN Address + ) +{ + MMIO_OPERATIONS *DcfgOps; + + DcfgOps =3D GetMmioOperations (FeaturePcdGet (PcdDcfgBigEndian)); + + return DcfgOps->Read32 (Address); +} + +/** + Write Dcfg register + + @param Address The MMIO register to write. + @param Value The value to write to the MMIO register. + + @return Value. +**/ +UINT32 +EFIAPI +DcfgWrite32 ( + IN UINTN Address, + IN UINT32 Value + ) +{ + MMIO_OPERATIONS *DcfgOps; + + DcfgOps =3D GetMmioOperations (FeaturePcdGet (PcdDcfgBigEndian)); + + return DcfgOps->Write32 (Address, Value); +} + +/** + Function to initialize Chassis Specific functions + **/ +VOID +ChassisInit ( + VOID + ) +{ + // + // Early init serial Port to get board information. + // + SerialPortInitialize (); +} --=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 (#60326): https://edk2.groups.io/g/devel/message/60326 Mute This Topic: https://groups.io/mt/74496021/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-