Skip to content
Snippets Groups Projects
Commit 439f6f7e authored by Wolfgang Denk's avatar Wolfgang Denk
Browse files

FPGA: fix support for non-Lattice devices


Commit 3b8ac464 "FPGA: add support for downloading Lattice bitstream"
added support for Lattice devices, but failed to add #ifdef's that are
needed when building for non-Lattice devices, which results in build
failures like these:

Configuring for GEN860T board...
drivers/fpga/libfpga.a(fpga.o): In function `fpga_dev_info':
/home/wd/git/u-boot/work/drivers/fpga/fpga.c:145: undefined reference to `lattice_info'
drivers/fpga/libfpga.a(fpga.o): In function `fpga_dump':
/home/wd/git/u-boot/work/drivers/fpga/fpga.c:269: undefined reference to `lattice_dump'
drivers/fpga/libfpga.a(fpga.o): In function `fpga_load':
/home/wd/git/u-boot/work/drivers/fpga/fpga.c:233: undefined reference to `lattice_load'
make: *** [u-boot] Error 1

Add the missing code.

Signed-off-by: default avatarWolfgang Denk <wd@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
parent cacc342d
No related merge requests found
...@@ -141,8 +141,12 @@ static int fpga_dev_info( int devnum ) ...@@ -141,8 +141,12 @@ static int fpga_dev_info( int devnum )
#endif #endif
break; break;
case fpga_lattice: case fpga_lattice:
#if defined(CONFIG_FPGA_LATTICE)
printf("Lattice Device\nDescriptor @ 0x%p\n", desc); printf("Lattice Device\nDescriptor @ 0x%p\n", desc);
ret_val = lattice_info(desc->devdesc); ret_val = lattice_info(desc->devdesc);
#else
fpga_no_sup( (char *)__FUNCTION__, "Lattice devices" );
#endif
break; break;
default: default:
printf( "%s: Invalid or unsupported device type %d\n", printf( "%s: Invalid or unsupported device type %d\n",
...@@ -230,7 +234,11 @@ int fpga_load( int devnum, void *buf, size_t bsize ) ...@@ -230,7 +234,11 @@ int fpga_load( int devnum, void *buf, size_t bsize )
#endif #endif
break; break;
case fpga_lattice: case fpga_lattice:
#if defined(CONFIG_FPGA_LATTICE)
ret_val = lattice_load(desc->devdesc, buf, bsize); ret_val = lattice_load(desc->devdesc, buf, bsize);
#else
fpga_no_sup( (char *)__FUNCTION__, "Lattice devices" );
#endif
break; break;
default: default:
printf( "%s: Invalid or unsupported device type %d\n", printf( "%s: Invalid or unsupported device type %d\n",
...@@ -266,7 +274,11 @@ int fpga_dump( int devnum, void *buf, size_t bsize ) ...@@ -266,7 +274,11 @@ int fpga_dump( int devnum, void *buf, size_t bsize )
#endif #endif
break; break;
case fpga_lattice: case fpga_lattice:
#if defined(CONFIG_FPGA_LATTICE)
ret_val = lattice_dump(desc->devdesc, buf, bsize); ret_val = lattice_dump(desc->devdesc, buf, bsize);
#else
fpga_no_sup( (char *)__FUNCTION__, "Lattice devices" );
#endif
break; break;
default: default:
printf( "%s: Invalid or unsupported device type %d\n", printf( "%s: Invalid or unsupported device type %d\n",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment