]> xenbits.xensource.com Git - unikraft/unikraft.git/commitdiff
plat/drivers/gic: Remove `fdt` argument from initialization methods
authorSergiu Moga <sergiu.moga@protonmail.com>
Tue, 23 May 2023 16:44:01 +0000 (19:44 +0300)
committerUnikraft <monkey@unikraft.io>
Fri, 11 Aug 2023 16:42:01 +0000 (16:42 +0000)
Now that we have separated the ways we probe the `GIC` (`Devicetree`
vs `ACPI`) and the `Devicetree` parts can fetch the `Devicetree` on
their own, remove the no longer necessary `fdt` function parameters
from the related functions.

Signed-off-by: Sergiu Moga <sergiu.moga@protonmail.com>
Reviewed-by: Razvan Virtan <virtanrazvan@gmail.com>
Reviewed-by: Michalis Pappas <michalis@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #912

plat/drivers/gic/gic-common.c
plat/drivers/include/gic/gic.h
plat/kvm/arm/intctrl.c

index 798ef4c2adf8281e407db5ff2856011dbbee3275..f1fc1c8eb83edac31a99578a1ac562966fd1719e 100644 (file)
@@ -41,7 +41,7 @@
 #error At least one GIC driver should be selected!
 #endif
 
-int _dtb_init_gic(const void *fdt, struct _gic_dev **dev)
+int init_gic(struct _gic_dev **dev)
 {
        int rc;
 
index 820b9cd1b4d45777c5789906e5e2c00e388e3023..b1719052f924ded4bd7b0c33536ba0f207819490 100644 (file)
@@ -143,15 +143,14 @@ struct _gic_dev {
 };
 
 /**
- * Initialize GIC driver from device tree
+ * Initialize GIC driver from device tree or ACPI
  *
- * @param [in] fdt Pointer to fdt structure
  * @param [out] dev receives pointer to GIC device driver on success, NULL
  *    otherwise
  *
  * @return 0 on success, a non-zero error code otherwise
  */
-int _dtb_init_gic(const void *fdt, struct _gic_dev **dev);
+int init_gic(struct _gic_dev **dev);
 
 /**
  * Translate a type-relative interrupt number to the corresponding absolute
index 9d259702bc5f0842bff256ec655300690a9bde3e..e36ce1e9d59b2aea65407b8fc9b0e65dca69823d 100644 (file)
@@ -42,13 +42,10 @@ struct _gic_dev *gic;
 
 void intctrl_init(void)
 {
-       void *dtb;
        int rc;
 
-       dtb = (void *)ukplat_bootinfo_get()->dtb;
-
        /* Initialize GIC from DTB */
-       rc = _dtb_init_gic(dtb, &gic);
+       rc = init_gic(&gic);
        if (unlikely(rc))
                goto EXIT_ERR;