From 8b93a92f6d089c8b3a055c8d89492e73137490b7 Mon Sep 17 00:00:00 2001 From: Goldschmidt Simon Date: Fri, 10 Nov 2017 14:17:41 +0000 Subject: fpga: allow programming fpga from FIT image for all FPGA drivers This drops the limit that fpga is only loaded from FIT images for Xilinx. This is done by moving the 'partial' check from 'common/image.c' to 'drivers/fpga/xilinx.c' (the only driver supporting partial images yet) and supplies a weak default implementation in 'drivers/fpga/fpga.c'. Signed-off-by: Simon Goldschmidt Tested-by: Michal Simek (On zcu102) Signed-off-by: Michal Simek --- drivers/fpga/fpga.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'drivers/fpga/fpga.c') diff --git a/drivers/fpga/fpga.c b/drivers/fpga/fpga.c index e0fb1b4e783..6aead27f162 100644 --- a/drivers/fpga/fpga.c +++ b/drivers/fpga/fpga.c @@ -170,6 +170,15 @@ int fpga_add(fpga_type devtype, void *desc) return devnum; } +/* + * Return 1 if the fpga data is partial. + * This is only required for fpga drivers that support bitstream_type. + */ +int __weak fpga_is_partial_data(int devnum, size_t img_len) +{ + return 0; +} + /* * Convert bitstream data and load into the fpga */ -- cgit v1.2.3