diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/altera.h | 17 | ||||
| -rw-r--r-- | include/configs/M54455EVB.h | 2 | ||||
| -rw-r--r-- | include/configs/MERGERBOX.h | 2 | ||||
| -rw-r--r-- | include/configs/MVBC_P.h | 2 | ||||
| -rw-r--r-- | include/configs/MVBLM7.h | 2 | ||||
| -rw-r--r-- | include/configs/MVSMR.h | 2 | ||||
| -rw-r--r-- | include/configs/omap3_mvblx.h | 2 | ||||
| -rw-r--r-- | include/configs/zynq.h | 39 | ||||
| -rw-r--r-- | include/fpga.h | 13 | ||||
| -rw-r--r-- | include/lattice.h | 3 | ||||
| -rw-r--r-- | include/netdev.h | 2 | ||||
| -rw-r--r-- | include/xilinx.h | 25 | ||||
| -rw-r--r-- | include/zynqpl.h | 59 | 
13 files changed, 107 insertions, 63 deletions
| diff --git a/include/altera.h b/include/altera.h index 7a2bece03..6aad5ee86 100644 --- a/include/altera.h +++ b/include/altera.h @@ -27,23 +27,6 @@  #ifndef _ALTERA_H_  #define _ALTERA_H_ -/* Altera Model definitions - *********************************************************************/ -#define CONFIG_SYS_ACEX1K		CONFIG_SYS_FPGA_DEV( 0x1 ) -#define CONFIG_SYS_CYCLON2		CONFIG_SYS_FPGA_DEV( 0x2 ) -#define CONFIG_SYS_STRATIX_II		CONFIG_SYS_FPGA_DEV( 0x4 ) - -#define CONFIG_SYS_ALTERA_ACEX1K	(CONFIG_SYS_FPGA_ALTERA | CONFIG_SYS_ACEX1K) -#define CONFIG_SYS_ALTERA_CYCLON2	(CONFIG_SYS_FPGA_ALTERA | CONFIG_SYS_CYCLON2) -#define CONFIG_SYS_ALTERA_STRATIX_II	(CONFIG_SYS_FPGA_ALTERA | CONFIG_SYS_STRATIX_II) -/* Add new models here */ - -/* Altera Interface definitions - *********************************************************************/ -#define CONFIG_SYS_ALTERA_IF_PS	CONFIG_SYS_FPGA_IF( 0x1 )	/* passive serial */ -#define CONFIG_SYS_ALTERA_IF_FPP	CONFIG_SYS_FPGA_IF( 0x2 )	/* fast passive parallel */ -/* Add new interfaces here */ -  typedef enum {				/* typedef Altera_iface */  	min_altera_iface_type,		/* insert all new types after this */  	passive_serial,			/* serial data and external clock */ diff --git a/include/configs/M54455EVB.h b/include/configs/M54455EVB.h index 1bc2c5a0a..536b7556f 100644 --- a/include/configs/M54455EVB.h +++ b/include/configs/M54455EVB.h @@ -238,7 +238,7 @@  /* FPGA - Spartan 2 */  /* experiment -#define CONFIG_FPGA		CONFIG_SYS_SPARTAN3 +#define CONFIG_FPGA  #define CONFIG_FPGA_COUNT	1  #define CONFIG_SYS_FPGA_PROG_FEEDBACK  #define CONFIG_SYS_FPGA_CHECK_CTRLC diff --git a/include/configs/MERGERBOX.h b/include/configs/MERGERBOX.h index c296e3cf0..30fb6c2ff 100644 --- a/include/configs/MERGERBOX.h +++ b/include/configs/MERGERBOX.h @@ -606,7 +606,7 @@   * FPGA   */  #define CONFIG_FPGA_COUNT	1 -#define CONFIG_FPGA		CONFIG_SYS_ALTERA_CYCLON2 +#define CONFIG_FPGA  #define CONFIG_FPGA_ALTERA  #define CONFIG_FPGA_CYCLON2 diff --git a/include/configs/MVBC_P.h b/include/configs/MVBC_P.h index 6850965fb..72714688e 100644 --- a/include/configs/MVBC_P.h +++ b/include/configs/MVBC_P.h @@ -310,7 +310,7 @@  #undef FPGA_DEBUG  #undef CONFIG_SYS_FPGA_PROG_FEEDBACK -#define CONFIG_FPGA		CONFIG_SYS_ALTERA_CYCLON2 +#define CONFIG_FPGA  #define CONFIG_FPGA_ALTERA	1  #define CONFIG_FPGA_CYCLON2	1  #define CONFIG_FPGA_COUNT	1 diff --git a/include/configs/MVBLM7.h b/include/configs/MVBLM7.h index a99ad3c44..a9c00acc9 100644 --- a/include/configs/MVBLM7.h +++ b/include/configs/MVBLM7.h @@ -499,7 +499,7 @@  	""  #define CONFIG_FPGA_COUNT	1 -#define CONFIG_FPGA		CONFIG_SYS_ALTERA_CYCLON2 +#define CONFIG_FPGA  #define CONFIG_FPGA_ALTERA  #define CONFIG_FPGA_CYCLON2 diff --git a/include/configs/MVSMR.h b/include/configs/MVSMR.h index bf2f44ec6..5d2ff1480 100644 --- a/include/configs/MVSMR.h +++ b/include/configs/MVSMR.h @@ -280,7 +280,7 @@  #undef FPGA_DEBUG  #undef CONFIG_SYS_FPGA_PROG_FEEDBACK -#define CONFIG_FPGA		CONFIG_SYS_XILINX_SPARTAN2 +#define CONFIG_FPGA  #define CONFIG_FPGA_XILINX	1  #define CONFIG_FPGA_SPARTAN2	1  #define CONFIG_FPGA_COUNT	1 diff --git a/include/configs/omap3_mvblx.h b/include/configs/omap3_mvblx.h index 376a3d031..f9adc0170 100644 --- a/include/configs/omap3_mvblx.h +++ b/include/configs/omap3_mvblx.h @@ -273,7 +273,7 @@  #endif /* (CONFIG_CMD_NET) */  #define CONFIG_FPGA_COUNT	1 -#define CONFIG_FPGA          CONFIG_SYS_ALTERA_CYCLON2 +#define CONFIG_FPGA  #define CONFIG_FPGA_ALTERA  #define CONFIG_FPGA_CYCLON2  #define CONFIG_SYS_FPGA_PROG_FEEDBACK diff --git a/include/configs/zynq.h b/include/configs/zynq.h index 2989e723e..38f04f642 100644 --- a/include/configs/zynq.h +++ b/include/configs/zynq.h @@ -50,19 +50,50 @@  #define CONFIG_ZYNQ_SERIAL_BAUDRATE0	CONFIG_BAUDRATE  #define CONFIG_ZYNQ_SERIAL_CLOCK0	50000000 -/* SCU timer address is hardcoded */ -#define CONFIG_SCUTIMER_BASEADDR	0xF8F00600 -  /* Ethernet driver */  #define CONFIG_NET_MULTI  #define CONFIG_ZYNQ_GEM -#define CONFIG_ZYNQ_GEM_BASEADDR0	0xE000B000 +#define CONFIG_ZYNQ_GEM0 +#define CONFIG_ZYNQ_GEM_PHY_ADDR0	7 + +#define CONFIG_ZYNQ_SDHCI +#define CONFIG_ZYNQ_SDHCI0 + +/* MMC */ +#if defined(CONFIG_ZYNQ_SDHCI0) || defined(CONFIG_ZYNQ_SDHCI1) +# define CONFIG_MMC +# define CONFIG_GENERIC_MMC +# define CONFIG_SDHCI +# define CONFIG_ZYNQ_SDHCI +# define CONFIG_CMD_MMC +# define CONFIG_CMD_FAT +# define CONFIG_SUPPORT_VFAT +# define CONFIG_CMD_EXT2 +# define CONFIG_DOS_PARTITION +#endif + +#define CONFIG_ZYNQ_I2C0 + +/* I2C */ +#if defined(CONFIG_ZYNQ_I2C0) || defined(CONFIG_ZYNQ_I2C1) +# define CONFIG_CMD_I2C +# define CONFIG_ZYNQ_I2C +# define CONFIG_HARD_I2C +# define CONFIG_SYS_I2C_SPEED		100000 +# define CONFIG_SYS_I2C_SLAVE		1 +#endif  #if defined(CONFIG_ZYNQ_DCC)  # define CONFIG_ARM_DCC  # define CONFIG_CPU_V6 /* Required by CONFIG_ARM_DCC */  #endif +/* Enable the PL to be downloaded */ +#define CONFIG_FPGA +#define CONFIG_FPGA_XILINX +#define CONFIG_FPGA_ZYNQPL +#define CONFIG_CMD_FPGA +  #define CONFIG_BOOTP_SERVERIP  #define CONFIG_BOOTP_BOOTPATH  #define CONFIG_BOOTP_GATEWAY diff --git a/include/fpga.h b/include/fpga.h index 30a4e6a2e..38e9018c9 100644 --- a/include/fpga.h +++ b/include/fpga.h @@ -31,16 +31,6 @@  #define CONFIG_MAX_FPGA_DEVICES		5  #endif -/* CONFIG_FPGA bit assignments */ -#define CONFIG_SYS_FPGA_MAN(x)		(x) -#define CONFIG_SYS_FPGA_DEV(x)		((x) << 8 ) -#define CONFIG_SYS_FPGA_IF(x)		((x) << 16 ) - -/* FPGA Manufacturer bits in CONFIG_FPGA */ -#define CONFIG_SYS_FPGA_XILINX		CONFIG_SYS_FPGA_MAN( 0x1 ) -#define CONFIG_SYS_FPGA_ALTERA		CONFIG_SYS_FPGA_MAN( 0x2 ) - -  /* fpga_xxxx function return value definitions */  #define FPGA_SUCCESS		0  #define FPGA_FAIL		-1 @@ -68,7 +58,10 @@ extern void fpga_init(void);  extern int fpga_add(fpga_type devtype, void *desc);  extern int fpga_count(void);  extern int fpga_load(int devnum, const void *buf, size_t bsize); +extern int fpga_loadbitstream(int devnum, char *fpgadata, size_t size);  extern int fpga_dump(int devnum, const void *buf, size_t bsize);  extern int fpga_info(int devnum); +extern const fpga_desc *const fpga_validate(int devnum, const void *buf, +					    size_t bsize, char *fn);  #endif	/* _FPGA_H_ */ diff --git a/include/lattice.h b/include/lattice.h index 6a2cf93db..49871da22 100644 --- a/include/lattice.h +++ b/include/lattice.h @@ -278,9 +278,6 @@ typedef struct {  	char		*desc;	/* description string */  } Lattice_desc;			/* end, typedef Altera_desc */ -/* Lattice Model Type */ -#define CONFIG_SYS_XP2		CONFIG_SYS_FPGA_DEV(0x1) -  /* Board specific implementation specific function types */  typedef void (*Lattice_jtag_init)(void);  typedef void (*Lattice_jtag_set_tdi)(int v); diff --git a/include/netdev.h b/include/netdev.h index fd3e243c7..516b351eb 100644 --- a/include/netdev.h +++ b/include/netdev.h @@ -104,7 +104,7 @@ int xilinx_emaclite_initialize(bd_t *bis, unsigned long base_addr,  							int txpp, int rxpp);  int xilinx_ll_temac_eth_init(bd_t *bis, unsigned long base_addr, int flags,  						unsigned long ctrl_addr); -int zynq_gem_initialize(bd_t *bis, int base_addr); +int zynq_gem_initialize(bd_t *bis, int base_addr, int phy_addr, u32 emio);  /*   * As long as the Xilinx xps_ll_temac ethernet driver has not its own interface   * exported by a public hader file, we need a global definition at this point. diff --git a/include/xilinx.h b/include/xilinx.h index 5f25b7a8a..9a64771c6 100644 --- a/include/xilinx.h +++ b/include/xilinx.h @@ -27,28 +27,6 @@  #ifndef _XILINX_H_  #define _XILINX_H_ -/* Xilinx Model definitions - *********************************************************************/ -#define CONFIG_SYS_SPARTAN2			CONFIG_SYS_FPGA_DEV( 0x1 ) -#define CONFIG_SYS_VIRTEX_E			CONFIG_SYS_FPGA_DEV( 0x2 ) -#define CONFIG_SYS_VIRTEX2			CONFIG_SYS_FPGA_DEV( 0x4 ) -#define CONFIG_SYS_SPARTAN3			CONFIG_SYS_FPGA_DEV( 0x8 ) -#define CONFIG_SYS_XILINX_SPARTAN2	(CONFIG_SYS_FPGA_XILINX | CONFIG_SYS_SPARTAN2) -#define CONFIG_SYS_XILINX_VIRTEX_E	(CONFIG_SYS_FPGA_XILINX | CONFIG_SYS_VIRTEX_E) -#define CONFIG_SYS_XILINX_VIRTEX2	(CONFIG_SYS_FPGA_XILINX | CONFIG_SYS_VIRTEX2) -#define CONFIG_SYS_XILINX_SPARTAN3	(CONFIG_SYS_FPGA_XILINX | CONFIG_SYS_SPARTAN3) -/* XXX - Add new models here */ - - -/* Xilinx Interface definitions - *********************************************************************/ -#define CONFIG_SYS_XILINX_IF_SS	CONFIG_SYS_FPGA_IF( 0x1 )	/* slave serial		*/ -#define CONFIG_SYS_XILINX_IF_MS	CONFIG_SYS_FPGA_IF( 0x2 )	/* master serial	*/ -#define CONFIG_SYS_XILINX_IF_SP	CONFIG_SYS_FPGA_IF( 0x4 )	/* slave parallel	*/ -#define CONFIG_SYS_XILINX_IF_JTAG	CONFIG_SYS_FPGA_IF( 0x8 )	/* jtag			*/ -#define CONFIG_SYS_XILINX_IF_MSM	CONFIG_SYS_FPGA_IF( 0x10 )	/* master selectmap	*/ -#define CONFIG_SYS_XILINX_IF_SSM	CONFIG_SYS_FPGA_IF( 0x20 )	/* slave selectmap	*/ -  /* Xilinx types   *********************************************************************/  typedef enum {			/* typedef Xilinx_iface */ @@ -59,6 +37,7 @@ typedef enum {			/* typedef Xilinx_iface */  	jtag_mode,		/* jtag/tap serial (not used ) */  	master_selectmap,	/* master SelectMap (virtex2)           */  	slave_selectmap,	/* slave SelectMap (virtex2)            */ +	devcfg,			/* devcfg interface (zynq) */  	max_xilinx_iface_type	/* insert all new types before this */  } Xilinx_iface;			/* end, typedef Xilinx_iface */ @@ -68,6 +47,7 @@ typedef enum {			/* typedef Xilinx_Family */  	Xilinx_VirtexE,		/* Virtex-E Family */  	Xilinx_Virtex2,		/* Virtex2 Family */  	Xilinx_Spartan3,	/* Spartan-III Family */ +	xilinx_zynq,		/* Zynq Family */  	max_xilinx_type		/* insert all new types before this */  } Xilinx_Family;		/* end, typedef Xilinx_Family */ @@ -77,6 +57,7 @@ typedef struct {		/* typedef Xilinx_desc */  	size_t size;		/* bytes of data part can accept */  	void *iface_fns;	/* interface function table */  	int cookie;		/* implementation specific cookie */ +	char *name;		/* device name in bitstream */  } Xilinx_desc;			/* end, typedef Xilinx_desc */  /* Generic Xilinx Functions diff --git a/include/zynqpl.h b/include/zynqpl.h new file mode 100644 index 000000000..0247ef61c --- /dev/null +++ b/include/zynqpl.h @@ -0,0 +1,59 @@ +/* + * (C) Copyright 2012-2013, Xilinx, Michal Simek + * + * (C) Copyright 2012 + * Joe Hershberger <joe.hershberger@ni.com> + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +#ifndef _ZYNQPL_H_ +#define _ZYNQPL_H_ + +#include <xilinx.h> + +extern int zynq_load(Xilinx_desc *desc, const void *image, size_t size); +extern int zynq_dump(Xilinx_desc *desc, const void *buf, size_t bsize); +extern int zynq_info(Xilinx_desc *desc); + +#define XILINX_ZYNQ_7010	0x2 +#define XILINX_ZYNQ_7020	0x7 +#define XILINX_ZYNQ_7030	0xc +#define XILINX_ZYNQ_7045	0x11 + +/* Device Image Sizes */ +#define XILINX_XC7Z010_SIZE	16669920/8 +#define XILINX_XC7Z020_SIZE	32364512/8 +#define XILINX_XC7Z030_SIZE	47839328/8 +#define XILINX_XC7Z045_SIZE	106571232/8 + +/* Descriptor Macros */ +#define XILINX_XC7Z010_DESC(cookie) \ +{ xilinx_zynq, devcfg, XILINX_XC7Z010_SIZE, NULL, cookie, "7z010" } + +#define XILINX_XC7Z020_DESC(cookie) \ +{ xilinx_zynq, devcfg, XILINX_XC7Z020_SIZE, NULL, cookie, "7z020" } + +#define XILINX_XC7Z030_DESC(cookie) \ +{ xilinx_zynq, devcfg, XILINX_XC7Z030_SIZE, NULL, cookie, "7z030" } + +#define XILINX_XC7Z045_DESC(cookie) \ +{ xilinx_zynq, devcfg, XILINX_XC7Z045_SIZE, NULL, cookie, "7z045" } + +#endif /* _ZYNQPL_H_ */ |