/* Data must describe a GIC interrupt. A GIC interrupt is on at least 3 UINT32 cells. This function DOES NOT SUPPORT extended SPI range and extended PPI range. */
UINT32 EFIAPI FdtGetInterruptId(UINT32 CONST *Data)
/* Data must describe a GIC interrupt. A GIC interrupt is on at least 3 UINT32 cells. This function DOES NOT SUPPORT extended SPI range and extended PPI range. */
UINT32 EFIAPI FdtGetInterruptId(UINT32 CONST *Data)
{
  UINT32  IrqType;
  UINT32  IrqId;
  ASSERT (Data != NULL);
  IrqType = fdt32_to_cpu (Data[IRQ_TYPE_OFFSET]);
  IrqId   = fdt32_to_cpu (Data[IRQ_NUMBER_OFFSET]);
  switch (IrqType) {
    case DT_SPI_IRQ:
      IrqId += SPI_OFFSET;
      break;
    case DT_PPI_IRQ:
      IrqId += PPI_OFFSET;
      break;
    default:
      ASSERT (0);
      IrqId = 0;
  }
  return IrqId;
}