From: Mike Looijmans Date: Fri, 21 Mar 2014 07:14:46 +0000 (+0100) Subject: zynq/board.c: Fix building SPL without FPGA support X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d468871aca80755d314d106425adafc793dc9e46;p=thirdparty%2Fu-boot.git zynq/board.c: Fix building SPL without FPGA support 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 Signed-off-by: Michal Simek --- diff --git a/board/xilinx/zynq/board.c b/board/xilinx/zynq/board.c index 037154a5f9b..9a45fe11392 100644 --- a/board/xilinx/zynq/board.c +++ b/board/xilinx/zynq/board.c @@ -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();