diff options
author | Pierre Gondois <pierre.gondois@arm.com> | 2024-06-10 14:00:00 +0200 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2024-07-29 13:44:55 +0000 |
commit | f16817ec8491847c8544a9ef44b1777c9daf4ccc (patch) | |
tree | 3c407c583cf1dbe8cfc5ea4fd30105a8a5406970 | |
parent | 4bb08e8863894a1dbdbe10f278c2057d02a60db7 (diff) | |
download | edk2-f16817ec8491847c8544a9ef44b1777c9daf4ccc.tar.gz edk2-f16817ec8491847c8544a9ef44b1777c9daf4ccc.tar.bz2 edk2-f16817ec8491847c8544a9ef44b1777c9daf4ccc.zip |
DynamicTablesPkg: FdtHwInfoParserLib: Make Pci 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.
Also remove the check searching for a GIC version.
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>
-rw-r--r-- | DynamicTablesPkg/Library/FdtHwInfoParserLib/Arm/ArmFdtHwInfoParser.c | 4 | ||||
-rw-r--r-- | DynamicTablesPkg/Library/FdtHwInfoParserLib/FdtHwInfoParserLib.inf | 4 | ||||
-rw-r--r-- | DynamicTablesPkg/Library/FdtHwInfoParserLib/Pci/PciConfigSpaceParser.c (renamed from DynamicTablesPkg/Library/FdtHwInfoParserLib/Pci/ArmPciConfigSpaceParser.c) | 17 | ||||
-rw-r--r-- | DynamicTablesPkg/Library/FdtHwInfoParserLib/Pci/PciConfigSpaceParser.h (renamed from DynamicTablesPkg/Library/FdtHwInfoParserLib/Pci/ArmPciConfigSpaceParser.h) | 10 |
4 files changed, 13 insertions, 22 deletions
diff --git a/DynamicTablesPkg/Library/FdtHwInfoParserLib/Arm/ArmFdtHwInfoParser.c b/DynamicTablesPkg/Library/FdtHwInfoParserLib/Arm/ArmFdtHwInfoParser.c index 403402731a..49a7636dad 100644 --- a/DynamicTablesPkg/Library/FdtHwInfoParserLib/Arm/ArmFdtHwInfoParser.c +++ b/DynamicTablesPkg/Library/FdtHwInfoParserLib/Arm/ArmFdtHwInfoParser.c @@ -9,7 +9,7 @@ #include "Arm/BootArch/ArmBootArchParser.h"
#include "Arm/GenericTimer/ArmGenericTimerParser.h"
#include "Arm/Gic/ArmGicDispatcher.h"
-#include "Pci/ArmPciConfigSpaceParser.h"
+#include "Pci/PciConfigSpaceParser.h"
#include "Serial/ArmSerialPortParser.h"
/** Ordered table of parsers/dispatchers.
@@ -25,7 +25,7 @@ STATIC CONST FDT_HW_INFO_PARSER_FUNC HwInfoParserTable[] = { ArmBootArchInfoParser,
ArmGenericTimerInfoParser,
ArmGicDispatcher,
- ArmPciConfigInfoParser,
+ PciConfigInfoParser,
SerialPortDispatcher
};
diff --git a/DynamicTablesPkg/Library/FdtHwInfoParserLib/FdtHwInfoParserLib.inf b/DynamicTablesPkg/Library/FdtHwInfoParserLib/FdtHwInfoParserLib.inf index 3abc6a0fd2..55ec7d97fa 100644 --- a/DynamicTablesPkg/Library/FdtHwInfoParserLib/FdtHwInfoParserLib.inf +++ b/DynamicTablesPkg/Library/FdtHwInfoParserLib/FdtHwInfoParserLib.inf @@ -22,8 +22,8 @@ FdtHwInfoParser.h
FdtUtility.c
FdtUtility.h
- Pci/ArmPciConfigSpaceParser.c
- Pci/ArmPciConfigSpaceParser.h
+ Pci/PciConfigSpaceParser.c
+ Pci/PciConfigSpaceParser.h
Serial/ArmSerialPortParser.c
Serial/ArmSerialPortParser.h
diff --git a/DynamicTablesPkg/Library/FdtHwInfoParserLib/Pci/ArmPciConfigSpaceParser.c b/DynamicTablesPkg/Library/FdtHwInfoParserLib/Pci/PciConfigSpaceParser.c index 5d11863dfe..76f9efdf64 100644 --- a/DynamicTablesPkg/Library/FdtHwInfoParserLib/Pci/ArmPciConfigSpaceParser.c +++ b/DynamicTablesPkg/Library/FdtHwInfoParserLib/Pci/PciConfigSpaceParser.c @@ -1,5 +1,5 @@ /** @file
- Arm PCI Configuration Space Parser.
+ PCI Configuration Space Parser.
Copyright (c) 2021, ARM Limited. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -16,8 +16,7 @@ #include <Library/DebugLib.h>
#include "FdtHwInfoParser.h"
-#include "Pci/ArmPciConfigSpaceParser.h"
-#include "Arm/Gic/ArmGicDispatcher.h"
+#include "Pci/PciConfigSpaceParser.h"
/** List of "compatible" property values for host PCIe bridges nodes.
@@ -306,8 +305,7 @@ ParseIrqMap ( CONST UINT8 *IrqMapMask;
INT32 IrqMapMaskSize;
- INT32 PHandleOffset;
- UINT32 GicVersion;
+ INT32 PHandleOffset;
UINT32 PciAddressAttr;
@@ -366,13 +364,6 @@ ParseIrqMap ( return EFI_ABORTED;
}
- // Only support Gic(s) for now.
- Status = GetGicVersion (Fdt, IntcNode, &GicVersion);
- if (EFI_ERROR (Status)) {
- ASSERT (0);
- return Status;
- }
-
// Get the "address-cells" property of the IntcNode.
Status = FdtGetAddressInfo (Fdt, IntcNode, &IntcAddressCells, NULL);
if (EFI_ERROR (Status)) {
@@ -727,7 +718,7 @@ FreeParserTable ( **/
EFI_STATUS
EFIAPI
-ArmPciConfigInfoParser (
+PciConfigInfoParser (
IN CONST FDT_HW_INFO_PARSER_HANDLE FdtParserHandle,
IN INT32 FdtBranch
)
diff --git a/DynamicTablesPkg/Library/FdtHwInfoParserLib/Pci/ArmPciConfigSpaceParser.h b/DynamicTablesPkg/Library/FdtHwInfoParserLib/Pci/PciConfigSpaceParser.h index e680138385..aeffe7ac35 100644 --- a/DynamicTablesPkg/Library/FdtHwInfoParserLib/Pci/ArmPciConfigSpaceParser.h +++ b/DynamicTablesPkg/Library/FdtHwInfoParserLib/Pci/PciConfigSpaceParser.h @@ -1,5 +1,5 @@ /** @file
- Arm PCI Configuration Space Parser.
+ PCI Configuration Space Parser.
Copyright (c) 2021, ARM Limited. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -12,8 +12,8 @@ - linux kernel code
**/
-#ifndef ARM_PCI_CONFIG_SPACE_PARSER_H_
-#define ARM_PCI_CONFIG_SPACE_PARSER_H_
+#ifndef PCI_CONFIG_SPACE_PARSER_H_
+#define PCI_CONFIG_SPACE_PARSER_H_
/** Read LEN bits at OFF offsets bits of the ADDR.
@@ -135,9 +135,9 @@ typedef struct PciParserTable { **/
EFI_STATUS
EFIAPI
-ArmPciConfigInfoParser (
+PciConfigInfoParser (
IN CONST FDT_HW_INFO_PARSER_HANDLE FdtParserHandle,
IN INT32 FdtBranch
);
-#endif // ARM_PCI_CONFIG_SPACE_PARSER_H_
+#endif // PCI_CONFIG_SPACE_PARSER_H_
|