]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPkg/Drivers/ArmGic/ArmGicDxe.c
ArmPkg/ArmGic: Move RegisterInterruptSource() to the common GicDxe file
[mirror_edk2.git] / ArmPkg / Drivers / ArmGic / ArmGicDxe.c
index ab912d79be4f8d8053246554af1b2ab3da9adf39..d57ae5d8ac84cc20640a9b41195b1fe6fbe0306d 100644 (file)
@@ -37,48 +37,6 @@ Abstract:
 \r
 extern EFI_HARDWARE_INTERRUPT_PROTOCOL gHardwareInterruptProtocol;\r
 \r
-/**\r
-  Register Handler for the specified interrupt source.\r
-\r
-  @param This     Instance pointer for this protocol\r
-  @param Source   Hardware source of the interrupt\r
-  @param Handler  Callback for interrupt. NULL to unregister\r
-\r
-  @retval EFI_SUCCESS Source was updated to support Handler.\r
-  @retval EFI_DEVICE_ERROR  Hardware could not be programmed.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-RegisterInterruptSource (\r
-  IN EFI_HARDWARE_INTERRUPT_PROTOCOL    *This,\r
-  IN HARDWARE_INTERRUPT_SOURCE          Source,\r
-  IN HARDWARE_INTERRUPT_HANDLER         Handler\r
-  )\r
-{\r
-  if (Source > mGicNumInterrupts) {\r
-    ASSERT(FALSE);\r
-    return EFI_UNSUPPORTED;\r
-  }\r
-  \r
-  if ((Handler == NULL) && (gRegisteredInterruptHandlers[Source] == NULL)) {\r
-    return EFI_INVALID_PARAMETER;\r
-  }\r
-\r
-  if ((Handler != NULL) && (gRegisteredInterruptHandlers[Source] != NULL)) {\r
-    return EFI_ALREADY_STARTED;\r
-  }\r
-\r
-  gRegisteredInterruptHandlers[Source] = Handler;\r
-\r
-  // If the interrupt handler is unregistered then disable the interrupt\r
-  if (NULL == Handler){\r
-       return This->DisableInterruptSource (This, Source);\r
-  } else {\r
-       return This->EnableInterruptSource (This, Source);\r
-  }\r
-}\r
-\r
 /**\r
   Enable interrupt source Source.\r
 \r