<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/include/fpga.h, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>fpga: lattice: Remove unused support</title>
<updated>2025-08-25T14:20:48+00:00</updated>
<author>
<name>Michal Simek</name>
<email>michal.simek@amd.com</email>
</author>
<published>2025-07-28T07:07:54+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=34762f6c007c53d8540c1cb8bcf02ccddedb704f'/>
<id>34762f6c007c53d8540c1cb8bcf02ccddedb704f</id>
<content type='text'>
There is no single platform which is using this driver that's why remove it
completely. Some issues regarding this code are also reported by Coverity
(CID 583143, 583144, 583145, 583146).

Signed-off-by: Michal Simek &lt;michal.simek@amd.com&gt;
Link: https://lore.kernel.org/r/367cd55ab8d9fb262ac23fe748babc6b2b59bee0.1753686468.git.michal.simek@amd.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There is no single platform which is using this driver that's why remove it
completely. Some issues regarding this code are also reported by Coverity
(CID 583143, 583144, 583145, 583146).

Signed-off-by: Michal Simek &lt;michal.simek@amd.com&gt;
Link: https://lore.kernel.org/r/367cd55ab8d9fb262ac23fe748babc6b2b59bee0.1753686468.git.michal.simek@amd.com
</pre>
</div>
</content>
</entry>
<entry>
<title>drivers: fpga: cleanup printf usage</title>
<updated>2025-07-24T06:54:15+00:00</updated>
<author>
<name>Pieter Van Trappen</name>
<email>pieter.van.trappen@cern.ch</email>
</author>
<published>2025-07-08T15:24:49+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=354b2a29ec40d643c8a0facf5bfb4c66386e9391'/>
<id>354b2a29ec40d643c8a0facf5bfb4c66386e9391</id>
<content type='text'>
Remove `fpga_no_sup` to get rid of Werror=unused-function when all
FPGA configurations are enabled.

Swap all printf calls to log_* as this is now preferred and includes
the calling __func__.

Signed-off-by: Pieter Van Trappen &lt;pieter.van.trappen@cern.ch&gt;
Link: https://lore.kernel.org/r/20250708152455.1214487-5-vtpieter@gmail.com
Signed-off-by: Michal Simek &lt;michal.simek@amd.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove `fpga_no_sup` to get rid of Werror=unused-function when all
FPGA configurations are enabled.

Swap all printf calls to log_* as this is now preferred and includes
the calling __func__.

Signed-off-by: Pieter Van Trappen &lt;pieter.van.trappen@cern.ch&gt;
Link: https://lore.kernel.org/r/20250708152455.1214487-5-vtpieter@gmail.com
Signed-off-by: Michal Simek &lt;michal.simek@amd.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fpga: Avoid ignored-qualifiers warning</title>
<updated>2025-02-05T15:22:55+00:00</updated>
<author>
<name>Alexander Dahl</name>
<email>ada@thorsis.com</email>
</author>
<published>2025-01-21T16:22:12+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=135d2926d2b1a4ac1bec9cdb4e54ad01b38aca16'/>
<id>135d2926d2b1a4ac1bec9cdb4e54ad01b38aca16</id>
<content type='text'>
Fixes annoying warnings of the following type when built with W=1 (for
each file including fpga.h):

      CC      drivers/fpga/fpga.o
    In file included from /mnt/data/adahl/src/u-boot/include/xilinx.h:7,
                     from /mnt/data/adahl/src/u-boot/drivers/fpga/fpga.c:10:
    /mnt/data/adahl/src/u-boot/include/fpga.h:61:1: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
       61 | const fpga_desc *const fpga_get_desc(int devnum);
          | ^~~~~
    /mnt/data/adahl/src/u-boot/include/fpga.h:81:1: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
       81 | const fpga_desc *const fpga_validate(int devnum, const void *buf,
          | ^~~~~
    /mnt/data/adahl/src/u-boot/drivers/fpga/fpga.c:36:1: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
       36 | const fpga_desc *const fpga_get_desc(int devnum)
          | ^~~~~
    /mnt/data/adahl/src/u-boot/drivers/fpga/fpga.c:53:1: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
       53 | const fpga_desc *const fpga_validate(int devnum, const void *buf,
          | ^~~~~

Do some type and cast cleanup on that fpga_desc type while at it.

Link: https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wignored-qualifiers
Signed-off-by: Alexander Dahl &lt;ada@thorsis.com&gt;
Link: https://lore.kernel.org/r/20250121162213.1477506-1-ada@thorsis.com
Signed-off-by: Michal Simek &lt;michal.simek@amd.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes annoying warnings of the following type when built with W=1 (for
each file including fpga.h):

      CC      drivers/fpga/fpga.o
    In file included from /mnt/data/adahl/src/u-boot/include/xilinx.h:7,
                     from /mnt/data/adahl/src/u-boot/drivers/fpga/fpga.c:10:
    /mnt/data/adahl/src/u-boot/include/fpga.h:61:1: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
       61 | const fpga_desc *const fpga_get_desc(int devnum);
          | ^~~~~
    /mnt/data/adahl/src/u-boot/include/fpga.h:81:1: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
       81 | const fpga_desc *const fpga_validate(int devnum, const void *buf,
          | ^~~~~
    /mnt/data/adahl/src/u-boot/drivers/fpga/fpga.c:36:1: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
       36 | const fpga_desc *const fpga_get_desc(int devnum)
          | ^~~~~
    /mnt/data/adahl/src/u-boot/drivers/fpga/fpga.c:53:1: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
       53 | const fpga_desc *const fpga_validate(int devnum, const void *buf,
          | ^~~~~

Do some type and cast cleanup on that fpga_desc type while at it.

Link: https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wignored-qualifiers
Signed-off-by: Alexander Dahl &lt;ada@thorsis.com&gt;
Link: https://lore.kernel.org/r/20250121162213.1477506-1-ada@thorsis.com
Signed-off-by: Michal Simek &lt;michal.simek@amd.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fpga: define dummy fpga_load function for debug build</title>
<updated>2023-09-21T11:20:11+00:00</updated>
<author>
<name>Chanho Park</name>
<email>chanho61.park@samsung.com</email>
</author>
<published>2023-08-31T07:52:47+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=55e281049c49ac779b1c533abde5c3c2ffa0cc8e'/>
<id>55e281049c49ac779b1c533abde5c3c2ffa0cc8e</id>
<content type='text'>
This fixes below build error when CC_OPTIMIZE_FOR_DEBUG is enabled and
CONFIG_FPGA or CONFIG_SPL_FPGA are not enabled.
When CC_OPTIMIZE_FOR_DEBUG is enabled, unused code will not be optimized
out. Hence, fpga_load function must have a dummy implementation to avoid
the build error.

../common/spl/spl_fit.c:591: undefined reference to `fpga_load'
collect2: error: ld returned 1 exit status

Signed-off-by: Chanho Park &lt;chanho61.park@samsung.com&gt;
Link: https://lore.kernel.org/r/20230831075247.137501-1-chanho61.park@samsung.com
Signed-off-by: Michal Simek &lt;michal.simek@amd.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes below build error when CC_OPTIMIZE_FOR_DEBUG is enabled and
CONFIG_FPGA or CONFIG_SPL_FPGA are not enabled.
When CC_OPTIMIZE_FOR_DEBUG is enabled, unused code will not be optimized
out. Hence, fpga_load function must have a dummy implementation to avoid
the build error.

../common/spl/spl_fit.c:591: undefined reference to `fpga_load'
collect2: error: ld returned 1 exit status

Signed-off-by: Chanho Park &lt;chanho61.park@samsung.com&gt;
Link: https://lore.kernel.org/r/20230831075247.137501-1-chanho61.park@samsung.com
Signed-off-by: Michal Simek &lt;michal.simek@amd.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fpga: Migrate CONFIG_MAX_FPGA_DEVICES to Kconfig</title>
<updated>2023-01-20T17:27:06+00:00</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2023-01-10T16:19:37+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=8fe042be9aaef8898cf2a0de44d679b41d81da67'/>
<id>8fe042be9aaef8898cf2a0de44d679b41d81da67</id>
<content type='text'>
This is always defined to 5, so use that as the default.

Cc: Michal Simek &lt;michal.simek@amd.com&gt;
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
Reviewed-by: Michal Simek &lt;michal.simek@amd.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is always defined to 5, so use that as the default.

Cc: Michal Simek &lt;michal.simek@amd.com&gt;
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
Reviewed-by: Michal Simek &lt;michal.simek@amd.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fpga: zynqmp: support loading encrypted bitfiles</title>
<updated>2022-07-26T07:34:21+00:00</updated>
<author>
<name>Adrian Fiergolski</name>
<email>adrian.fiergolski@fastree3d.com</email>
</author>
<published>2022-07-22T14:16:14+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=b524f8fb1e94a8e649ba06a7cb87e6dcaa96ebc3'/>
<id>b524f8fb1e94a8e649ba06a7cb87e6dcaa96ebc3</id>
<content type='text'>
Add supporting new compatible string "u-boot,zynqmp-fpga-enc" to
handle loading encrypted bitfiles.

This feature requires encrypted FSBL, as according to UG1085:
"The CSU automatically locks out the AES key, stored in either BBRAM
 or eFUSEs, as a key source to the AES engine if the FSBL is not
 encrypted. This prevents using the BBRAM or eFUSE as the key source
 to the AES engine during run-time applications."

Signed-off-by: Adrian Fiergolski &lt;adrian.fiergolski@fastree3d.com&gt;
Co-developed-by: Oleksandr Suvorov &lt;oleksandr.suvorov@foundries.io&gt;
Signed-off-by: Oleksandr Suvorov &lt;oleksandr.suvorov@foundries.io&gt;
Tested-by: Adrian Fiergolski &lt;adrian.fiergolski@fastree3d.com&gt;
Link: https://lore.kernel.org/r/20220722141614.297383-14-oleksandr.suvorov@foundries.io
Signed-off-by: Michal Simek &lt;michal.simek@amd.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add supporting new compatible string "u-boot,zynqmp-fpga-enc" to
handle loading encrypted bitfiles.

This feature requires encrypted FSBL, as according to UG1085:
"The CSU automatically locks out the AES key, stored in either BBRAM
 or eFUSEs, as a key source to the AES engine if the FSBL is not
 encrypted. This prevents using the BBRAM or eFUSE as the key source
 to the AES engine during run-time applications."

Signed-off-by: Adrian Fiergolski &lt;adrian.fiergolski@fastree3d.com&gt;
Co-developed-by: Oleksandr Suvorov &lt;oleksandr.suvorov@foundries.io&gt;
Signed-off-by: Oleksandr Suvorov &lt;oleksandr.suvorov@foundries.io&gt;
Tested-by: Adrian Fiergolski &lt;adrian.fiergolski@fastree3d.com&gt;
Link: https://lore.kernel.org/r/20220722141614.297383-14-oleksandr.suvorov@foundries.io
Signed-off-by: Michal Simek &lt;michal.simek@amd.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fpga: add fpga_compatible2flag</title>
<updated>2022-07-26T07:34:21+00:00</updated>
<author>
<name>Oleksandr Suvorov</name>
<email>oleksandr.suvorov@foundries.io</email>
</author>
<published>2022-07-22T14:16:08+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=2c60514d9aecf7fbbbe3c4cb3a4a4acc421e5239'/>
<id>2c60514d9aecf7fbbbe3c4cb3a4a4acc421e5239</id>
<content type='text'>
Add a "compatible" string to binary flag converter, which uses
a callback str2flag() of given FPGA driver if available.

Signed-off-by: Oleksandr Suvorov &lt;oleksandr.suvorov@foundries.io&gt;
Tested-by: Ricardo Salveti &lt;ricardo@foundries.io&gt;
Tested-by: Adrian Fiergolski &lt;adrian.fiergolski@fastree3d.com&gt;
Link: https://lore.kernel.org/r/20220722141614.297383-8-oleksandr.suvorov@foundries.io
Signed-off-by: Michal Simek &lt;michal.simek@amd.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a "compatible" string to binary flag converter, which uses
a callback str2flag() of given FPGA driver if available.

Signed-off-by: Oleksandr Suvorov &lt;oleksandr.suvorov@foundries.io&gt;
Tested-by: Ricardo Salveti &lt;ricardo@foundries.io&gt;
Tested-by: Adrian Fiergolski &lt;adrian.fiergolski@fastree3d.com&gt;
Link: https://lore.kernel.org/r/20220722141614.297383-8-oleksandr.suvorov@foundries.io
Signed-off-by: Michal Simek &lt;michal.simek@amd.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fpga: pass compatible flags to fpga_load()</title>
<updated>2022-07-26T07:34:21+00:00</updated>
<author>
<name>Oleksandr Suvorov</name>
<email>oleksandr.suvorov@foundries.io</email>
</author>
<published>2022-07-22T14:16:07+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=282eed50ecb73c20dd35bf3ea7a579e79b20cd54'/>
<id>282eed50ecb73c20dd35bf3ea7a579e79b20cd54</id>
<content type='text'>
These flags may be used to check whether an FPGA driver is able to
load a particular FPGA bitstream image.

Signed-off-by: Oleksandr Suvorov &lt;oleksandr.suvorov@foundries.io&gt;
Tested-by: Ricardo Salveti &lt;ricardo@foundries.io&gt;
Tested-by: Adrian Fiergolski &lt;adrian.fiergolski@fastree3d.com&gt;
Link: https://lore.kernel.org/r/20220722141614.297383-7-oleksandr.suvorov@foundries.io
Signed-off-by: Michal Simek &lt;michal.simek@amd.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These flags may be used to check whether an FPGA driver is able to
load a particular FPGA bitstream image.

Signed-off-by: Oleksandr Suvorov &lt;oleksandr.suvorov@foundries.io&gt;
Tested-by: Ricardo Salveti &lt;ricardo@foundries.io&gt;
Tested-by: Adrian Fiergolski &lt;adrian.fiergolski@fastree3d.com&gt;
Link: https://lore.kernel.org/r/20220722141614.297383-7-oleksandr.suvorov@foundries.io
Signed-off-by: Michal Simek &lt;michal.simek@amd.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd: fpga: Change return value to avoid printing usage text</title>
<updated>2019-07-30T08:21:16+00:00</updated>
<author>
<name>Alexander Dahl</name>
<email>ada@thorsis.com</email>
</author>
<published>2019-06-28T12:41:24+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=5a4675a9171785475b49eb8ad0778dc28a6d8746'/>
<id>5a4675a9171785475b49eb8ad0778dc28a6d8746</id>
<content type='text'>
In cmd/fpga.c the commands should return enum command_ret_t, e.g.
CMD_RET_USAGE, CMD_RET_SUCCESS, or CMD_RET_FAILURE. What they actually
do is passing a return value from different 'fpga_' functions.

Passing on a return value of -1 from a called function leads to printing
out usage text. In case of actually correct usage with correctly
specified parameters but some fail at runtime printing out that usage
text is distracting.

The reason is most 'fpga_' functions return either FPGA_SUCCESS or
FPGA_FAIL, the latter was equal to -1 which is the same value as
CMD_RET_USAGE. So just passing on FPGA_FAIL lead to printing out usage.

We should only return CMD_RET_USAGE in cases, where the user sent wrong
input. Every other case should return CMD_RET_SUCCESS or
CMD_RET_FAILURE, and not simply pass an error code.

Simply changing FPGA_FAIL from -1 to 1 gets the job done.

Suggested-by: Michal Simek &lt;michal.simek@xilinx.com&gt;
Signed-off-by: Alexander Dahl &lt;ada@thorsis.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In cmd/fpga.c the commands should return enum command_ret_t, e.g.
CMD_RET_USAGE, CMD_RET_SUCCESS, or CMD_RET_FAILURE. What they actually
do is passing a return value from different 'fpga_' functions.

Passing on a return value of -1 from a called function leads to printing
out usage text. In case of actually correct usage with correctly
specified parameters but some fail at runtime printing out that usage
text is distracting.

The reason is most 'fpga_' functions return either FPGA_SUCCESS or
FPGA_FAIL, the latter was equal to -1 which is the same value as
CMD_RET_USAGE. So just passing on FPGA_FAIL lead to printing out usage.

We should only return CMD_RET_USAGE in cases, where the user sent wrong
input. Every other case should return CMD_RET_SUCCESS or
CMD_RET_FAILURE, and not simply pass an error code.

Simply changing FPGA_FAIL from -1 to 1 gets the job done.

Suggested-by: Michal Simek &lt;michal.simek@xilinx.com&gt;
Signed-off-by: Alexander Dahl &lt;ada@thorsis.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fpga: Replace char * with const char * for filename</title>
<updated>2019-04-16T09:51:33+00:00</updated>
<author>
<name>Tien Fong Chee</name>
<email>tien.fong.chee@intel.com</email>
</author>
<published>2019-02-15T07:57:07+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=3003c445b3cb1d1ca7e2304bfa3e2faf2ae02f80'/>
<id>3003c445b3cb1d1ca7e2304bfa3e2faf2ae02f80</id>
<content type='text'>
Ensure the string for filename is always constant, otherwise it can be
corrupted by the writing.

Signed-off-by: Tien Fong Chee &lt;tien.fong.chee@intel.com&gt;
Signed-off-by: Michal Simek &lt;michal.simek@xilinx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Ensure the string for filename is always constant, otherwise it can be
corrupted by the writing.

Signed-off-by: Tien Fong Chee &lt;tien.fong.chee@intel.com&gt;
Signed-off-by: Michal Simek &lt;michal.simek@xilinx.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
