habanalabs/gaudi: Add MODULE_FIRMWARE macros

Message ID 20230616121637.1033074-1-juerg.haefliger@canonical.com
State New
Headers
Series habanalabs/gaudi: Add MODULE_FIRMWARE macros |

Commit Message

Juerg Haefliger June 16, 2023, 12:16 p.m. UTC
  The module loads firmware so add MODULE_FIRMWARE macros to provide that
information via modinfo.

Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com>
---
 drivers/accel/habanalabs/gaudi/gaudi.c | 4 ++++
 1 file changed, 4 insertions(+)
  

Comments

Oded Gabbay July 3, 2023, 12:31 p.m. UTC | #1
On Fri, Jun 16, 2023 at 3:16 PM Juerg Haefliger
<juerg.haefliger@canonical.com> wrote:
>
> The module loads firmware so add MODULE_FIRMWARE macros to provide that
> information via modinfo.
>
> Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com>
> ---
>  drivers/accel/habanalabs/gaudi/gaudi.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/accel/habanalabs/gaudi/gaudi.c b/drivers/accel/habanalabs/gaudi/gaudi.c
> index a29aa8f7b6f3..cd034e98128a 100644
> --- a/drivers/accel/habanalabs/gaudi/gaudi.c
> +++ b/drivers/accel/habanalabs/gaudi/gaudi.c
> @@ -63,6 +63,10 @@
>  #define GAUDI_LINUX_FW_FILE    "habanalabs/gaudi/gaudi-fit.itb"
>  #define GAUDI_TPC_FW_FILE      "habanalabs/gaudi/gaudi_tpc.bin"
>
> +MODULE_FIRMWARE(GAUDI_BOOT_FIT_FILE);
> +MODULE_FIRMWARE(GAUDI_LINUX_FW_FILE);
> +MODULE_FIRMWARE(GAUDI_TPC_FW_FILE);
> +
>  #define GAUDI_DMA_POOL_BLK_SIZE                0x100 /* 256 bytes */
>
>  #define GAUDI_RESET_TIMEOUT_MSEC       2000            /* 2000ms */
> --
> 2.37.2
>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Applied to -next.
Thanks,
Oded
  

Patch

diff --git a/drivers/accel/habanalabs/gaudi/gaudi.c b/drivers/accel/habanalabs/gaudi/gaudi.c
index a29aa8f7b6f3..cd034e98128a 100644
--- a/drivers/accel/habanalabs/gaudi/gaudi.c
+++ b/drivers/accel/habanalabs/gaudi/gaudi.c
@@ -63,6 +63,10 @@ 
 #define GAUDI_LINUX_FW_FILE	"habanalabs/gaudi/gaudi-fit.itb"
 #define GAUDI_TPC_FW_FILE	"habanalabs/gaudi/gaudi_tpc.bin"
 
+MODULE_FIRMWARE(GAUDI_BOOT_FIT_FILE);
+MODULE_FIRMWARE(GAUDI_LINUX_FW_FILE);
+MODULE_FIRMWARE(GAUDI_TPC_FW_FILE);
+
 #define GAUDI_DMA_POOL_BLK_SIZE		0x100 /* 256 bytes */
 
 #define GAUDI_RESET_TIMEOUT_MSEC	2000		/* 2000ms */