From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id CE8D1D811BC for ; Tue, 9 Jan 2024 16:30:25 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=NZmhTNU2wdY+GoMsgMUl6tl4rU+HlO0cq7vn98dP0v4=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1704817824; v=1; b=SkVlVVVWC2mxyNocJW8KycR8Qt9x9jbVe9ROZ2lq7zdSdMU8JDB4RpevXRlUZvOwEbR876/q nlhED5DRgkmEzvMsEZMtDLo7MokM6mBenWV9yrMu7mEWl2I75WywApQEG+92mdafJ09Y8ZaCJvV +M9lI9XagPAiLhG8Pwluzreo= X-Received: by 127.0.0.2 with SMTP id 34ruYY7687511xvsqZffYqOm; Tue, 09 Jan 2024 08:30:24 -0800 X-Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) by mx.groups.io with SMTP id smtpd.web11.21048.1704817824047104584 for ; Tue, 09 Jan 2024 08:30:24 -0800 X-Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-1d45f182fa2so27737065ad.3 for ; Tue, 09 Jan 2024 08:30:24 -0800 (PST) X-Gm-Message-State: M5XYQ0eieM3d5EFa0z1YvG3jx7686176AA= X-Google-Smtp-Source: AGHT+IGf23xiswxE+oxw8scwfwqQnw+VQqkzOW0k4qPKSkBhxW+n+JEVKvwtUCgyZ5+ABwCXGYtNyw== X-Received: by 2002:a17:902:f54f:b0:1d5:4c4c:823a with SMTP id h15-20020a170902f54f00b001d54c4c823amr2318611plf.92.1704817822725; Tue, 09 Jan 2024 08:30:22 -0800 (PST) X-Received: from localhost.localdomain ([106.51.188.200]) by smtp.gmail.com with ESMTPSA id c12-20020a170902b68c00b001d457090851sm1983596pls.289.2024.01.09.08.30.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 08:30:22 -0800 (PST) From: "Sunil V L" To: devel@edk2.groups.io Cc: Sunil V L , Ard Biesheuvel , Leif Lindholm , Pierre Gondois , Sami Mujawar Subject: [edk2-devel] [RFC PATCH v1 09/20] DynamicTablesPkg: FdtHwInfoParserLib: Make Serial parser arch neutral Date: Tue, 9 Jan 2024 21:59:33 +0530 Message-Id: <20240109162944.528006-10-sunilvl@ventanamicro.com> In-Reply-To: <20240109162944.528006-1-sunilvl@ventanamicro.com> References: <20240109162944.528006-1-sunilvl@ventanamicro.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: 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,sunilvl@ventanamicro.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=SkVlVVVW; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=none SerialPortParser is a generic concept and can be used by other architectures. Hence, rename to reflect it is common and updates the consumers. Cc: Ard Biesheuvel Cc: Leif Lindholm Cc: Pierre Gondois Cc: Sami Mujawar Signed-off-by: Sunil V L --- .../FdtHwInfoParserLib/FdtHwInfoParserLib.inf | 4 ++-- ...rmSerialPortParser.h => SerialPortParser.h} | 8 ++++---- .../Arm/ArmFdtHwInfoParser.c | 2 +- ...rmSerialPortParser.c => SerialPortParser.c} | 18 +++++++++--------- 4 files changed, 16 insertions(+), 16 deletions(-) rename DynamicTablesPkg/Library/FdtHwInfoParserLib/Serial/{ArmSerialPortParser.h => SerialPortParser.h} (89%) rename DynamicTablesPkg/Library/FdtHwInfoParserLib/Serial/{ArmSerialPortParser.c => SerialPortParser.c} (94%) diff --git a/DynamicTablesPkg/Library/FdtHwInfoParserLib/FdtHwInfoParserLib.inf b/DynamicTablesPkg/Library/FdtHwInfoParserLib/FdtHwInfoParserLib.inf index 55ec7d97fa18..d3010af527c1 100644 --- a/DynamicTablesPkg/Library/FdtHwInfoParserLib/FdtHwInfoParserLib.inf +++ b/DynamicTablesPkg/Library/FdtHwInfoParserLib/FdtHwInfoParserLib.inf @@ -24,8 +24,8 @@ [Sources] FdtUtility.h Pci/PciConfigSpaceParser.c Pci/PciConfigSpaceParser.h - Serial/ArmSerialPortParser.c - Serial/ArmSerialPortParser.h + Serial/SerialPortParser.c + Serial/SerialPortParser.h [Sources.ARM, Sources.AARCH64] Arm/ArmFdtHwInfoParser.c diff --git a/DynamicTablesPkg/Library/FdtHwInfoParserLib/Serial/ArmSerialPortParser.h b/DynamicTablesPkg/Library/FdtHwInfoParserLib/Serial/SerialPortParser.h similarity index 89% rename from DynamicTablesPkg/Library/FdtHwInfoParserLib/Serial/ArmSerialPortParser.h rename to DynamicTablesPkg/Library/FdtHwInfoParserLib/Serial/SerialPortParser.h index b3e227472772..e5f151ded329 100644 --- a/DynamicTablesPkg/Library/FdtHwInfoParserLib/Serial/ArmSerialPortParser.h +++ b/DynamicTablesPkg/Library/FdtHwInfoParserLib/Serial/SerialPortParser.h @@ -1,5 +1,5 @@ /** @file - Arm Serial Port Parser. + Serial Port Parser. Copyright (c) 2021, ARM Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent @@ -9,8 +9,8 @@ - linux/Documentation/devicetree/bindings/serial/8250.txt **/ -#ifndef ARM_SERIAL_PORT_PARSER_H_ -#define ARM_SERIAL_PORT_PARSER_H_ +#ifndef SERIAL_PORT_PARSER_H_ +#define SERIAL_PORT_PARSER_H_ /** SerialPort dispatcher. @@ -44,4 +44,4 @@ SerialPortDispatcher ( IN INT32 FdtBranch ); -#endif // ARM_SERIAL_PORT_PARSER_H_ +#endif // SERIAL_PORT_PARSER_H_ diff --git a/DynamicTablesPkg/Library/FdtHwInfoParserLib/Arm/ArmFdtHwInfoParser.c b/DynamicTablesPkg/Library/FdtHwInfoParserLib/Arm/ArmFdtHwInfoParser.c index 8dd6546e62f0..2700e9a2a5fe 100644 --- a/DynamicTablesPkg/Library/FdtHwInfoParserLib/Arm/ArmFdtHwInfoParser.c +++ b/DynamicTablesPkg/Library/FdtHwInfoParserLib/Arm/ArmFdtHwInfoParser.c @@ -10,7 +10,7 @@ #include "Arm/GenericTimer/ArmGenericTimerParser.h" #include "Arm/Gic/ArmGicDispatcher.h" #include "Pci/PciConfigSpaceParser.h" -#include "Serial/ArmSerialPortParser.h" +#include "Serial/SerialPortParser.h" /** Ordered table of parsers/dispatchers. diff --git a/DynamicTablesPkg/Library/FdtHwInfoParserLib/Serial/ArmSerialPortParser.c b/DynamicTablesPkg/Library/FdtHwInfoParserLib/Serial/SerialPortParser.c similarity index 94% rename from DynamicTablesPkg/Library/FdtHwInfoParserLib/Serial/ArmSerialPortParser.c rename to DynamicTablesPkg/Library/FdtHwInfoParserLib/Serial/SerialPortParser.c index 47df82c4ba63..6d233fefa85f 100644 --- a/DynamicTablesPkg/Library/FdtHwInfoParserLib/Serial/ArmSerialPortParser.c +++ b/DynamicTablesPkg/Library/FdtHwInfoParserLib/Serial/SerialPortParser.c @@ -1,5 +1,5 @@ /** @file - Arm Serial Port Parser. + Serial Port Parser. Copyright (c) 2021 - 2023, Arm Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent @@ -15,7 +15,7 @@ #include "CmObjectDescUtility.h" #include "FdtHwInfoParser.h" -#include "Serial/ArmSerialPortParser.h" +#include "Serial/SerialPortParser.h" /** List of "compatible" property values for serial port nodes. @@ -329,7 +329,7 @@ GetSerialConsoleNode ( STATIC EFI_STATUS EFIAPI -ArmSerialPortInfoDispatch ( +SerialPortInfoDispatch ( IN CONST FDT_HW_INFO_PARSER_HANDLE FdtParserHandle, IN CM_ARCH_SERIAL_PORT_INFO *GenericSerialInfo, IN INT32 NodeCount, @@ -396,7 +396,7 @@ ArmSerialPortInfoDispatch ( @param [in] FdtParserHandle A handle to the parser instance. @param [in] FdtBranch When searching for DT node name, restrict the search to this Device Tree branch. - @param [in] SerialObjectId ArmNamespace Object ID for the serial port. + @param [in] SerialObjectId ArchNamespace Object ID for the serial port. @retval EFI_SUCCESS The function completed successfully. @retval EFI_ABORTED An error occurred. @@ -407,7 +407,7 @@ ArmSerialPortInfoDispatch ( STATIC EFI_STATUS EFIAPI -ArmSerialPortInfoParser ( +SerialPortInfoParser ( IN CONST FDT_HW_INFO_PARSER_HANDLE FdtParserHandle, IN INT32 FdtBranch, IN EARCH_OBJECT_ID SerialObjectId @@ -435,7 +435,7 @@ ArmSerialPortInfoParser ( return Status; } - Status = ArmSerialPortInfoDispatch ( + Status = SerialPortInfoDispatch ( FdtParserHandle, &SerialInfo, 1, @@ -528,7 +528,7 @@ SerialPortDispatcher ( return Status; } else { // Parse the console serial-port. - Status = ArmSerialPortInfoParser ( + Status = SerialPortInfoParser ( FdtParserHandle, SerialConsoleNode, EArchObjSerialConsolePortInfo @@ -586,7 +586,7 @@ SerialPortDispatcher ( // The first serial-port node, not being the console serial-port, // will be the debug serial-port. SerialDebugNode = SerialNode; - Status = ArmSerialPortInfoParser ( + Status = SerialPortInfoParser ( FdtParserHandle, SerialDebugNode, EArchObjSerialDebugPortInfo @@ -616,7 +616,7 @@ SerialPortDispatcher ( } // for if (GenericSerialIndex > 0) { - Status = ArmSerialPortInfoDispatch ( + Status = SerialPortInfoDispatch ( FdtParserHandle, GenericSerialInfo, GenericSerialIndex, -- 2.34.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#113471): https://edk2.groups.io/g/devel/message/113471 Mute This Topic: https://groups.io/mt/103622724/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-