From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR03-DB5-obe.outbound.protection.outlook.com (EUR03-DB5-obe.outbound.protection.outlook.com []) by mx.groups.io with SMTP id smtpd.web12.37177.1591018565558875974 for ; Mon, 01 Jun 2020 06:36:28 -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=MOJ1V5u5; spf=fail (domain: oss.nxp.com, ip: , mailfrom: pankaj.bansal@oss.nxp.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kmXcRILRN8VQXcMpj8wB9qEnqL8nMqtCn4u1LbGtabbTcsQDh5lp8JYXuNqxIXpwdwC+rIfNHQ1Df/AIEyBWrwhrHIuwgnigZo3ApysOgyaqlcYw2funxFQRma16uhtNxiZU3q4XimTwn+VrnqeGXAOnDNno/gzcukJ5BZY6SCkPZElNJoTWMI3YksxUuAtg8/M7m1M8uRB/I1X7vfbt0a4yUKea9Jj2rUgMMGLP2QRlchgoDrDhAH69v0cuSR6qelYQxkiDDZlW4NSycqDs4AbVQk15Rf5Zl6MN1/VRcR1CxUQM+rdGNbKIr4tl5Fug4HqUiY/GtWnuOW8g9jEBzQ== 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=6hXDi6U1N7qm5v49NPgKaGmHqp+Ufse3A1Y9+uk8VKc=; b=H7qxDZyulBcnqOPJHVHSsEkKxt2sHqCTfjBEqmPE+pB7o6ohSZKixV9T4vpc3xM/m+z7vuc3xwfCHAm/IXK5D3MpCaMpJRAys6QkoNxT9qD4dbp5m97IQHQYU5Ldr6Pmo0IfYWPLmcaZR/Z9wZJttvj/o24LTsvxlFHGs3Acj5hbGsYCCDwq3lpjHMPe74v/5YCFLh2p88GqzgfgiEF8GjBrh1Bd0Aqx2hpiF9Is2eKK97SECOKLPEtQgUGiXAbw0m0E4eKNlrepby/F61lLxARENckv6FYHrkVXvA61dZplgQCx1DyXc3vTMBir9vq4g8ttZHM7p2jGk4087/+epw== 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=6hXDi6U1N7qm5v49NPgKaGmHqp+Ufse3A1Y9+uk8VKc=; b=MOJ1V5u5PUS3m+5y3/nb2l3l50TONAGxYSbCvHJDBqBFfKDMn3t44qUsG1nq7V3zLM9fICJVSrz1fkvN1XXlJFCNbx2i8D6bGW3I7VOHwxPlsYIuBaiGivj5DpmzuavEcTPaOdl6+2c5LJPR/C3KQgkm3ywa0AhQ1CCrm1fBOns= Authentication-Results: nuviainc.com; dkim=none (message not signed) header.d=none;nuviainc.com; dmarc=none action=none header.from=oss.nxp.com; Received: from VI1PR04MB5933.eurprd04.prod.outlook.com (2603:10a6:803:ec::16) by VI1PR04MB6096.eurprd04.prod.outlook.com (2603:10a6:803:f6::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.17; Mon, 1 Jun 2020 13:36:21 +0000 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.3045.024; Mon, 1 Jun 2020 13:36:21 +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: [PATCH edk2-platforms v4 07/10] Silicon/NXP: Add Chassis3V2 Package Date: Mon, 1 Jun 2020 19:04:36 +0530 Message-ID: <20200601133439.5711-8-pankaj.bansal@oss.nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200601133439.5711-1-pankaj.bansal@oss.nxp.com> References: <20200601133439.5711-1-pankaj.bansal@oss.nxp.com> X-ClientProxiedBy: SG2PR02CA0097.apcprd02.prod.outlook.com (2603:1096:4:92::13) To VI1PR04MB5933.eurprd04.prod.outlook.com (2603:10a6:803:ec::16) 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 SG2PR02CA0097.apcprd02.prod.outlook.com (2603:1096:4:92::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.17 via Frontend Transport; Mon, 1 Jun 2020 13:36:18 +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: c0e377de-9b0b-4566-375e-08d80630c51c X-MS-TrafficTypeDiagnostic: VI1PR04MB6096: 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-Forefront-PRVS: 0421BF7135 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: BorCT498dorEdJc/0CvdBUyUb1kZegQmKHsfUZJxdoR+AdagsBX4HDe54ZZefiRvzbqKydvll86QIWY0WX6XgNJ/db8uI24hgC2ziKtSK04X3ucUFOcYzN0d5r8HuR1ykp7ZoTUpP3t0FRTEGRIEenCnO0X6t7I8hN8cXAuEQiL7ELmXKuNBoLA+JhOB0Ryg/oxmHeaVDRkpVc+fruvhay+ZGqcbKgB2OR0UBq8wlOGBQtWyxj8IwNyb8Sl8jxJpb0e61goF2QIv7uJgrlI/hSL4kjwvhN1TrBO8HrgzzXpVST9CnseJMDn+lroCT3W5oSsM7RW6F5FJ/62TH+XlhQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB5933.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(366004)(376002)(346002)(396003)(136003)(39860400002)(110136005)(1076003)(316002)(86362001)(6666004)(44832011)(16526019)(478600001)(6506007)(26005)(6512007)(186003)(6486002)(52116002)(956004)(66556008)(66476007)(66946007)(2906002)(2616005)(5660300002)(19627235002)(83380400001)(8936002)(8676002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: WLjYwS7EZLkwleUbGuRbhqD8B0Uq9cprk8JhPwHqBxErRbWwAU5qv2CnfB6MVUeK8SONkXn7TGLEBukjVUCoMzqnXbcsWKgc1cTNmF6lrRNF0kHq55xa4rYBraYYvVgJqUco7adDV8lIddxrEWOt6AEc9FbKp4d6cflfQVbxJSEf+KfEBsx30Zx+vE4Wa9YTe88QlOSxdESDUg3jEc78/V1P++1yYLKoT//sWoH8AhQzAvISiimT6V5RIrsjBrw1+mTROcTQ3jYbIpCVGuhHfZW+9s2bf2gs9XY5vsOPaSb9hkrr5BJE/P5EtZ7uKcNLBh1IU0WIrB5T6TKFztVM+HAniIustuT645ASvWDyN/fP875v5kzgTfkq5nSQe47gtGmtJPq9D8CleU/E2UkL8GTijXqrBAKErxBFwa0884qwwR1ygyzZ48b0f95BWeZk1lR7m2vcdRZ+K9mRGTEqh9x2Q0nI2r3RNAYcOpzKqV8= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: c0e377de-9b0b-4566-375e-08d80630c51c X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jun 2020 13:36:21.1720 (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: eKwt5XobMMRyYRkXGROJOKWI0GZqkm6X0cyUF6Pn1p/ov7WJ8lyHb7A3FHKdgsIV9cQXnk4Hcx8v4ySvnyk8nQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB6096 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain 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 Reviewed-by: Leif Lindholm --- Notes: V4: - No change =20 V3: - No change =20 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 Chessi= s + + 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