aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorGoldschmidt Simon <sgoldschmidt@de.pepperl-fuchs.com>2017-11-10 14:17:41 +0000
committerMichal Simek <michal.simek@xilinx.com>2017-12-14 16:09:39 +0100
commit8b93a92f6d089c8b3a055c8d89492e73137490b7 (patch)
treef5b9827101a6e676faa26f8b81f0378935afe280 /common
parent659208da4703de50826a469cbb38bf6afb938978 (diff)
downloadu-boot-8b93a92f6d089c8b3a055c8d89492e73137490b7.zip
u-boot-8b93a92f6d089c8b3a055c8d89492e73137490b7.tar.gz
u-boot-8b93a92f6d089c8b3a055c8d89492e73137490b7.tar.bz2
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 <sgoldschmidt@de.pepperl-fuchs.com> Tested-by: Michal Simek <michal.simek@xilinx.com> (On zcu102) Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'common')
-rw-r--r--common/bootm.c2
-rw-r--r--common/image.c6
2 files changed, 3 insertions, 5 deletions
diff --git a/common/bootm.c b/common/bootm.c
index 9493a30..adb1213 100644
--- a/common/bootm.c
+++ b/common/bootm.c
@@ -248,7 +248,7 @@ int bootm_find_images(int flag, int argc, char * const argv[])
#endif
#if IMAGE_ENABLE_FIT
-#if defined(CONFIG_FPGA) && defined(CONFIG_FPGA_XILINX)
+#if defined(CONFIG_FPGA)
/* find bitstreams */
ret = boot_get_fpga(argc, argv, &images, IH_ARCH_DEFAULT,
NULL, NULL);
diff --git a/common/image.c b/common/image.c
index 4bcf6b3..96c5f58 100644
--- a/common/image.c
+++ b/common/image.c
@@ -1215,7 +1215,7 @@ int boot_get_setup(bootm_headers_t *images, uint8_t arch,
}
#if IMAGE_ENABLE_FIT
-#if defined(CONFIG_FPGA) && defined(CONFIG_FPGA_XILINX)
+#if defined(CONFIG_FPGA)
int boot_get_fpga(int argc, char * const argv[], bootm_headers_t *images,
uint8_t arch, const ulong *ld_start, ulong * const ld_len)
{
@@ -1226,8 +1226,6 @@ int boot_get_fpga(int argc, char * const argv[], bootm_headers_t *images,
const char *uname, *name;
int err;
int devnum = 0; /* TODO support multi fpga platforms */
- const fpga_desc * const desc = fpga_get_desc(devnum);
- xilinx_desc *desc_xilinx = desc->devdesc;
/* Check to see if the images struct has a FIT configuration */
if (!genimg_has_config(images)) {
@@ -1272,7 +1270,7 @@ int boot_get_fpga(int argc, char * const argv[], bootm_headers_t *images,
return fit_img_result;
}
- if (img_len >= desc_xilinx->size) {
+ if (!fpga_is_partial_data(devnum, img_len)) {
name = "full";
err = fpga_loadbitstream(devnum, (char *)img_data,
img_len, BIT_FULL);