drivers: fpga: Follow mainline to pass compatible flags to fpga_load
authorMuhammad Hazim Izzat Zamri <muhammad.hazim.izzat.zamri@altera.com>
Fri, 14 Mar 2025 02:19:53 +0000 (19:19 -0700)
committerMichal Simek <michal.simek@amd.com>
Wed, 16 Apr 2025 11:42:06 +0000 (13:42 +0200)
Introducing additional flag to check whether an FPGA driver is able to
load a particular FPGA bitstream image.

Generally, flag variable is used to enable or disable certain features,
specify additional parameters (such as error handling), or modify how
the function operates.

Hence, in this function flags is an integer that can be used to pass
configuration options to the fpga_load function. Here, it's
initialized to 0, meaning no special options are enabled, but it could
modify the flags to influence the function's behavior.

Signed-off-by: Muhammad Hazim Izzat Zamri <muhammad.hazim.izzat.zamri@altera.com>
Link: https://lore.kernel.org/r/20250314021953.18379-3-muhammad.hazim.izzat.zamri@altera.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
drivers/fpga/altera.c

index 136ccfc..64fda3a 100644 (file)
@@ -70,8 +70,9 @@ int fpga_loadbitstream(int devnum, char *fpgadata, size_t size,
                       bitstream_type bstype)
 {
        int ret_val;
+       int flags = 0;
 
-       ret_val = fpga_load(devnum, (void *)fpgadata, size, bstype);
+       ret_val = fpga_load(devnum, (void *)fpgadata, size, bstype, flags);
 
        /*
         * Enable the HPS to FPGA bridges when FPGA load is completed