/* 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." */
EFI_STATUS EFIAPI FdtGetAddressInfo(IN CONST VOID *Fdt, IN INT32 Node, OUT INT32 *AddressCells, OPTIONAL OUT INT32 *SizeCells OPTIONAL)
/* 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." */
EFI_STATUS EFIAPI FdtGetAddressInfo(IN CONST VOID *Fdt, IN INT32 Node, OUT INT32 *AddressCells, OPTIONAL OUT INT32 *SizeCells OPTIONAL)
{
  if (Fdt == NULL) {
    ASSERT (0);
    return EFI_INVALID_PARAMETER;
  }
  if (AddressCells != NULL) {
    *AddressCells = fdt_address_cells (Fdt, Node);
    if (*AddressCells < 0) {
      ASSERT (0);
      return EFI_ABORTED;
    }
  }
  if (SizeCells != NULL) {
    *SizeCells = fdt_size_cells (Fdt, Node);
    if (*SizeCells < 0) {
      ASSERT (0);
      return EFI_ABORTED;
    }
  }
  return EFI_SUCCESS;
}