summaryrefslogtreecommitdiffstats
path: root/drivers/firmware/zynqmp-fpga.c
Commit message (Collapse)AuthorAgeFilesLines
* firmware: zynqmp-fpga: drop example bin format headerMichael Tretter2019-12-111-59/+62
| | | | | | | | | | | | | | | | | | Avoid the example bitstream header to validate the bitstream that should be loaded into the FPGA. The header is mostly 0xFFFFFFFF with a few special values at a certain offsets and can be better described with the offsets and their magic values. As a drive by, this fixes/removes a broken check in the header validation. The != operator has a higher precedence than ?: and this check should have had parenthesis around the ?: expression: bin_header[i] != (byte_order == XILINX_BYTE_ORDER_BIT) ? bin_format[i] : __swab32(bin_format[i]) Signed-off-by: Michael Tretter <m.tretter@pengutronix.de> Reviewed-by: Thomas Haemmerle <thomas.haemmerle@wolfvision.net> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* firmware: zynqmp-fpga: fix comparison between pointer and integerLucas Stach2019-12-021-1/+1
| | | | | Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* firmware: zynqmp-fpga: print Xilinx bitstream headerMichael Tretter2019-10-281-0/+51
| | | | | | | | | | | | | The bitstream header has 5 fields, that start with a char for the type. Four fields have a big-ending length and a null-terminated string for the design name, the part number, and the date and time of creation. The last field is a big-endian 32 bit unsigned int for the size of the bitstream. Print this info when loading the bitstream. Signed-off-by: Michael Tretter <m.tretter@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* firmware: zynqmp-fpga: introduce driver to load bitstream to FPGAThomas Haemmerle2019-10-281-0/+359
The driver provides functionalities to check and load a bitstream to FPGA. A boolean parameter to check if FPGA is already programmed is added. Signed-off-by: Thomas Haemmerle <thomas.haemmerle@wolfvision.net> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>