diff options
| author | Matthias Fuchs <matthias.fuchs@esd-electronics.com> | 2007-12-27 17:12:34 +0100 | 
|---|---|---|
| committer | Wolfgang Denk <wd@denx.de> | 2008-01-09 13:34:20 +0100 | 
| commit | 0133502e39ff89b67c26cb4015e0e7e8d9571184 (patch) | |
| tree | 06bb9976f4f4ef9cb470b57f6271e86c7d09c2fb /common/fpga.c | |
| parent | 95c6bc7d4a3588b452baca610f8c795a83630477 (diff) | |
| download | olio-uboot-2014.01-0133502e39ff89b67c26cb4015e0e7e8d9571184.tar.xz olio-uboot-2014.01-0133502e39ff89b67c26cb4015e0e7e8d9571184.zip | |
Improve configuration of FPGA subsystem
This patch removes the FPGA subsystem configuration through
the CONFIG_FPGA bitmask configuration option.
See README for the new options:
	CONFIG_FPGA,
	CONFIG_FPGA_<vendor>,
	CONFIG_FPGA_<family>
Signed-off-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
Diffstat (limited to 'common/fpga.c')
| -rw-r--r-- | common/fpga.c | 30 | 
1 files changed, 11 insertions, 19 deletions
| diff --git a/common/fpga.c b/common/fpga.c index 2eff239c4..d8b6ae354 100644 --- a/common/fpga.c +++ b/common/fpga.c @@ -67,14 +67,11 @@ static int fpga_dev_info( int devnum );  static void fpga_no_sup( char *fn, char *msg )  {  	if ( fn && msg ) { -		printf( "%s: No support for %s.  CONFIG_FPGA defined as 0x%x.\n", -				fn, msg, CONFIG_FPGA ); +		printf( "%s: No support for %s.\n", fn, msg);  	} else if ( msg ) { -		printf( "No support for %s. CONFIG_FPGA defined as 0x%x.\n", -				msg, CONFIG_FPGA ); +		printf( "No support for %s.\n", msg);  	} else { -		printf( "No FPGA suport!  CONFIG_FPGA defined as 0x%x.\n", -				CONFIG_FPGA ); +		printf( "No FPGA suport!\n");  	}  } @@ -112,11 +109,6 @@ static __attribute__((__const__)) fpga_desc * __attribute__((__const__)) fpga_va  		printf( "%s: Null buffer.\n", fn );  		return (fpga_desc * const)NULL;  	} -	if ( !bsize ) { -		printf( "%s: Null buffer size.\n", fn ); -		return (fpga_desc * const)NULL; -	} -  	return desc;  } @@ -135,7 +127,7 @@ static int fpga_dev_info( int devnum )  		switch ( desc->devtype ) {  		case fpga_xilinx: -#if CONFIG_FPGA & CFG_FPGA_XILINX +#if defined(CONFIG_FPGA_XILINX)  			printf( "Xilinx Device\nDescriptor @ 0x%p\n", desc );  			ret_val = xilinx_info( desc->devdesc );  #else @@ -143,7 +135,7 @@ static int fpga_dev_info( int devnum )  #endif  			break;  		case fpga_altera: -#if CONFIG_FPGA & CFG_FPGA_ALTERA +#if defined(CONFIG_FPGA_ALTERA)  			printf( "Altera Device\nDescriptor @ 0x%p\n", desc );  			ret_val = altera_info( desc->devdesc );  #else @@ -175,14 +167,14 @@ int fpga_reloc( fpga_type devtype, void *desc, ulong reloc_off )  	switch ( devtype ) {  	case fpga_xilinx: -#if CONFIG_FPGA & CFG_FPGA_XILINX +#if defined(CONFIG_FPGA_XILINX)  		ret_val = xilinx_reloc( desc, reloc_off );  #else  		fpga_no_sup( (char *)__FUNCTION__, "Xilinx devices" );  #endif  		break;  	case fpga_altera: -#if CONFIG_FPGA & CFG_FPGA_ALTERA +#if defined(CONFIG_FPGA_ALTERA)  		ret_val = altera_reloc( desc, reloc_off );  #else  		fpga_no_sup( (char *)__FUNCTION__, "Altera devices" ); @@ -268,14 +260,14 @@ int fpga_load( int devnum, void *buf, size_t bsize )  	if ( desc ) {  		switch ( desc->devtype ) {  		case fpga_xilinx: -#if CONFIG_FPGA & CFG_FPGA_XILINX +#if defined(CONFIG_FPGA_XILINX)  			ret_val = xilinx_load( desc->devdesc, buf, bsize );  #else  			fpga_no_sup( (char *)__FUNCTION__, "Xilinx devices" );  #endif  			break;  		case fpga_altera: -#if CONFIG_FPGA & CFG_FPGA_ALTERA +#if defined(CONFIG_FPGA_ALTERA)  			ret_val = altera_load( desc->devdesc, buf, bsize );  #else  			fpga_no_sup( (char *)__FUNCTION__, "Altera devices" ); @@ -301,14 +293,14 @@ int fpga_dump( int devnum, void *buf, size_t bsize )  	if ( desc ) {  		switch ( desc->devtype ) {  		case fpga_xilinx: -#if CONFIG_FPGA & CFG_FPGA_XILINX +#if defined(CONFIG_FPGA_XILINX)  			ret_val = xilinx_dump( desc->devdesc, buf, bsize );  #else  			fpga_no_sup( (char *)__FUNCTION__, "Xilinx devices" );  #endif  			break;  		case fpga_altera: -#if CONFIG_FPGA & CFG_FPGA_ALTERA +#if defined(CONFIG_FPGA_ALTERA)  			ret_val = altera_dump( desc->devdesc, buf, bsize );  #else  			fpga_no_sup( (char *)__FUNCTION__, "Altera devices" ); |