]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
zynq/board.c: Fix building SPL without FPGA support
authorMike Looijmans <mike.looijmans@topic.nl>
Fri, 21 Mar 2014 07:14:46 +0000 (08:14 +0100)
committerMichal Simek <michal.simek@xilinx.com>
Fri, 21 Mar 2014 07:48:19 +0000 (08:48 +0100)
When CONFIG_FPGA is defined but CONFIG_SPL_FPGA is not, the build fails:
board.c: In function 'board_init':
board.c:41:3: error: 'fpga' undeclared (first use in this function)
   fpga = fpga010;

Fix this by expanding the "#if.." around this block to match the other
FPGA checks and don't compile this block when buildign for SPL without
FPGA support.

Tested a bootloader that had CONFIG_FPGA defined without CONFIG_SPL_FPGA,
this now compiles without errors and loading FPGA from u-boot works.

Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
board/xilinx/zynq/board.c

index 037154a5f9bad46204b96f79a2376d348fb60b8f..9a45fe11392428f0a3b27e8d54bd5b2aa42948a3 100644 (file)
@@ -31,7 +31,8 @@ int board_init(void)
 #if defined(CONFIG_ENV_IS_IN_EEPROM) && !defined(CONFIG_SPL_BUILD)
        unsigned char eepromsel = CONFIG_SYS_I2C_MUX_EEPROM_SEL;
 #endif
-#ifdef CONFIG_FPGA
+#if (defined(CONFIG_FPGA) && !defined(CONFIG_SPL_BUILD)) || \
+    (defined(CONFIG_SPL_FPGA_SUPPORT) && defined(CONFIG_SPL_BUILD))
        u32 idcode;
 
        idcode = zynq_slcr_get_idcode();