DynamicTablesPkg: FdtHwInfoParserLib: Make Serial Port parser arch neutral
To allow other architectures to potentially re-use the serial port parser and make the code arch neutral, remove the Arm prefixes. Suggested-by: Sunil V L <sunilvl@ventanamicro.com> Signed-off-by: Pierre Gondois <pierre.gondois@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
This commit is contained in:
parent
f16817ec84
commit
a7cc72c360
|
@ -10,7 +10,7 @@
|
||||||
#include "Arm/GenericTimer/ArmGenericTimerParser.h"
|
#include "Arm/GenericTimer/ArmGenericTimerParser.h"
|
||||||
#include "Arm/Gic/ArmGicDispatcher.h"
|
#include "Arm/Gic/ArmGicDispatcher.h"
|
||||||
#include "Pci/PciConfigSpaceParser.h"
|
#include "Pci/PciConfigSpaceParser.h"
|
||||||
#include "Serial/ArmSerialPortParser.h"
|
#include "Serial/SerialPortParser.h"
|
||||||
|
|
||||||
/** Ordered table of parsers/dispatchers.
|
/** Ordered table of parsers/dispatchers.
|
||||||
|
|
||||||
|
|
|
@ -24,8 +24,8 @@
|
||||||
FdtUtility.h
|
FdtUtility.h
|
||||||
Pci/PciConfigSpaceParser.c
|
Pci/PciConfigSpaceParser.c
|
||||||
Pci/PciConfigSpaceParser.h
|
Pci/PciConfigSpaceParser.h
|
||||||
Serial/ArmSerialPortParser.c
|
Serial/SerialPortParser.c
|
||||||
Serial/ArmSerialPortParser.h
|
Serial/SerialPortParser.h
|
||||||
|
|
||||||
[Sources.ARM, Sources.AARCH64]
|
[Sources.ARM, Sources.AARCH64]
|
||||||
Arm/ArmFdtHwInfoParser.c
|
Arm/ArmFdtHwInfoParser.c
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/** @file
|
/** @file
|
||||||
Arm Serial Port Parser.
|
Serial Port Parser.
|
||||||
|
|
||||||
Copyright (c) 2021 - 2023, Arm Limited. All rights reserved.<BR>
|
Copyright (c) 2021 - 2023, Arm Limited. All rights reserved.<BR>
|
||||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
#include "CmObjectDescUtility.h"
|
#include "CmObjectDescUtility.h"
|
||||||
#include "FdtHwInfoParser.h"
|
#include "FdtHwInfoParser.h"
|
||||||
#include "Serial/ArmSerialPortParser.h"
|
#include "Serial/SerialPortParser.h"
|
||||||
|
|
||||||
/** List of "compatible" property values for serial port nodes.
|
/** List of "compatible" property values for serial port nodes.
|
||||||
|
|
||||||
|
@ -329,7 +329,7 @@ GetSerialConsoleNode (
|
||||||
STATIC
|
STATIC
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ArmSerialPortInfoDispatch (
|
SerialPortInfoDispatch (
|
||||||
IN CONST FDT_HW_INFO_PARSER_HANDLE FdtParserHandle,
|
IN CONST FDT_HW_INFO_PARSER_HANDLE FdtParserHandle,
|
||||||
IN CM_ARCH_COMMON_SERIAL_PORT_INFO *GenericSerialInfo,
|
IN CM_ARCH_COMMON_SERIAL_PORT_INFO *GenericSerialInfo,
|
||||||
IN INT32 NodeCount,
|
IN INT32 NodeCount,
|
||||||
|
@ -408,7 +408,7 @@ ArmSerialPortInfoDispatch (
|
||||||
STATIC
|
STATIC
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ArmSerialPortInfoParser (
|
SerialPortInfoParser (
|
||||||
IN CONST FDT_HW_INFO_PARSER_HANDLE FdtParserHandle,
|
IN CONST FDT_HW_INFO_PARSER_HANDLE FdtParserHandle,
|
||||||
IN INT32 FdtBranch,
|
IN INT32 FdtBranch,
|
||||||
IN EARCH_COMMON_OBJECT_ID SerialObjectId
|
IN EARCH_COMMON_OBJECT_ID SerialObjectId
|
||||||
|
@ -436,7 +436,7 @@ ArmSerialPortInfoParser (
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = ArmSerialPortInfoDispatch (
|
Status = SerialPortInfoDispatch (
|
||||||
FdtParserHandle,
|
FdtParserHandle,
|
||||||
&SerialInfo,
|
&SerialInfo,
|
||||||
1,
|
1,
|
||||||
|
@ -529,7 +529,7 @@ SerialPortDispatcher (
|
||||||
return Status;
|
return Status;
|
||||||
} else {
|
} else {
|
||||||
// Parse the console serial-port.
|
// Parse the console serial-port.
|
||||||
Status = ArmSerialPortInfoParser (
|
Status = SerialPortInfoParser (
|
||||||
FdtParserHandle,
|
FdtParserHandle,
|
||||||
SerialConsoleNode,
|
SerialConsoleNode,
|
||||||
EArchCommonObjConsolePortInfo
|
EArchCommonObjConsolePortInfo
|
||||||
|
@ -587,7 +587,7 @@ SerialPortDispatcher (
|
||||||
// The first serial-port node, not being the console serial-port,
|
// The first serial-port node, not being the console serial-port,
|
||||||
// will be the debug serial-port.
|
// will be the debug serial-port.
|
||||||
SerialDebugNode = SerialNode;
|
SerialDebugNode = SerialNode;
|
||||||
Status = ArmSerialPortInfoParser (
|
Status = SerialPortInfoParser (
|
||||||
FdtParserHandle,
|
FdtParserHandle,
|
||||||
SerialDebugNode,
|
SerialDebugNode,
|
||||||
EArchCommonObjSerialDebugPortInfo
|
EArchCommonObjSerialDebugPortInfo
|
||||||
|
@ -617,7 +617,7 @@ SerialPortDispatcher (
|
||||||
} // for
|
} // for
|
||||||
|
|
||||||
if (GenericSerialIndex > 0) {
|
if (GenericSerialIndex > 0) {
|
||||||
Status = ArmSerialPortInfoDispatch (
|
Status = SerialPortInfoDispatch (
|
||||||
FdtParserHandle,
|
FdtParserHandle,
|
||||||
GenericSerialInfo,
|
GenericSerialInfo,
|
||||||
GenericSerialIndex,
|
GenericSerialIndex,
|
|
@ -1,5 +1,5 @@
|
||||||
/** @file
|
/** @file
|
||||||
Arm Serial Port Parser.
|
Serial Port Parser.
|
||||||
|
|
||||||
Copyright (c) 2021, ARM Limited. All rights reserved.<BR>
|
Copyright (c) 2021, ARM Limited. All rights reserved.<BR>
|
||||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||||
|
@ -9,8 +9,8 @@
|
||||||
- linux/Documentation/devicetree/bindings/serial/8250.txt
|
- linux/Documentation/devicetree/bindings/serial/8250.txt
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#ifndef ARM_SERIAL_PORT_PARSER_H_
|
#ifndef SERIAL_PORT_PARSER_H_
|
||||||
#define ARM_SERIAL_PORT_PARSER_H_
|
#define SERIAL_PORT_PARSER_H_
|
||||||
|
|
||||||
/** SerialPort dispatcher.
|
/** SerialPort dispatcher.
|
||||||
|
|
||||||
|
@ -44,4 +44,4 @@ SerialPortDispatcher (
|
||||||
IN INT32 FdtBranch
|
IN INT32 FdtBranch
|
||||||
);
|
);
|
||||||
|
|
||||||
#endif // ARM_SERIAL_PORT_PARSER_H_
|
#endif // SERIAL_PORT_PARSER_H_
|
Loading…
Reference in New Issue