From: Sergiu Moga Date: Tue, 23 May 2023 16:44:01 +0000 (+0300) Subject: plat/drivers/gic: Remove `fdt` argument from initialization methods X-Git-Tag: RELEASE-0.14.0~41 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=4ff8a4ee4252d4e518d394a6330657eb4bc61fbe;p=unikraft%2Funikraft.git plat/drivers/gic: Remove `fdt` argument from initialization methods 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 Reviewed-by: Razvan Virtan Reviewed-by: Michalis Pappas Approved-by: Razvan Deaconescu Tested-by: Unikraft CI GitHub-Closes: #912 --- diff --git a/plat/drivers/gic/gic-common.c b/plat/drivers/gic/gic-common.c index 798ef4c2a..f1fc1c8eb 100644 --- a/plat/drivers/gic/gic-common.c +++ b/plat/drivers/gic/gic-common.c @@ -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; diff --git a/plat/drivers/include/gic/gic.h b/plat/drivers/include/gic/gic.h index 820b9cd1b..b1719052f 100644 --- a/plat/drivers/include/gic/gic.h +++ b/plat/drivers/include/gic/gic.h @@ -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 diff --git a/plat/kvm/arm/intctrl.c b/plat/kvm/arm/intctrl.c index 9d259702b..e36ce1e9d 100644 --- a/plat/kvm/arm/intctrl.c +++ b/plat/kvm/arm/intctrl.c @@ -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;