summaryrefslogtreecommitdiffstats
path: root/DynamicTablesPkg/Library/FdtHwInfoParserLib/Arm/ArmFdtInterrupt.c
diff options
context:
space:
mode:
Diffstat (limited to 'DynamicTablesPkg/Library/FdtHwInfoParserLib/Arm/ArmFdtInterrupt.c')
-rw-r--r--DynamicTablesPkg/Library/FdtHwInfoParserLib/Arm/ArmFdtInterrupt.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/DynamicTablesPkg/Library/FdtHwInfoParserLib/Arm/ArmFdtInterrupt.c b/DynamicTablesPkg/Library/FdtHwInfoParserLib/Arm/ArmFdtInterrupt.c
index 21b1306e57..71774fae71 100644
--- a/DynamicTablesPkg/Library/FdtHwInfoParserLib/Arm/ArmFdtInterrupt.c
+++ b/DynamicTablesPkg/Library/FdtHwInfoParserLib/Arm/ArmFdtInterrupt.c
@@ -83,3 +83,36 @@ FdtGetInterruptFlags (
return AcpiIrqFlags;
}
+
+/** For relevant architectures, get the "#address-cells" and/or "#size-cells"
+ property of the node.
+
+ According to the Device Tree specification, s2.3.5 "#address-cells and
+ #size-cells":
+ "If missing, a client program should assume a default value of 2 for
+ #address-cells, and a value of 1 for #size-cells."
+
+ @param [in] Fdt Pointer to a Flattened Device Tree.
+ @param [in] Node Offset of the node having to get the
+ "#address-cells" and "#size-cells"
+ properties from.
+ @param [out] AddressCells If success, number of address-cells.
+ If the property is not available,
+ default value is 2.
+ @param [out] SizeCells If success, number of size-cells.
+ If the property is not available,
+ default value is 1.
+
+ @retval EFI_INVALID_PARAMETER Invalid parameter.
+**/
+EFI_STATUS
+EFIAPI
+FdtGetIntcAddressCells (
+ IN CONST VOID *Fdt,
+ IN INT32 Node,
+ OUT INT32 *AddressCells, OPTIONAL
+ OUT INT32 *SizeCells OPTIONAL
+ )
+{
+ return FdtGetAddressInfo (Fdt, Node, AddressCells, SizeCells);
+}