diff options
Diffstat (limited to 'include')
198 files changed, 4204 insertions, 2015 deletions
| diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h index c19e16cd2..23c964940 100644 --- a/include/asm-generic/gpio.h +++ b/include/asm-generic/gpio.h @@ -94,4 +94,13 @@ int gpio_get_value(unsigned gpio);   */  int gpio_set_value(unsigned gpio, int value); +/** + * Request a gpio. This should be called before any of the other functions + * are used on this gpio. + * + * @param gp	GPIO number + * @param label	User label for this GPIO + * @return 0 if ok, -1 on error + */ +int gpio_request(unsigned gpio, const char *label);  #endif	/* _ASM_GENERIC_GPIO_H_ */ diff --git a/include/bootcount.h b/include/bootcount.h new file mode 100644 index 000000000..3ec1aeccf --- /dev/null +++ b/include/bootcount.h @@ -0,0 +1,51 @@ +/* + * (C) Copyright 2012 + * Stefan Roese, DENX Software Engineering, sr@denx.de. + * + * 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. + */ + +#include <common.h> +#include <asm/io.h> +#include <asm/byteorder.h> + +#if !defined(CONFIG_SYS_BOOTCOUNT_LE) && !defined(CONFIG_SYS_BOOTCOUNT_BE) +# if __BYTE_ORDER == __LITTLE_ENDIAN +#  define CONFIG_SYS_BOOTCOUNT_LE +# else +#  define CONFIG_SYS_BOOTCOUNT_BE +# endif +#endif + +#ifdef CONFIG_SYS_BOOTCOUNT_LE +static inline void raw_bootcount_store(volatile u32 *addr, u32 data) +{ +	out_le32(addr, data); +} + +static inline u32 raw_bootcount_load(volatile u32 *addr) +{ +	return in_le32(addr); +} +#else +static inline void raw_bootcount_store(volatile u32 *addr, u32 data) +{ +	out_be32(addr, data); +} + +static inline u32 raw_bootcount_load(volatile u32 *addr) +{ +	return in_be32(addr); +} +#endif diff --git a/include/configs/M5373EVB.h b/include/configs/M5373EVB.h index 0d09f0ec6..45d106455 100644 --- a/include/configs/M5373EVB.h +++ b/include/configs/M5373EVB.h @@ -1,7 +1,7 @@  /*   * Configuation settings for the Freescale MCF5373 FireEngine board.   * - * Copyright (C) 2004-2007 Freescale Semiconductor, Inc. + * Copyright (C) 2004-2007, 2012 Freescale Semiconductor, Inc.   * TsiChung Liew (Tsi-Chung.Liew@freescale.com)   *   * See file CREDITS for list of people who contributed to this @@ -59,7 +59,7 @@  #define CONFIG_CMD_PING  #define CONFIG_CMD_REGINFO -#ifdef NANDFLASH_SIZE +#ifdef CONFIG_NANDFLASH_SIZE  #      define CONFIG_CMD_NAND  #endif @@ -208,7 +208,7 @@  #	define CONFIG_SYS_FLASH_PROTECTION	/* "Real" (hardware) sectors protection */  #endif -#ifdef NANDFLASH_SIZE +#ifdef CONFIG_NANDFLASH_SIZE  #	define CONFIG_SYS_MAX_NAND_DEVICE	1  #	define CONFIG_SYS_NAND_BASE		CONFIG_SYS_CS2_BASE  #	define CONFIG_SYS_NAND_SIZE		1 @@ -264,9 +264,9 @@  #define CONFIG_SYS_CS1_MASK		0x001f0001  #define CONFIG_SYS_CS1_CTRL		0x002A3780 -#ifdef NANDFLASH_SIZE +#ifdef CONFIG_NANDFLASH_SIZE  #define CONFIG_SYS_CS2_BASE		0x20000000 -#define CONFIG_SYS_CS2_MASK		((NANDFLASH_SIZE << 20) | 1) +#define CONFIG_SYS_CS2_MASK		((CONFIG_NANDFLASH_SIZE << 20) | 1)  #define CONFIG_SYS_CS2_CTRL		0x00001f60  #endif diff --git a/include/configs/MPC8308RDB.h b/include/configs/MPC8308RDB.h index 7f2761c53..2d48dde80 100644 --- a/include/configs/MPC8308RDB.h +++ b/include/configs/MPC8308RDB.h @@ -37,6 +37,24 @@  #define CONFIG_MISC_INIT_R +/* new uImage format support */ +#define CONFIG_FIT			1 +#define CONFIG_FIT_VERBOSE		1 + +#define CONFIG_MMC     1 + +#ifdef CONFIG_MMC +#define CONFIG_FSL_ESDHC +#define CONFIG_SYS_FSL_ESDHC_ADDR	CONFIG_SYS_MPC83xx_ESDHC_ADDR +#define CONFIG_SYS_FSL_ERRATUM_ESDHC111 +#define CONFIG_SYS_FSL_ESDHC_USE_PIO + +#define CONFIG_CMD_MMC +#define CONFIG_GENERIC_MMC +#define CONFIG_CMD_FAT +#define CONFIG_DOS_PARTITION +#endif +  /*   * On-board devices   * @@ -340,6 +358,19 @@  #define CONFIG_SYS_I2C_OFFSET	0x3000  #define CONFIG_SYS_I2C2_OFFSET	0x3100 +/* + * SPI on header J8 + * + * WARNING: enabling this will break TSEC2 (connected to the Vitesse switch) + * due to a pinmux conflict between GPIO9 (SPI chip select )and the TSEC2 pins. + */ +#ifdef CONFIG_MPC8XXX_SPI +#define CONFIG_CMD_SPI +#define CONFIG_USE_SPIFLASH +#define CONFIG_SPI_FLASH +#define CONFIG_SPI_FLASH_SPANSION +#define CONFIG_CMD_SF +#endif  /*   * Board info - revision and where boot from diff --git a/include/configs/SX1.h b/include/configs/SX1.h index ea0936899..93d031ca8 100644 --- a/include/configs/SX1.h +++ b/include/configs/SX1.h @@ -35,8 +35,6 @@  /* input clock of PLL */  #define CONFIG_SYS_CLK_FREQ	12000000	/* the SX1 has 12MHz input clock */ -#undef CONFIG_USE_IRQ			/* we don't need IRQ/FIQ stuff */ -  #define CONFIG_MISC_INIT_R  #define CONFIG_CMDLINE_TAG	 1	/* enable passing of ATAGs	*/ @@ -140,17 +138,6 @@  #define CONFIG_SYS_HZ		1000  /*----------------------------------------------------------------------- - * Stack sizes - * - * The stack sizes are set up in start.S using the settings below - */ -#define CONFIG_STACKSIZE	(128*1024)	/* regular stack */ -#ifdef CONFIG_USE_IRQ -#define CONFIG_STACKSIZE_IRQ	(4*1024)	/* IRQ stack */ -#define CONFIG_STACKSIZE_FIQ	(4*1024)	/* FIQ stack */ -#endif - -/*-----------------------------------------------------------------------   * Physical Memory Map   */  #define CONFIG_NR_DRAM_BANKS	1	   /* we have 1 bank of DRAM */ diff --git a/include/configs/VCMA9.h b/include/configs/VCMA9.h index 6ad4a6bef..06adc947b 100644 --- a/include/configs/VCMA9.h +++ b/include/configs/VCMA9.h @@ -49,8 +49,6 @@  /* input clock of PLL (VCMA9 has 12MHz input clock) */  #define CONFIG_SYS_CLK_FREQ	12000000 -#undef CONFIG_USE_IRQ		/* we don't need IRQ/FIQ stuff */ -  #define CONFIG_CMDLINE_TAG	/* enable passing of ATAGs */  #define CONFIG_SETUP_MEMORY_TAGS  #define CONFIG_INITRD_TAG @@ -191,16 +189,6 @@  #define CONFIG_IDENT_STRING "\n(c) 2003 - 2011 by MPL AG Switzerland, " \  			    "MEV-10080-001 " VERSION_TAG -/* - * Stack sizes - * The stack sizes are set up in start.S using the settings below - */ -#define CONFIG_STACKSIZE	(128 * 1024)	/* regular stack */ -#ifdef CONFIG_USE_IRQ -#define CONFIG_STACKSIZE_IRQ	(4 * 1024)	/* IRQ stack */ -#define CONFIG_STACKSIZE_FIQ	(4 * 1024)	/* FIQ stack */ -#endif -  /* Physical Memory Map */  #define CONFIG_NR_DRAM_BANKS	1		/* we have 1 bank of DRAM */  #define PHYS_SDRAM_1		0x30000000	/* SDRAM Bank #1 */ diff --git a/include/configs/a320evb.h b/include/configs/a320evb.h index a2b347a82..5a8d01009 100644 --- a/include/configs/a320evb.h +++ b/include/configs/a320evb.h @@ -39,8 +39,6 @@  /*   * CPU and Board Configuration Options   */ -#undef CONFIG_USE_IRQ		/* we don't need IRQ/FIQ stuff */ -  #undef CONFIG_SKIP_LOWLEVEL_INIT  /* @@ -105,17 +103,6 @@  #define CONFIG_SYS_BARGSIZE	CONFIG_SYS_CBSIZE  /* - * Stack sizes - * - * The stack sizes are set up in start.S using the settings below - */ -#define CONFIG_STACKSIZE	(128 * 1024)	/* regular stack */ -#ifdef CONFIG_USE_IRQ -#define CONFIG_STACKSIZE_IRQ	(4 * 1024)	/* IRQ stack */ -#define CONFIG_STACKSIZE_FIQ	(4 * 1024)	/* FIQ stack */ -#endif - -/*   * Size of malloc() pool   */  #define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + 128 * 1024) diff --git a/include/configs/actux1.h b/include/configs/actux1.h index bdd2239d8..de29eb9ef 100644 --- a/include/configs/actux1.h +++ b/include/configs/actux1.h @@ -105,12 +105,6 @@  					  115200, 230400 }  #define CONFIG_SERIAL_RTS_ACTIVE	1 -/* - * Stack sizes - * The stack sizes are set up in start.S using the settings below - */ -#define CONFIG_STACKSIZE		(128*1024)	/* regular stack */ -  /* Expansion bus settings */  #define CONFIG_SYS_EXP_CS0			0xbd113842 diff --git a/include/configs/actux2.h b/include/configs/actux2.h index c55571c12..d2cc26c2a 100644 --- a/include/configs/actux2.h +++ b/include/configs/actux2.h @@ -98,12 +98,6 @@  					  115200, 230400 }  #define CONFIG_SERIAL_RTS_ACTIVE	1 -/* - * Stack sizes - * The stack sizes are set up in start.S using the settings below - */ -#define CONFIG_STACKSIZE		(128*1024)	/* regular stack */ -  /* Expansion bus settings */  #define CONFIG_SYS_EXP_CS0			0xbd113042 diff --git a/include/configs/actux3.h b/include/configs/actux3.h index 78ee2b598..7165db09b 100644 --- a/include/configs/actux3.h +++ b/include/configs/actux3.h @@ -96,13 +96,6 @@  					  115200, 230400 }  #define CONFIG_SERIAL_RTS_ACTIVE	1 -/* - * Stack sizes - * - * The stack sizes are set up in start.S using the settings below - */ -#define CONFIG_STACKSIZE		(128*1024)	/* regular stack */ -  /* Expansion bus settings */  #define CONFIG_SYS_EXP_CS0			0xbd113442 diff --git a/include/configs/actux4.h b/include/configs/actux4.h index c1105df59..c34dca2c2 100644 --- a/include/configs/actux4.h +++ b/include/configs/actux4.h @@ -103,12 +103,6 @@  					  115200, 230400 }  #define CONFIG_SERIAL_RTS_ACTIVE	1 -/* - * Stack sizes - * The stack sizes are set up in start.S using the settings below - */ -#define CONFIG_STACKSIZE		(128*1024)	/* regular stack */ -  /* Expansion bus settings */  #define CONFIG_SYS_EXP_CS0			0xbd113003 diff --git a/include/configs/adp-ag101.h b/include/configs/adp-ag101.h index 6bf0addcb..b6e384469 100644 --- a/include/configs/adp-ag101.h +++ b/include/configs/adp-ag101.h @@ -145,13 +145,6 @@  #define CONFIG_SYS_BARGSIZE	CONFIG_SYS_CBSIZE  /* - * Stack sizes - * - * The stack sizes are set up in start.S using the settings below - */ -#define CONFIG_STACKSIZE	(128 * 1024)	/* regular stack */ - -/*   * Size of malloc() pool   */  /* 512kB is suggested, (CONFIG_ENV_SIZE + 128 * 1024) was not enough */ diff --git a/include/configs/adp-ag101p.h b/include/configs/adp-ag101p.h index 747d06100..ef55e3556 100644 --- a/include/configs/adp-ag101p.h +++ b/include/configs/adp-ag101p.h @@ -145,13 +145,6 @@  #define CONFIG_SYS_BARGSIZE	CONFIG_SYS_CBSIZE  /* - * Stack sizes - * - * The stack sizes are set up in start.S using the settings below - */ -#define CONFIG_STACKSIZE	(128 * 1024)	/* regular stack */ - -/*   * Size of malloc() pool   */  /* 512kB is suggested, (CONFIG_ENV_SIZE + 128 * 1024) was not enough */ diff --git a/include/configs/adp-ag102.h b/include/configs/adp-ag102.h index 35f88cc39..eea44db35 100644 --- a/include/configs/adp-ag102.h +++ b/include/configs/adp-ag102.h @@ -219,13 +219,6 @@  #define CONFIG_SYS_BARGSIZE	CONFIG_SYS_CBSIZE  /* - * Stack sizes - * - * The stack sizes are set up in start.S using the settings below - */ -#define CONFIG_STACKSIZE	(128 * 1024)	/* regular stack */ - -/*   * Size of malloc() pool   */  #define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + 128 * 1024) diff --git a/include/configs/afeb9260.h b/include/configs/afeb9260.h index 6715cb4b1..041ca219d 100644 --- a/include/configs/afeb9260.h +++ b/include/configs/afeb9260.h @@ -170,9 +170,4 @@   */  #define CONFIG_SYS_MALLOC_LEN		ROUND(3 * CONFIG_ENV_SIZE + 128*1024, 0x1000) -#define CONFIG_STACKSIZE	(32 * 1024)	/* regular stack */ - -#ifdef CONFIG_USE_IRQ -#error CONFIG_USE_IRQ not supported -#endif  #endif diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h index d0fbc8821..a3752bca6 100644 --- a/include/configs/am335x_evm.h +++ b/include/configs/am335x_evm.h @@ -17,32 +17,84 @@  #define __CONFIG_AM335X_EVM_H  #define CONFIG_AM33XX -#define CONFIG_CMD_MEMORY	/* for mtest */ -#undef CONFIG_GZIP -#undef CONFIG_ZLIB -#undef CONFIG_SYS_HUSH_PARSER -#undef CONFIG_CMD_NET  #include <asm/arch/cpu.h>  #include <asm/arch/hardware.h> -#define CONFIG_ENV_SIZE			0x400 -#define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + (8 * 1024)) +#define CONFIG_DMA_COHERENT +#define CONFIG_DMA_COHERENT_SIZE	(1 << 20) + +#define CONFIG_ENV_SIZE			(128 << 10)	/* 128 KiB */ +#define CONFIG_SYS_MALLOC_LEN		(1024 << 10) +#define CONFIG_SYS_LONGHELP		/* undef to save memory */ +#define CONFIG_SYS_HUSH_PARSER		/* use "hush" command parser */  #define CONFIG_SYS_PROMPT		"U-Boot# "  #define CONFIG_SYS_NO_FLASH  #define MACH_TYPE_TIAM335EVM		3589	/* Until the next sync */  #define CONFIG_MACH_TYPE		MACH_TYPE_TIAM335EVM +#define CONFIG_OF_LIBFDT +#define CONFIG_CMDLINE_TAG		/* enable passing of ATAGs */ +#define CONFIG_SETUP_MEMORY_TAGS +#define CONFIG_INITRD_TAG + +/* commands to include */ +#include <config_cmd_default.h> +  #define CONFIG_CMD_ASKENV  #define CONFIG_VERSION_VARIABLE  /* set to negative value for no autoboot */  #define CONFIG_BOOTDELAY		3 -#define CONFIG_SYS_AUTOLOAD		"no" -#define CONFIG_BOOTFILE			"uImage"  #define CONFIG_EXTRA_ENV_SETTINGS \ -	"verify=yes\0" \ -	"ramdisk_file=ramdisk.gz\0" \ +	"loadaddr=0x80200000\0" \ +	"fdtaddr=0x80F80000\0" \ +	"rdaddr=0x81000000\0" \ +	"bootfile=/boot/uImage\0" \ +	"console=ttyO0,115200n8\0" \ +	"optargs=\0" \ +	"mmcdev=0\0" \ +	"mmcroot=/dev/mmcblk0p2 rw\0" \ +	"mmcrootfstype=ext4 rootwait\0" \ +	"ramroot=/dev/ram0 rw ramdisk_size=65536 initrd=${rdaddr},64M\0" \ +	"ramrootfstype=ext2\0" \ +	"mmcargs=setenv bootargs console=${console} " \ +		"${optargs} " \ +		"root=${mmcroot} " \ +		"rootfstype=${mmcrootfstype}\0" \ +	"bootenv=uEnv.txt\0" \ +	"loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \ +	"importbootenv=echo Importing environment from mmc ...; " \ +		"env import -t $loadaddr $filesize\0" \ +	"ramargs=setenv bootargs console=${console} " \ +		"${optargs} " \ +		"root=${ramroot} " \ +		"rootfstype=${ramrootfstype}\0" \ +	"loadramdisk=fatload mmc ${mmcdev} ${rdaddr} ramdisk.gz\0" \ +	"loaduimagefat=fatload mmc ${mmcdev} ${loadaddr} ${bootfile}\0" \ +	"loaduimage=ext2load mmc ${mmcdev}:2 ${loadaddr} ${bootfile}\0" \ +	"mmcboot=echo Booting from mmc ...; " \ +		"run mmcargs; " \ +		"bootm ${loadaddr}\0" \ +	"ramboot=echo Booting from ramdisk ...; " \ +		"run ramargs; " \ +		"bootm ${loadaddr}\0" \ + +#define CONFIG_BOOTCOMMAND \ +	"if mmc rescan ${mmcdev}; then " \ +		"echo SD/MMC found on device ${mmcdev};" \ +		"if run loadbootenv; then " \ +			"echo Loaded environment from ${bootenv};" \ +			"run importbootenv;" \ +		"fi;" \ +		"if test -n $uenvcmd; then " \ +			"echo Running uenvcmd ...;" \ +			"run uenvcmd;" \ +		"fi;" \ +		"if run loaduimage; then " \ +			"run mmcboot;" \ +		"fi;" \ +	"fi;" \  /* Clock Defines */  #define V_OSCK				24000000  /* Clock output from T2 */ @@ -82,14 +134,21 @@  #define CONFIG_CMD_FAT  #define CONFIG_CMD_EXT2 +#define CONFIG_SPI +#define CONFIG_OMAP3_SPI +#define CONFIG_MTD_DEVICE +#define CONFIG_SPI_FLASH +#define CONFIG_SPI_FLASH_WINBOND +#define CONFIG_CMD_SF +#define CONFIG_SF_DEFAULT_SPEED		(24000000) +   /* Physical Memory Map */  #define CONFIG_NR_DRAM_BANKS		1		/*  1 bank of DRAM */  #define PHYS_DRAM_1			0x80000000	/* DRAM Bank #1 */ -#define PHYS_DRAM_1_SIZE		0x10000000 /*(0x80000000 / 8) 256 MB */  #define CONFIG_MAX_RAM_BANK_SIZE	(1024 << 20)	/* 1GB */  #define CONFIG_SYS_SDRAM_BASE		PHYS_DRAM_1 -#define CONFIG_SYS_INIT_SP_ADDR         (CONFIG_SYS_SDRAM_BASE + 0x1000 - \ +#define CONFIG_SYS_INIT_SP_ADDR         (NON_SECURE_SRAM_END - \  						GENERATED_GBL_DATA_SIZE)   /* Platform/Board specific defs */  #define CONFIG_SYS_TIMERBASE		0x48040000	/* Use Timer2 */ @@ -109,7 +168,15 @@  #define CONFIG_HARD_I2C  #define CONFIG_SYS_I2C_SPEED		100000  #define CONFIG_SYS_I2C_SLAVE		1 +#define CONFIG_I2C_MULTI_BUS  #define CONFIG_DRIVER_OMAP24XX_I2C +#define CONFIG_CMD_EEPROM +#define CONFIG_ENV_EEPROM_IS_ON_I2C +#define CONFIG_SYS_I2C_EEPROM_ADDR	0x50	/* Main EEPROM */ +#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN	2 +#define CONFIG_SYS_I2C_MULTI_EEPROMS + +#define CONFIG_OMAP_GPIO  #define CONFIG_BAUDRATE		115200  #define CONFIG_SYS_BAUDRATE_TABLE	{ 110, 300, 600, 1200, 2400, \ @@ -128,7 +195,7 @@  #define CONFIG_SPL  #define CONFIG_SPL_TEXT_BASE		0x402F0400  #define CONFIG_SPL_MAX_SIZE		(46 * 1024) -#define CONFIG_SPL_STACK		LOW_LEVEL_SRAM_STACK +#define CONFIG_SPL_STACK		CONFIG_SYS_INIT_SP_ADDR  #define CONFIG_SPL_BSS_START_ADDR	0x80000000  #define CONFIG_SPL_BSS_MAX_SIZE		0x80000		/* 512 KB */ @@ -145,6 +212,7 @@  #define CONFIG_SPL_LIBDISK_SUPPORT  #define CONFIG_SPL_LIBGENERIC_SUPPORT  #define CONFIG_SPL_SERIAL_SUPPORT +#define CONFIG_SPL_GPIO_SUPPORT  #define CONFIG_SPL_YMODEM_SUPPORT  #define CONFIG_SPL_LDSCRIPT		"$(CPUDIR)/omap-common/u-boot-spl.lds" @@ -165,7 +233,21 @@  #define CONFIG_SKIP_LOWLEVEL_INIT  #endif -/* Unsupported features */ -#undef CONFIG_USE_IRQ +#define CONFIG_CMD_NET +#define CONFIG_CMD_DHCP +#define CONFIG_CMD_PING +#define CONFIG_DRIVER_TI_CPSW +#define CONFIG_MII +#define CONFIG_BOOTP_DEFAULT +#define CONFIG_BOOTP_DNS +#define CONFIG_BOOTP_DNS2 +#define CONFIG_BOOTP_SEND_HOSTNAME +#define CONFIG_BOOTP_GATEWAY +#define CONFIG_BOOTP_SUBNETMASK +#define CONFIG_NET_RETRY_COUNT         10 +#define CONFIG_NET_MULTI +#define CONFIG_PHY_GIGE +#define CONFIG_PHYLIB +#define CONFIG_PHY_SMSC  #endif	/* ! __CONFIG_AM335X_EVM_H */ diff --git a/include/configs/am3517_crane.h b/include/configs/am3517_crane.h index 54ab3ebd3..f24b44d5e 100644 --- a/include/configs/am3517_crane.h +++ b/include/configs/am3517_crane.h @@ -47,7 +47,6 @@  #define V_OSCK			26000000	/* Clock output from T2 */  #define V_SCLK			(V_OSCK >> 1) -#undef CONFIG_USE_IRQ				/* no support for IRQs */  #define CONFIG_MISC_INIT_R  #define CONFIG_CMDLINE_TAG		1	/* enable passing of ATAGs */ @@ -256,13 +255,6 @@  #define CONFIG_SYS_HZ			1000  /*----------------------------------------------------------------------- - * Stack sizes - * - * The stack sizes are set up in start.S using the settings below - */ -#define CONFIG_STACKSIZE	(128 << 10)	/* regular stack 128 KiB */ - -/*-----------------------------------------------------------------------   * Physical Memory Map   */  #define CONFIG_NR_DRAM_BANKS	2	/* CS1 may or may not be populated */ diff --git a/include/configs/am3517_evm.h b/include/configs/am3517_evm.h index ed0a601df..95f8d7885 100644 --- a/include/configs/am3517_evm.h +++ b/include/configs/am3517_evm.h @@ -47,7 +47,6 @@  #define V_OSCK			26000000	/* Clock output from T2 */  #define V_SCLK			(V_OSCK >> 1) -#undef CONFIG_USE_IRQ				/* no support for IRQs */  #define CONFIG_MISC_INIT_R  #define CONFIG_CMDLINE_TAG		1	/* enable passing of ATAGs */ @@ -253,13 +252,6 @@  #define CONFIG_SYS_HZ			1000  /*----------------------------------------------------------------------- - * Stack sizes - * - * The stack sizes are set up in start.S using the settings below - */ -#define CONFIG_STACKSIZE	(128 << 10)	/* regular stack 128 KiB */ - -/*-----------------------------------------------------------------------   * Physical Memory Map   */  #define CONFIG_NR_DRAM_BANKS	2	/* CS1 may or may not be populated */ diff --git a/include/configs/apollon.h b/include/configs/apollon.h deleted file mode 100644 index aebca71ec..000000000 --- a/include/configs/apollon.h +++ /dev/null @@ -1,269 +0,0 @@ -/* - * (C) Copyright 2005-2008 - * Samsung Electronics, - * Kyungmin Park <kyungmin.park@samsung.com> - * - * Configuration settings for the 2420 Samsung Apollon board. - * - * 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 __CONFIG_H -#define __CONFIG_H - -/* - * High Level Configuration Options - */ -#define CONFIG_ARM1136		1 /* This is an arm1136 CPU core */ -#define CONFIG_OMAP		1 /* in a TI OMAP core */ -#define CONFIG_OMAP2420		1 /* which is in a 2420 */ -#define CONFIG_OMAP2420_APOLLON	1 -#define CONFIG_APOLLON		1 -#define CONFIG_APOLLON_PLUS	1 /* If you have apollon plus 1.x */ - -#define CONFIG_ONENAND_U_BOOT	y - -/* Clock config to target*/ -#define PRCM_CONFIG_I		1 -/* #define PRCM_CONFIG_II	1 */ - -/* Boot method */ -/* uncomment if you use NOR boot */ -/* #define CONFIG_SYS_NOR_BOOT		1 */ - -/* uncomment if you use NOR on CS3 */ -/* #define CONFIG_SYS_USE_NOR		1 */ - -#ifdef CONFIG_SYS_NOR_BOOT -#undef CONFIG_SYS_USE_NOR -#define CONFIG_SYS_USE_NOR		1 -#endif - -/* uncommnet if you want to use UBI */ -#define CONFIG_SYS_USE_UBI - -#include <asm/arch/omap2420.h>	/* get chip and board defs */ - -#define	V_SCLK	12000000 - -/* input clock of PLL */ -/* the OMAP2420 H4 has 12MHz, 13MHz, or 19.2Mhz crystal input */ -#define	CONFIG_SYS_CLK_FREQ	V_SCLK - -#undef	CONFIG_USE_IRQ	/* no support for IRQs */ -#define	CONFIG_MISC_INIT_R - -#define	CONFIG_CMDLINE_TAG	1	/* enable passing of ATAGs */ -#define	CONFIG_SETUP_MEMORY_TAGS	1 -#define	CONFIG_INITRD_TAG	1 -#define	CONFIG_REVISION_TAG	1 - -/* - * Size of malloc() pool - */ -#define	CONFIG_ENV_SIZE SZ_128K	/* Total Size of Environment Sector */ -#define CONFIG_ENV_SIZE_FLEX SZ_256K -#define	CONFIG_SYS_MALLOC_LEN	(CONFIG_ENV_SIZE + SZ_1M) - -/* - * Hardware drivers - */ - -/* - * SMC91c96 Etherent - */ -#define	CONFIG_LAN91C96 -#define	CONFIG_LAN91C96_BASE	(APOLLON_CS1_BASE+0x300) -#define	CONFIG_LAN91C96_EXT_PHY - -/* - * NS16550 Configuration - */ -#define	V_NS16550_CLK	(48000000)	/* 48MHz (APLL96/2) */ - -#define	CONFIG_SYS_NS16550 -#define	CONFIG_SYS_NS16550_SERIAL -#define	CONFIG_SYS_NS16550_REG_SIZE	(-4) -#define	CONFIG_SYS_NS16550_CLK	V_NS16550_CLK	/* 3MHz (1.5MHz*2) */ -#define	CONFIG_SYS_NS16550_COM1	OMAP2420_UART1 - -/* - * select serial console configuration - */ -#define	CONFIG_SERIAL1	1	/* UART1 on H4 */ - -/* allow to overwrite serial and ethaddr */ -#define	CONFIG_ENV_OVERWRITE -#define	CONFIG_CONS_INDEX	1 -#define	CONFIG_BAUDRATE		115200 - -/* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */ -#include	<config_cmd_default.h> - -#define	CONFIG_CMD_DHCP -#define	CONFIG_CMD_DIAG -#define	CONFIG_CMD_ONENAND - -#ifdef CONFIG_SYS_USE_UBI -#define	CONFIG_CMD_JFFS2 -#define	CONFIG_CMD_UBI -#define	CONFIG_RBTREE -#define CONFIG_MTD_DEVICE		/* needed for mtdparts commands */ -#define CONFIG_MTD_PARTITIONS -#endif - -#undef	CONFIG_CMD_SOURCE - -#ifndef	CONFIG_SYS_USE_NOR -# undef	CONFIG_CMD_FLASH -# undef	CONFIG_CMD_IMLS -#endif - -#define	CONFIG_BOOTP_MASK	CONFIG_BOOTP_DEFAULT - -#define	CONFIG_BOOTDELAY	1 - -#define	CONFIG_NETMASK	255.255.255.0 -#define	CONFIG_IPADDR	192.168.116.25 -#define	CONFIG_SERVERIP	192.168.116.1 -#define	CONFIG_BOOTFILE	"uImage" -#define	CONFIG_ETHADDR	00:0E:99:00:24:20 - -#ifdef CONFIG_APOLLON_PLUS -#define CONFIG_SYS_MEM	"mem=64M" -#else -#define CONFIG_SYS_MEM	"mem=128" -#endif - -#ifdef CONFIG_SYS_USE_UBI -#define CONFIG_SYS_UBI "ubi.mtd=4" -#else -#define CONFIG_SYS_UBI "" -#endif - -#define CONFIG_BOOTARGS "root=/dev/nfs rw " CONFIG_SYS_MEM \ -	" console=ttyS0,115200n8" \ -	" ip=192.168.116.25:192.168.116.1:192.168.116.1:255.255.255.0:" \ -	"apollon:eth0:off nfsroot=/tftpboot/nfsroot profile=2 " \ -	CONFIG_SYS_UBI - -#define	CONFIG_EXTRA_ENV_SETTINGS					\ -	"Image=tftp 0x80008000 Image; go 0x80008000\0"			\ -	"zImage=tftp 0x80180000 zImage; go 0x80180000\0"		\ -	"uImage=tftp 0x80180000 uImage; bootm 0x80180000\0"		\ -	"uboot=tftp 0x80008000 u-boot.bin; go 0x80008000\0"		\ -	"xloader=tftp 0x80180000 x-load.bin; "				\ -	" cp.w 0x80180000 0x00000400 0x1000; go 0x00000400\0"		\ -	"syncmode50=mw.w 0x1e442 0xc0c4; mw 0x6800a060 0xe30d1201\0"	\ -	"syncmode=mw.w 0x1e442 0xe0f4; mw 0x6800a060 0xe30d1201\0"	\ -	"norboot=cp32 0x18040000 0x80008000 0x200000; go 0x80008000\0"	\ -	"oneboot=onenand read 0x80008000 0x40000 0x200000; go 0x80008000\0" \ -	"onesyncboot=run syncmode oneboot\0"				\ -	"updateb=tftp 0x80180000 u-boot-onenand.bin; "			\ -	" onenand erase 0x0 0x20000; onenand write 0x80180000 0x0 0x20000\0" \ -	"ubi=setenv bootargs ${bootargs} ubi.mtd=4 ${mtdparts}; run uImage\0" \ -	"bootcmd=run uboot\0" - -/* - * Miscellaneous configurable options - */ -#define	CONFIG_SYS_LONGHELP	/* undef to save memory */ -#define	CONFIG_SYS_PROMPT	"Apollon # " -#define	CONFIG_SYS_CBSIZE	256	/* Console I/O Buffer Size */ -/* Print Buffer Size */ -#define	CONFIG_SYS_PBSIZE	(CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) -#define	CONFIG_SYS_MAXARGS	16	/* max number of command args */ -/* Boot Argument Buffer Size */ -#define	CONFIG_SYS_BARGSIZE	CONFIG_SYS_CBSIZE -/* memtest works on */ -#define	CONFIG_SYS_MEMTEST_START	(OMAP2420_SDRC_CS0) -#define	CONFIG_SYS_MEMTEST_END		(OMAP2420_SDRC_CS0+SZ_31M) - -/* default load address */ -#define	CONFIG_SYS_LOAD_ADDR	(OMAP2420_SDRC_CS0) - -/* The 2420 has 12 GP timers, they can be driven by the SysClk (12/13/19.2) - * or by 32KHz clk, or from external sig. This rate is divided by a local - * divisor. - */ -#define	CONFIG_SYS_TIMERBASE	OMAP2420_GPT2 -#define	CONFIG_SYS_PTV		7	/* 2^(PTV+1) */ -#define	CONFIG_SYS_HZ		((CONFIG_SYS_CLK_FREQ)/(2 << CONFIG_SYS_PTV)) - -/*----------------------------------------------------------------------- - * Stack sizes - * - * The stack sizes are set up in start.S using the settings below - */ -#define	CONFIG_STACKSIZE SZ_128K	/* regular stack */ - -/*----------------------------------------------------------------------- - * Physical Memory Map - */ -#define	CONFIG_NR_DRAM_BANKS	1	/* CS1 may or may not be populated */ -#define	PHYS_SDRAM_1		OMAP2420_SDRC_CS0 -#define	PHYS_SDRAM_1_SIZE	SZ_128M -#define	PHYS_SDRAM_2		OMAP2420_SDRC_CS1 - -/*----------------------------------------------------------------------- - * FLASH and environment organization - */ -#ifdef	CONFIG_SYS_USE_NOR -/* OneNAND boot, NOR has CS3, But NOR has CS0 when NOR boot */ -# define	CONFIG_SYS_FLASH_BASE		0x18000000 -# define	CONFIG_SYS_MAX_FLASH_BANKS	1 -# define	CONFIG_SYS_MAX_FLASH_SECT	1024 -/*----------------------------------------------------------------------- - * CFI FLASH driver setup - */ -/* Flash memory is CFI compliant */ -# define	CONFIG_SYS_FLASH_CFI	1 -# define	CONFIG_FLASH_CFI_DRIVER	1	/* Use drivers/cfi_flash.c */ -/* Use buffered writes (~10x faster) */ -/* #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE 1 */ -/* Use h/w sector protection*/ -# define	CONFIG_SYS_FLASH_PROTECTION	1 - -#else	/* !CONFIG_SYS_USE_NOR */ -# define	CONFIG_SYS_NO_FLASH	1 -#endif	/* CONFIG_SYS_USE_NOR */ - -/* OneNAND boot, OneNAND has CS0, NOR boot ONeNAND has CS2 */ -#define	CONFIG_SYS_ONENAND_BASE	0x00000000 -#define CONFIG_SYS_MONITOR_LEN		SZ_256K	/* U-Boot image size */ -#define	CONFIG_ENV_IS_IN_ONENAND	1 -#define CONFIG_ENV_ADDR		0x00020000 -#define CONFIG_ENV_ADDR_FLEX	0x00040000 - -#ifdef CONFIG_SYS_USE_UBI -#define CONFIG_CMD_MTDPARTS -#define MTDIDS_DEFAULT		"onenand0=onenand" -#define MTDPARTS_DEFAULT	"mtdparts=onenand:128k(bootloader),"	\ -					"128k(params),"			\ -					"2m(kernel),"			\ -					"16m(rootfs),"			\ -					"32m(fs),"			\ -					"-(ubifs)" -#endif - -#define PHYS_SRAM			0x4020F800 -#define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM_1 -#define CONFIG_SYS_INIT_SP_ADDR 	PHYS_SRAM - -#endif /* __CONFIG_H */ diff --git a/include/configs/apx4devkit.h b/include/configs/apx4devkit.h new file mode 100644 index 000000000..af0b714e1 --- /dev/null +++ b/include/configs/apx4devkit.h @@ -0,0 +1,236 @@ +/* + * Copyright (C) 2012 Bluegiga Technologies Oy + * + * Authors: + * Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com> + * Lauri Hintsala <lauri.hintsala@bluegiga.com> + * + * Based on m28evk.h: + * Copyright (C) 2011 Marek Vasut <marek.vasut@gmail.com> + * on behalf of DENX Software Engineering GmbH + * + * 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. + */ +#ifndef __CONFIG_H +#define __CONFIG_H + +/* SoC configurations */ +#define CONFIG_MX28				/* i.MX28 SoC */ +#define CONFIG_MXS_GPIO				/* GPIO control */ +#define CONFIG_SYS_HZ		1000		/* Ticks per second */ + +#define MACH_TYPE_APX4DEVKIT	3712 +#define CONFIG_MACH_TYPE	MACH_TYPE_APX4DEVKIT + +#include <asm/arch/regs-base.h> + +#define CONFIG_SYS_NO_FLASH +#define CONFIG_BOARD_EARLY_INIT_F +#define CONFIG_ARCH_CPU_INIT +#define CONFIG_ARCH_MISC_INIT + +/* SPL */ +#define CONFIG_SPL +#define CONFIG_SPL_NO_CPU_SUPPORT_CODE +#define CONFIG_SPL_START_S_PATH	"arch/arm/cpu/arm926ejs/mxs" +#define CONFIG_SPL_LDSCRIPT	"arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds" +#define CONFIG_SPL_LIBCOMMON_SUPPORT +#define CONFIG_SPL_LIBGENERIC_SUPPORT +#define CONFIG_SPL_GPIO_SUPPORT + +/* U-Boot Commands */ +#include <config_cmd_default.h> +#define CONFIG_DISPLAY_CPUINFO +#define CONFIG_DOS_PARTITION + +#define CONFIG_CMD_CACHE +#define CONFIG_CMD_DATE +#define CONFIG_CMD_DHCP +#define CONFIG_CMD_EXT2 +#define CONFIG_CMD_FAT +#define CONFIG_CMD_I2C +#define CONFIG_CMD_MII +#define CONFIG_CMD_MMC +#define CONFIG_CMD_NAND +#define CONFIG_CMD_NET +#define CONFIG_CMD_NFS +#define CONFIG_CMD_PING +#define CONFIG_CMD_SAVEENV +#define CONFIG_CMD_USB + +/* Memory configurations */ +#define CONFIG_NR_DRAM_BANKS		1		/* 1 bank of DRAM */ +#define PHYS_SDRAM_1			0x40000000	/* Base address */ +#define PHYS_SDRAM_1_SIZE		0x20000000	/* Max 512 MB RAM */ +#define CONFIG_SYS_MALLOC_LEN		0x00400000	/* 4 MB for malloc */ +#define CONFIG_SYS_MEMTEST_START	0x40000000	/* Memtest start adr */ +#define CONFIG_SYS_MEMTEST_END		0x40400000	/* 4 MB RAM test */ +#define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM_1 + +/* Point initial SP in SRAM so SPL can use it too. */ +#define CONFIG_SYS_INIT_RAM_ADDR	0x00000000 +#define CONFIG_SYS_INIT_RAM_SIZE	(128 * 1024) + +#define CONFIG_SYS_INIT_SP_OFFSET \ +	(CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) +#define CONFIG_SYS_INIT_SP_ADDR \ +	(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) + +/* + * We need to sacrifice first 4 bytes of RAM here to avoid triggering some + * strange BUG in ROM corrupting first 4 bytes of RAM when loading U-Boot + * binary. In case there was more of this mess, 0x100 bytes are skipped. + */ +#define CONFIG_SYS_TEXT_BASE		0x40000100 + +#define CONFIG_ENV_OVERWRITE + +/* U-Boot general configurations */ +#define CONFIG_SYS_LONGHELP +#define CONFIG_SYS_PROMPT		"=> " +#define CONFIG_SYS_CBSIZE		1024	/* Console I/O buffer size */ +#define CONFIG_SYS_PBSIZE	\ +	(CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16) +						/* Print buffer size */ +#define CONFIG_SYS_MAXARGS		32	/* Max number of command args */ +#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE +						/* Boot argument buffer size */ +#define CONFIG_VERSION_VARIABLE			/* U-Boot version */ +#define CONFIG_AUTO_COMPLETE			/* Command auto complete */ +#define CONFIG_CMDLINE_EDITING			/* Command history etc. */ +#define CONFIG_SYS_HUSH_PARSER +#define CONFIG_SYS_PROMPT_HUSH_PS2	"> " +#define CONFIG_OF_LIBFDT +#define CONFIG_ENV_IS_IN_NAND + +/* Serial Driver */ +#define CONFIG_PL011_SERIAL +#define CONFIG_PL011_CLOCK		24000000 +#define CONFIG_PL01x_PORTS		{ (void *)MXS_UARTDBG_BASE } +#define CONFIG_CONS_INDEX		0 +#define CONFIG_BAUDRATE			115200	/* Default baud rate */ +#define CONFIG_SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, 115200 } + +/* DMA */ +#define CONFIG_APBH_DMA + +/* MMC Driver */ +#ifdef CONFIG_ENV_IS_IN_MMC +#define CONFIG_ENV_OFFSET		(256 * 1024) +#define CONFIG_ENV_SIZE			(16 * 1024) +#define CONFIG_SYS_MMC_ENV_DEV		0 +#endif + +#ifdef CONFIG_CMD_MMC +#define CONFIG_MMC +#define CONFIG_GENERIC_MMC +#define CONFIG_MMC_BOUNCE_BUFFER +#define CONFIG_MXS_MMC +#endif + +/* NAND Driver */ +#ifdef CONFIG_ENV_IS_IN_NAND +#define CONFIG_ENV_SECT_SIZE		(128 * 1024) +#define CONFIG_ENV_SIZE			(128 * 1024) +#define CONFIG_ENV_SIZE_REDUND		CONFIG_ENV_SIZE +#define CONFIG_ENV_RANGE		(384 * 1024) +#define CONFIG_ENV_OFFSET		0x120000 +#define CONFIG_ENV_OFFSET_REDUND	\ +		(CONFIG_ENV_OFFSET + CONFIG_ENV_RANGE) +#endif + +#ifdef CONFIG_CMD_NAND +#define CONFIG_NAND_MXS +#define CONFIG_SYS_MAX_NAND_DEVICE	1 +#define CONFIG_SYS_NAND_BASE		0x60000000 +#define CONFIG_SYS_NAND_5_ADDR_CYCLE + +#define CONFIG_CMD_UBI +#define CONFIG_CMD_UBIFS +#define CONFIG_CMD_MTDPARTS +#define CONFIG_RBTREE +#define CONFIG_LZO +#define CONFIG_MTD_DEVICE +#define CONFIG_MTD_PARTITIONS +#define MTDIDS_DEFAULT			"nand0=gpmi-nand" +#define MTDPARTS_DEFAULT \ +	"mtdparts=gpmi-nand:128k(bootstrap),1024k(boot),768k(env),-(root)" +#else +#define MTDPARTS_DEFAULT		"" +#endif + +/* Ethernet on SOC (FEC) */ +#ifdef CONFIG_CMD_NET +#define CONFIG_NET_MULTI +#define CONFIG_ETHPRIME			"FEC" +#define CONFIG_FEC_MXC +#define CONFIG_FEC_MXC_PHYADDR		0 +#define IMX_FEC_BASE			MXS_ENET0_BASE +#define CONFIG_MII +#define CONFIG_DISCOVER_PHY +#define CONFIG_FEC_XCV_TYPE		RMII +#endif + +/* USB */ +#ifdef CONFIG_CMD_USB +#define CONFIG_USB_EHCI +#define CONFIG_USB_EHCI_MXS +#define CONFIG_EHCI_MXS_PORT		1 +#define CONFIG_EHCI_IS_TDI +#define CONFIG_USB_STORAGE +#endif + +/* I2C */ +#ifdef CONFIG_CMD_I2C +#define CONFIG_I2C_MXS +#define CONFIG_HARD_I2C +#define CONFIG_SYS_I2C_SPEED		400000 +#endif + +/* RTC */ +#if defined(CONFIG_CMD_DATE) +#define CONFIG_RTC_PCF8563 +#define CONFIG_SYS_I2C_RTC_ADDR		0x51 +#endif + +/* Boot Linux */ +#define CONFIG_CMDLINE_TAG +#define CONFIG_SETUP_MEMORY_TAGS +#define CONFIG_BOOTDELAY		1 +#define CONFIG_BOOTFILE			"uImage" +#define CONFIG_BOOTCOMMAND		"run bootcmd_nand" +#define CONFIG_LOADADDR			0x41000000 +#define CONFIG_SYS_LOAD_ADDR		CONFIG_LOADADDR +#define CONFIG_SERIAL_TAG +#define CONFIG_REVISION_TAG + +/* Extra Environments */ +#define CONFIG_EXTRA_ENV_SETTINGS \ +	"mtdparts=" MTDPARTS_DEFAULT "\0" \ +	"verify=no\0" \ +	"bootcmd=run bootcmd_nand\0" \ +	"kernelargs=console=tty0 console=ttyAMA0,115200 consoleblank=0\0" \ +	"bootargs_nand=" \ +		"setenv bootargs ${kernelargs} ubi.mtd=3,2048 " \ +		"root=ubi0:rootfs rootfstype=ubifs ${mtdparts} rw\0" \ +	"bootcmd_nand=" \ +		"run bootargs_nand && ubi part root 2048 && " \ +		"ubifsmount rootfs && ubifsload 41000000 boot/uImage && " \ +		"bootm 41000000\0" \ +	"bootargs_mmc=" \ +		"setenv bootargs ${kernelargs} " \ +		"root=/dev/mmcblk0p2 rootwait ${mtdparts} rw\0" \ +	"bootcmd_mmc=" \ +		"run bootargs_mmc && mmc rescan && " \ +		"ext2load mmc 0:2 41000000 boot/uImage && bootm 41000000\0" \ +"" + +#endif /* __CONFIG_H */ diff --git a/include/configs/at91rm9200ek.h b/include/configs/at91rm9200ek.h index 2abcaffee..bf20065af 100644 --- a/include/configs/at91rm9200ek.h +++ b/include/configs/at91rm9200ek.h @@ -224,7 +224,4 @@  #define CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_SDRAM_BASE + SZ_4K \  					- GENERATED_GBL_DATA_SIZE) -#define CONFIG_STACKSIZE		SZ_32K	/* regular stack */ -#define CONFIG_STACKSIZE_IRQ		SZ_4K	/* Unsure if to big or to small*/ -#define CONFIG_STACKSIZE_FIQ		SZ_4K	/* Unsure if to big or to small*/  #endif /* __AT91RM9200EK_CONFIG_H__ */ diff --git a/include/configs/at91sam9260ek.h b/include/configs/at91sam9260ek.h index ef25fa5e0..f921fac64 100644 --- a/include/configs/at91sam9260ek.h +++ b/include/configs/at91sam9260ek.h @@ -55,7 +55,6 @@  /* Misc CPU related */  #define CONFIG_ARCH_CPU_INIT -#undef	CONFIG_USE_IRQ			/* we don't need IRQ/FIQ stuff	*/  #define CONFIG_CMDLINE_TAG		/* enable passing of ATAGs */  #define CONFIG_SETUP_MEMORY_TAGS  #define CONFIG_INITRD_TAG @@ -237,10 +236,4 @@   */  #define CONFIG_SYS_MALLOC_LEN		ROUND(3 * CONFIG_ENV_SIZE + 128*1024, 0x1000) -#define CONFIG_STACKSIZE	(32*1024)	/* regular stack */ - -#ifdef CONFIG_USE_IRQ -#error CONFIG_USE_IRQ not supported -#endif -  #endif diff --git a/include/configs/at91sam9261ek.h b/include/configs/at91sam9261ek.h index 014437b5e..1e1fbe56d 100644 --- a/include/configs/at91sam9261ek.h +++ b/include/configs/at91sam9261ek.h @@ -40,9 +40,6 @@  #include <asm/hardware.h> -#define CONFIG_ARCH_CPU_INIT -#undef CONFIG_USE_IRQ			/* we don't need IRQ/FIQ stuff	*/ -  #define CONFIG_CMDLINE_TAG		/* enable passing of ATAGs */  #define CONFIG_SETUP_MEMORY_TAGS  #define CONFIG_INITRD_TAG @@ -239,10 +236,4 @@   */  #define CONFIG_SYS_MALLOC_LEN		ROUND(3 * CONFIG_ENV_SIZE + 128*1024, 0x1000) -#define CONFIG_STACKSIZE		(32*1024)	/* regular stack */ - -#ifdef CONFIG_USE_IRQ -#error CONFIG_USE_IRQ not supported -#endif -  #endif diff --git a/include/configs/at91sam9263ek.h b/include/configs/at91sam9263ek.h index 4309f71f1..9421b5373 100644 --- a/include/configs/at91sam9263ek.h +++ b/include/configs/at91sam9263ek.h @@ -47,7 +47,6 @@  #define CONFIG_AT91SAM9263EK	1	/* It's an AT91SAM9263EK Board */  #define CONFIG_ARCH_CPU_INIT -#undef CONFIG_USE_IRQ			/* we don't need IRQ/FIQ stuff	*/  #define CONFIG_CMDLINE_TAG	1	/* enable passing of ATAGs	*/  #define CONFIG_SETUP_MEMORY_TAGS 1 @@ -165,7 +164,7 @@  	"update=" \  		"protect off ${monitor_base} +${filesize};" \  		"erase ${monitor_base} +${filesize};" \ -		"cp.b ${load_addr} ${monitor_base} ${filesize};" \ +		"cp.b ${fileaddr} ${monitor_base} ${filesize};" \  		"protect on ${monitor_base} +${filesize}\0"  #ifndef CONFIG_SKIP_LOWLEVEL_INIT @@ -353,8 +352,4 @@   */  #define CONFIG_SYS_MALLOC_LEN	ROUND(3 * CONFIG_ENV_SIZE + 128*1024, 0x1000) -#define CONFIG_STACKSIZE	(32*1024)	/* regular stack */ - -#undef CONFIG_USE_IRQ -  #endif diff --git a/include/configs/at91sam9m10g45ek.h b/include/configs/at91sam9m10g45ek.h index 1d5fc8f73..4ca280a7f 100644 --- a/include/configs/at91sam9m10g45ek.h +++ b/include/configs/at91sam9m10g45ek.h @@ -39,8 +39,6 @@  #define CONFIG_AT91SAM9M10G45EK  #define CONFIG_AT91FAMILY -#define CONFIG_ARCH_CPU_INIT -#undef CONFIG_USE_IRQ			/* we don't need IRQ/FIQ stuff	*/  #define CONFIG_CMDLINE_TAG		/* enable passing of ATAGs	*/  #define CONFIG_SETUP_MEMORY_TAGS @@ -179,10 +177,4 @@   */  #define CONFIG_SYS_MALLOC_LEN		ROUND(3 * CONFIG_ENV_SIZE + 128*1024, 0x1000) -#define CONFIG_STACKSIZE	(32*1024)	/* regular stack */ - -#ifdef CONFIG_USE_IRQ -#error CONFIG_USE_IRQ not supported -#endif -  #endif diff --git a/include/configs/at91sam9rlek.h b/include/configs/at91sam9rlek.h index c5952e931..8178b32a8 100644 --- a/include/configs/at91sam9rlek.h +++ b/include/configs/at91sam9rlek.h @@ -41,7 +41,6 @@  #define CONFIG_ARCH_CPU_INIT  #define CONFIG_SKIP_LOWLEVEL_INIT  #define CONFIG_BOARD_EARLY_INIT_F -#undef CONFIG_USE_IRQ			/* we don't need IRQ/FIQ stuff */  #define CONFIG_CMDLINE_TAG		1	/* enable passing of ATAGs */  #define CONFIG_SETUP_MEMORY_TAGS	1 @@ -189,8 +188,4 @@   */  #define CONFIG_SYS_MALLOC_LEN	ROUND(3 * CONFIG_ENV_SIZE + 128*1024, 0x1000) -#define CONFIG_STACKSIZE	(32*1024)	/* regular stack */ - -#undef CONFIG_USE_IRQ -  #endif diff --git a/include/configs/at91sam9x5ek.h b/include/configs/at91sam9x5ek.h new file mode 100644 index 000000000..1ceb31a0f --- /dev/null +++ b/include/configs/at91sam9x5ek.h @@ -0,0 +1,200 @@ +/* + * Copyright (C) 2012 Atmel Corporation + * + * Configuation settings for the AT91SAM9X5EK board. + * + * 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 __CONFIG_H__ +#define __CONFIG_H__ + +#include <asm/hardware.h> + +/* ARM asynchronous clock */ +#define CONFIG_SYS_AT91_SLOW_CLOCK	32768 +#define CONFIG_SYS_AT91_MAIN_CLOCK	12000000	/* 12 MHz crystal */ +#define CONFIG_SYS_HZ			1000 + +#define CONFIG_AT91SAM9X5EK +#define CONFIG_AT91FAMILY + +#define CONFIG_CMDLINE_TAG		/* enable passing of ATAGs */ +#define CONFIG_SETUP_MEMORY_TAGS +#define CONFIG_INITRD_TAG +#define CONFIG_SKIP_LOWLEVEL_INIT +#define CONFIG_BOARD_EARLY_INIT_F +#define CONFIG_DISPLAY_CPUINFO + +/* general purpose I/O */ +#define CONFIG_ATMEL_LEGACY		/* required until (g)pio is fixed */ +#define CONFIG_AT91_GPIO + +/* serial console */ +#define CONFIG_ATMEL_USART +#define CONFIG_USART_BASE	ATMEL_BASE_DBGU +#define CONFIG_USART_ID		ATMEL_ID_SYS + +/* LCD */ +#define CONFIG_LCD +#define LCD_BPP			LCD_COLOR16 +#define LCD_OUTPUT_BPP		24 +#define CONFIG_LCD_LOGO +#undef LCD_TEST_PATTERN +#define CONFIG_LCD_INFO +#define CONFIG_LCD_INFO_BELOW_LOGO +#define CONFIG_SYS_WHITE_ON_BLACK +#define CONFIG_ATMEL_HLCD +#define CONFIG_ATMEL_LCD_RGB565 +#define CONFIG_SYS_CONSOLE_IS_IN_ENV + +#define CONFIG_BOOTDELAY	3 + +/* + * BOOTP options + */ +#define CONFIG_BOOTP_BOOTFILESIZE +#define CONFIG_BOOTP_BOOTPATH +#define CONFIG_BOOTP_GATEWAY +#define CONFIG_BOOTP_HOSTNAME + +/* + * Command line configuration. + */ +#include <config_cmd_default.h> +#undef CONFIG_CMD_FPGA +#undef CONFIG_CMD_IMI +#undef CONFIG_CMD_IMLS +#undef CONFIG_CMD_LOADS + +#define CONFIG_CMD_PING +#define CONFIG_CMD_DHCP +#define CONFIG_CMD_NAND +#define CONFIG_CMD_SF + +/* SDRAM */ +#define CONFIG_NR_DRAM_BANKS		1 +#define CONFIG_SYS_SDRAM_BASE		0x20000000 +#define CONFIG_SYS_SDRAM_SIZE		0x08000000	/* 128 megs */ + +#define CONFIG_SYS_INIT_SP_ADDR \ +	(CONFIG_SYS_SDRAM_BASE + 4 * 1024 - GENERATED_GBL_DATA_SIZE) + +/* DataFlash */ +#ifdef CONFIG_CMD_SF +#define CONFIG_ATMEL_SPI +#define CONFIG_SPI_FLASH +#define CONFIG_SPI_FLASH_ATMEL +#define CONFIG_SF_DEFAULT_SPEED		30000000 +#endif + +/* no NOR flash */ +#define CONFIG_SYS_NO_FLASH + +/* NAND flash */ +#ifdef CONFIG_CMD_NAND +#define CONFIG_NAND_ATMEL +#define CONFIG_SYS_MAX_NAND_DEVICE	1 +#define CONFIG_SYS_NAND_BASE		0x40000000 +#define CONFIG_SYS_NAND_DBW_8		1 +/* our ALE is AD21 */ +#define CONFIG_SYS_NAND_MASK_ALE	(1 << 21) +/* our CLE is AD22 */ +#define CONFIG_SYS_NAND_MASK_CLE	(1 << 22) +#define CONFIG_SYS_NAND_ENABLE_PIN	AT91_PIN_PD4 +#define CONFIG_SYS_NAND_READY_PIN	AT91_PIN_PD5 + +/* PMECC & PMERRLOC */ +#define CONFIG_ATMEL_NAND_HWECC		1 +#define CONFIG_ATMEL_NAND_HW_PMECC	1 +#define CONFIG_PMECC_CAP		2 +#define CONFIG_PMECC_SECTOR_SIZE	512 +#define CONFIG_PMECC_INDEX_TABLE_OFFSET	0x8000 + +#define CONFIG_MTD_DEVICE +#define CONFIG_CMD_MTDPARTS +#define CONFIG_MTD_PARTITIONS +#define CONFIG_RBTREE +#define CONFIG_LZO +#define CONFIG_CMD_UBI +#define CONFIG_CMD_UBIFS +#endif + +/* Ethernet */ +#define CONFIG_MACB +#define CONFIG_RMII +#define CONFIG_NET_RETRY_COUNT		20 +#define CONFIG_MACB_SEARCH_PHY + +#define CONFIG_SYS_LOAD_ADDR		0x22000000	/* load address */ + +#define CONFIG_SYS_MEMTEST_START	CONFIG_SYS_SDRAM_BASE +#define CONFIG_SYS_MEMTEST_END		0x26e00000 + +#ifdef CONFIG_SYS_USE_NANDFLASH +/* bootstrap + u-boot + env + linux in nandflash */ +#define CONFIG_ENV_IS_IN_NAND +#define CONFIG_ENV_OFFSET		0xc0000 +#define CONFIG_ENV_OFFSET_REDUND	0x100000 +#define CONFIG_ENV_SIZE		0x20000		/* 1 sector = 128 kB */ +#define CONFIG_BOOTCOMMAND	"nand read " \ +				"0x22000000 0x200000 0x300000; " \ +				"bootm 0x22000000" +#else +#ifdef CONFIG_SYS_USE_SPIFLASH +/* bootstrap + u-boot + env + linux in spi flash */ +#define CONFIG_ENV_IS_IN_SPI_FLASH +#define CONFIG_ENV_OFFSET	0x5000 +#define CONFIG_ENV_SIZE		0x3000 +#define CONFIG_ENV_SECT_SIZE	0x1000 +#define CONFIG_ENV_SPI_MAX_HZ	30000000 +#define CONFIG_BOOTCOMMAND	"sf probe 0; " \ +				"sf read 0x22000000 0x100000 0x300000; " \ +				"bootm 0x22000000" +#endif +#endif + +#define CONFIG_BOOTARGS		"mem=128M console=ttyS0,115200 " \ +				"mtdparts=atmel_nand:" \ +				"8M(bootstrap/uboot/kernel)ro,-(rootfs) " \ +				"root=/dev/mtdblock1 rw " \ +				"rootfstype=ubifs ubi.mtd=1 root=ubi0:rootfs" + +#define CONFIG_BAUDRATE		115200 + +#define CONFIG_SYS_PROMPT	"U-Boot> " +#define CONFIG_SYS_CBSIZE	256 +#define CONFIG_SYS_MAXARGS	16 +#define CONFIG_SYS_PBSIZE	(CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) \ +					+ 16) +#define CONFIG_SYS_LONGHELP +#define CONFIG_CMDLINE_EDITING +#define CONFIG_AUTO_COMPLETE +#define CONFIG_SYS_HUSH_PARSER + +/* + * Size of malloc() pool + */ +#define CONFIG_SYS_MALLOC_LEN		(512 * 1024 + 0x1000) + +#ifdef CONFIG_USE_IRQ +#error CONFIG_USE_IRQ not supported +#endif + +#endif diff --git a/include/configs/atngw100mkii.h b/include/configs/atngw100mkii.h new file mode 100644 index 000000000..f85374f88 --- /dev/null +++ b/include/configs/atngw100mkii.h @@ -0,0 +1,209 @@ +/* + * Copyright (C) 2006 Atmel Corporation + * + * Copyright (C) 2012 Andreas Bießmann <andreas.devel@googlemail.com> + * + * Configuration settings for the AVR32 Network Gateway + * + * 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 __CONFIG_H +#define __CONFIG_H + +#include <asm/arch/hardware.h> + +#define CONFIG_AVR32 +#define CONFIG_AT32AP +#define CONFIG_AT32AP7000 +#define CONFIG_ATNGW100MKII + +/* + * Timer clock frequency. We're using the CPU-internal COUNT register + * for this, so this is equivalent to the CPU core clock frequency + */ +#define CONFIG_SYS_HZ			1000 + +/* + * Set up the PLL to run at 140 MHz, the CPU to run at the PLL + * frequency, the HSB and PBB busses to run at 1/2 the PLL frequency + * and the PBA bus to run at 1/4 the PLL frequency. + */ +#define CONFIG_PLL +#define CONFIG_SYS_POWER_MANAGER +#define CONFIG_SYS_OSC0_HZ		20000000 +#define CONFIG_SYS_PLL0_DIV		1 +#define CONFIG_SYS_PLL0_MUL		7 +#define CONFIG_SYS_PLL0_SUPPRESS_CYCLES	16 +/* + * Set the CPU running at: + * PLL / (2^CONFIG_SYS_CLKDIV_CPU) = CPU MHz + */ +#define CONFIG_SYS_CLKDIV_CPU		0 +/* + * Set the HSB running at: + * PLL / (2^CONFIG_SYS_CLKDIV_HSB) = HSB MHz + */ +#define CONFIG_SYS_CLKDIV_HSB		1 +/* + * Set the PBA running at: + * PLL / (2^CONFIG_SYS_CLKDIV_PBA) = PBA MHz + */ +#define CONFIG_SYS_CLKDIV_PBA		2 +/* + * Set the PBB running at: + * PLL / (2^CONFIG_SYS_CLKDIV_PBB) = PBB MHz + */ +#define CONFIG_SYS_CLKDIV_PBB		1 + +/* Reserve VM regions for NOR flash, NAND flash and SDRAM */ +#define CONFIG_SYS_NR_VM_REGIONS	3 + +/* + * The PLLOPT register controls the PLL like this: + *   icp = PLLOPT<2> + *   ivco = PLLOPT<1:0> + * + * We want icp=1 (default) and ivco=0 (80-160 MHz) or ivco=2 (150-240MHz). + */ +#define CONFIG_SYS_PLL0_OPT		0x04 + +#define CONFIG_USART_BASE		ATMEL_BASE_USART1 +#define CONFIG_USART_ID			1 + +/* User serviceable stuff */ +#define CONFIG_DOS_PARTITION + +#define CONFIG_CMDLINE_TAG +#define CONFIG_SETUP_MEMORY_TAGS +#define CONFIG_INITRD_TAG + +#define CONFIG_STACKSIZE		(2048) + +#define CONFIG_BAUDRATE			115200 +#define CONFIG_BOOTARGS							\ +	"root=mtd:main rootfstype=jffs2" +#define CONFIG_BOOTCOMMAND						\ +	"fsload 0x10400000 /uImage; bootm" + +/* + * Only interrupt autoboot if <space> is pressed. Otherwise, garbage + * data on the serial line may interrupt the boot sequence. + */ +#define CONFIG_BOOTDELAY		1 +#define CONFIG_AUTOBOOT +#define CONFIG_AUTOBOOT_KEYED +#define CONFIG_AUTOBOOT_PROMPT		\ +	"Press SPACE to abort autoboot in %d seconds\n", bootdelay +#define CONFIG_AUTOBOOT_DELAY_STR	"d" +#define CONFIG_AUTOBOOT_STOP_STR	" " + +/* + * After booting the board for the first time, new ethernet addresses + * should be generated and assigned to the environment variables + * "ethaddr" and "eth1addr". This is normally done during production. + */ +#define CONFIG_OVERWRITE_ETHADDR_ONCE +#define CONFIG_NET_MULTI + +/* + * BOOTP/DHCP options + */ +#define CONFIG_BOOTP_SUBNETMASK +#define CONFIG_BOOTP_GATEWAY + +/* + * Command line configuration. + */ +#include <config_cmd_default.h> + +#define CONFIG_CMD_ASKENV +#define CONFIG_CMD_DHCP +#define CONFIG_CMD_EXT2 +#define CONFIG_CMD_FAT +#define CONFIG_CMD_JFFS2 +#define CONFIG_CMD_MMC +#define CONFIG_CMD_SF +#define CONFIG_CMD_SPI +#define CONFIG_CMD_MII + +#undef CONFIG_CMD_FPGA +#undef CONFIG_CMD_SETGETDCR +#undef CONFIG_CMD_XIMG + +#define CONFIG_ATMEL_USART +#define CONFIG_MACB +#define CONFIG_PORTMUX_PIO +#define CONFIG_SYS_NR_PIOS		5 +#define CONFIG_SYS_HSDRAMC +#define CONFIG_MMC +#define CONFIG_GENERIC_ATMEL_MCI +#define CONFIG_GENERIC_MMC +#define CONFIG_SYS_MMC_MAX_BLK_COUNT 1 +#define CONFIG_ATMEL_SPI + +#define CONFIG_SPI_FLASH +#define CONFIG_SPI_FLASH_ATMEL + +#define CONFIG_SYS_DCACHE_LINESZ	32 +#define CONFIG_SYS_ICACHE_LINESZ	32 + +#define CONFIG_NR_DRAM_BANKS		1 + +#define CONFIG_SYS_FLASH_CFI +#define CONFIG_FLASH_CFI_DRIVER +#define CONFIG_SYS_FLASH_PROTECTION + +#define CONFIG_SYS_FLASH_BASE		0x00000000 +#define CONFIG_SYS_FLASH_SIZE		0x800000 +#define CONFIG_SYS_MAX_FLASH_BANKS	1 +#define CONFIG_SYS_MAX_FLASH_SECT	135 + +#define CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_FLASH_BASE + +#define CONFIG_SYS_INTRAM_BASE		INTERNAL_SRAM_BASE +#define CONFIG_SYS_INTRAM_SIZE		INTERNAL_SRAM_SIZE +#define CONFIG_SYS_SDRAM_BASE		EBI_SDRAM_BASE + +#define CONFIG_ENV_IS_IN_FLASH +#define CONFIG_ENV_SIZE			65536 +#define CONFIG_ENV_ADDR			(CONFIG_SYS_FLASH_BASE + CONFIG_SYS_FLASH_SIZE - CONFIG_ENV_SIZE) + +#define CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_INTRAM_BASE + CONFIG_SYS_INTRAM_SIZE) + +#define CONFIG_SYS_MALLOC_LEN		(256*1024) +#define CONFIG_SYS_DMA_ALLOC_LEN	(16384) + +/* Allow 4MB for the kernel run-time image */ +#define CONFIG_SYS_LOAD_ADDR		(EBI_SDRAM_BASE + 0x00400000) +#define CONFIG_SYS_BOOTPARAMS_LEN	(16 * 1024) + +/* Other configuration settings that shouldn't have to change all that often */ +#define CONFIG_SYS_PROMPT		"U-Boot> " +#define CONFIG_SYS_CBSIZE		256 +#define CONFIG_SYS_MAXARGS		16 +#define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16) +#define CONFIG_SYS_LONGHELP + +#define CONFIG_SYS_MEMTEST_START	CONFIG_SYS_SDRAM_BASE +#define CONFIG_SYS_MEMTEST_END		(CONFIG_SYS_MEMTEST_START + 0x1f00000) + +#define CONFIG_MTD_DEVICE +#define CONFIG_MTD_PARTITIONS + +#endif /* __CONFIG_H */ diff --git a/include/configs/balloon3.h b/include/configs/balloon3.h index 97fdc2c9c..756f40956 100644 --- a/include/configs/balloon3.h +++ b/include/configs/balloon3.h @@ -102,15 +102,6 @@  #define	CONFIG_SYS_CPUSPEED		0x290		/* 520MHz */  /* - * Stack sizes - */ -#define	CONFIG_STACKSIZE		(128*1024)	/* regular stack */ -#ifdef	CONFIG_USE_IRQ -#define	CONFIG_STACKSIZE_IRQ		(4*1024)	/* IRQ stack */ -#define	CONFIG_STACKSIZE_FIQ		(4*1024)	/* FIQ stack */ -#endif - -/*   * DRAM Map   */  #define	CONFIG_NR_DRAM_BANKS		3		/* 2 banks of DRAM */ diff --git a/include/configs/ca9x4_ct_vxp.h b/include/configs/ca9x4_ct_vxp.h index 14b81460b..312fd947b 100644 --- a/include/configs/ca9x4_ct_vxp.h +++ b/include/configs/ca9x4_ct_vxp.h @@ -105,13 +105,6 @@  #define LINUX_BOOT_PARAM_ADDR		0x60000200  #define CONFIG_BOOTDELAY		2 -/* Stack sizes are set up in start.S using the settings below */ -#define CONFIG_STACKSIZE		(128 * 1024)	/* regular stack */ -#ifdef CONFIG_USE_IRQ -#define CONFIG_STACKSIZE_IRQ		(4 * 1024)	/* IRQ stack */ -#define CONFIG_STACKSIZE_FIQ		(4 * 1024)	/* FIQ stack */ -#endif -  /* Physical Memory Map */  #define CONFIG_NR_DRAM_BANKS		2  #define PHYS_SDRAM_1			0x60000000	/* SDRAM Bank #1 */ diff --git a/include/configs/calimain.h b/include/configs/calimain.h index e31e40b9f..5c2b35d58 100644 --- a/include/configs/calimain.h +++ b/include/configs/calimain.h @@ -161,7 +161,6 @@  #define CONFIG_SYS_MEMTEST_END		(CONFIG_SYS_MEMTEST_START + (16 << 20))  #define CONFIG_NR_DRAM_BANKS	1 /* we have 1 bank of DRAM */ -#define CONFIG_STACKSIZE	(256*1024) /* regular stack */  /*   * Serial Driver info @@ -352,6 +351,7 @@  #define CONFIG_SYS_INIT_SP_ADDR		(0x8001ff00)  #define CONFIG_BOOTCOUNT_LIMIT +#define CONFIG_SYS_BOOTCOUNT_LE		/* Use little-endian accessors */  #define CONFIG_SYS_BOOTCOUNT_ADDR	DAVINCI_RTC_BASE  #ifndef __ASSEMBLY__ diff --git a/include/configs/cam_enc_4xx.h b/include/configs/cam_enc_4xx.h index 771ac9c3b..91ab81284 100644 --- a/include/configs/cam_enc_4xx.h +++ b/include/configs/cam_enc_4xx.h @@ -146,7 +146,6 @@  #define CONFIG_MX_CYCLIC  /* U-Boot general configuration */ -#undef CONFIG_USE_IRQ				/* No IRQ/FIQ in U-Boot */  #define CONFIG_BOOTFILE		"uImage"	/* Boot file name */  #define CONFIG_SYS_PROMPT	"cam_enc_4xx> "	/* Monitor Command Prompt */  #define CONFIG_SYS_CBSIZE	1024		/* Console I/O Buffer Size  */ @@ -191,7 +190,6 @@  #define CONFIG_TIMESTAMP  /* U-Boot memory configuration */ -#define CONFIG_STACKSIZE		(256 << 10)	/* 256 KiB */  #define CONFIG_SYS_MALLOC_LEN		(1 << 20)	/* 1 MiB */  #define CONFIG_SYS_MEMTEST_START	0x80000000	/* physical address */  #define CONFIG_SYS_MEMTEST_END		0x81000000	/* test 16MB RAM */ diff --git a/include/configs/cm4008.h b/include/configs/cm4008.h index 408e91832..d2fd72a4a 100644 --- a/include/configs/cm4008.h +++ b/include/configs/cm4008.h @@ -31,8 +31,6 @@  #define CONFIG_KS8695	1		/* it is a KS8695 CPU */  #define CONFIG_CM4008	1		/* it is an OpenGear CM4008 boad */ -#undef CONFIG_USE_IRQ			/* we don't need IRQ/FIQ stuff	*/ -  #define CONFIG_CMDLINE_TAG	 1	/* enable passing of ATAGs	*/  #define CONFIG_SETUP_MEMORY_TAGS 1  #define CONFIG_INITRD_TAG	 1 @@ -96,17 +94,6 @@  #define CONFIG_SYS_HZ			(1000)		/* 1ms resolution ticks */  /*----------------------------------------------------------------------- - * Stack sizes - * - * The stack sizes are set up in start.S using the settings below - */ -#define CONFIG_STACKSIZE	(128*1024)	/* regular stack */ -#ifdef CONFIG_USE_IRQ -#define CONFIG_STACKSIZE_IRQ	(4*1024)	/* IRQ stack */ -#define CONFIG_STACKSIZE_FIQ	(4*1024)	/* FIQ stack */ -#endif - -/*-----------------------------------------------------------------------   * Physical Memory Map   */  #define CONFIG_NR_DRAM_BANKS	1	   /* we have 1 bank of DRAM */ diff --git a/include/configs/cm41xx.h b/include/configs/cm41xx.h index d85a6001a..0e7a21743 100644 --- a/include/configs/cm41xx.h +++ b/include/configs/cm41xx.h @@ -31,8 +31,6 @@  #define CONFIG_KS8695	1		/* it is a KS8695 CPU */  #define CONFIG_CM41xx	1		/* it is an OpenGear CM41xx boad */ -#undef CONFIG_USE_IRQ			/* we don't need IRQ/FIQ stuff	*/ -  #define CONFIG_CMDLINE_TAG	 1	/* enable passing of ATAGs	*/  #define CONFIG_SETUP_MEMORY_TAGS 1  #define CONFIG_INITRD_TAG	 1 @@ -96,17 +94,6 @@  #define CONFIG_SYS_HZ			(1000)		/* 1ms resolution ticks */  /*----------------------------------------------------------------------- - * Stack sizes - * - * The stack sizes are set up in start.S using the settings below - */ -#define CONFIG_STACKSIZE	(128*1024)	/* regular stack */ -#ifdef CONFIG_USE_IRQ -#define CONFIG_STACKSIZE_IRQ	(4*1024)	/* IRQ stack */ -#define CONFIG_STACKSIZE_FIQ	(4*1024)	/* FIQ stack */ -#endif - -/*-----------------------------------------------------------------------   * Physical Memory Map   */  #define CONFIG_NR_DRAM_BANKS	1	   /* we have 1 bank of DRAM */ diff --git a/include/configs/cm_t35.h b/include/configs/cm_t35.h index ee4bce5d3..46c556ddc 100644 --- a/include/configs/cm_t35.h +++ b/include/configs/cm_t35.h @@ -37,6 +37,7 @@   */  #define CONFIG_OMAP	/* in a TI OMAP core */  #define CONFIG_OMAP34XX	/* which is a 34XX */ +#define CONFIG_OMAP_GPIO  #define CONFIG_CM_T3X	/* working with CM-T35 and CM-T3730 */  #define CONFIG_SYS_TEXT_BASE	0x80008000 @@ -56,7 +57,6 @@  #define V_OSCK			26000000	/* Clock output from T2 */  #define V_SCLK			(V_OSCK >> 1) -#undef CONFIG_USE_IRQ				/* no support for IRQs */  #define CONFIG_MISC_INIT_R  #define CONFIG_OF_LIBFDT		1 @@ -278,13 +278,6 @@  #define CONFIG_SYS_HZ			1000  /*----------------------------------------------------------------------- - * Stack sizes - * - * The stack sizes are set up in start.S using the settings below - */ -#define CONFIG_STACKSIZE	(128 << 10)	/* regular stack 128 KiB */ - -/*-----------------------------------------------------------------------   * Physical Memory Map   */  #define CONFIG_NR_DRAM_BANKS	1	/* CS1 is never populated */ diff --git a/include/configs/colibri_pxa270.h b/include/configs/colibri_pxa270.h index 1f02f3fee..ae84344e4 100644 --- a/include/configs/colibri_pxa270.h +++ b/include/configs/colibri_pxa270.h @@ -117,17 +117,6 @@  #define	CONFIG_SYS_CPUSPEED		0x290		/* 520MHz */  /* - * Stack sizes - * - * The stack sizes are set up in start.S using the settings below - */ -#define	CONFIG_STACKSIZE		(128 * 1024)	/* regular stack */ -#ifdef	CONFIG_USE_IRQ -#define	CONFIG_STACKSIZE_IRQ		(4 * 1024)	/* IRQ stack */ -#define	CONFIG_STACKSIZE_FIQ		(4 * 1024)	/* FIQ stack */ -#endif - -/*   * DRAM Map   */  #define	CONFIG_NR_DRAM_BANKS		1		/* We have 1 bank of DRAM */ diff --git a/include/configs/cpu9260.h b/include/configs/cpu9260.h index a877066c4..d65415a62 100644 --- a/include/configs/cpu9260.h +++ b/include/configs/cpu9260.h @@ -51,7 +51,6 @@  #define CONFIG_AT91FAMILY  #define CONFIG_ARCH_CPU_INIT -#undef CONFIG_USE_IRQ  #define CONFIG_DISPLAY_CPUINFO  #define CONFIG_BOARD_EARLY_INIT_F @@ -511,10 +510,4 @@  #define CONFIG_SYS_INIT_SP_ADDR	(CONFIG_SYS_SDRAM_BASE + 4 * 1024 - \  				GENERATED_GBL_DATA_SIZE) -#define CONFIG_STACKSIZE		(32 * 1024) - -#if defined(CONFIG_USE_IRQ) -#error CONFIG_USE_IRQ not supported -#endif -  #endif diff --git a/include/configs/cpuat91.h b/include/configs/cpuat91.h index dc676dffd..15d56c346 100644 --- a/include/configs/cpuat91.h +++ b/include/configs/cpuat91.h @@ -46,7 +46,6 @@  #define CONFIG_ARM920T  #define CONFIG_AT91RM9200  #define CONFIG_CPUAT91 -#undef CONFIG_USE_IRQ  #define USE_920T_MMU  #include <asm/hardware.h>	/* needed for port definitions */ @@ -211,15 +210,6 @@  #define CONFIG_SYS_INIT_SP_ADDR	(CONFIG_SYS_SDRAM_BASE + 4 * 1024 - \  				GENERATED_GBL_DATA_SIZE) -#define CONFIG_STACKSIZE		(32 * 1024) -#define CONFIG_STACKSIZE_IRQ		(4 * 1024) -#define CONFIG_STACKSIZE_FIQ		(4 * 1024) - - -#if defined(CONFIG_USE_IRQ) -#error CONFIG_USE_IRQ not supported -#endif -  #define CONFIG_DEVICE_NULLDEV  #define CONFIG_SILENT_CONSOLE diff --git a/include/configs/da830evm.h b/include/configs/da830evm.h index 51dc6643d..f7ac256a0 100644 --- a/include/configs/da830evm.h +++ b/include/configs/da830evm.h @@ -53,7 +53,6 @@  #define CONFIG_SYS_MEMTEST_END		(CONFIG_SYS_MEMTEST_START + \  						(32 << 20))  #define CONFIG_NR_DRAM_BANKS	1 /* we have 1 bank of DRAM */ -#define CONFIG_STACKSIZE	(256*1024) /* regular stack */  /*   * Serial Driver info @@ -157,7 +156,6 @@  /*   * U-Boot general configuration   */ -#undef CONFIG_USE_IRQ			/* No IRQ/FIQ in U-Boot */  #undef CONFIG_MISC_INIT_R  #undef CONFIG_BOOTDELAY  #define CONFIG_BOOTFILE		"uImage" /* Boot file name */ diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h index e6adb1fe5..09a966092 100644 --- a/include/configs/da850evm.h +++ b/include/configs/da850evm.h @@ -27,7 +27,10 @@   * Board   */  #define CONFIG_DRIVER_TI_EMAC +/* check if direct NOR boot config is used */ +#ifndef CONFIG_DIRECT_NOR_BOOT  #define CONFIG_USE_SPIFLASH +#endif  /* @@ -43,10 +46,19 @@  #define CONFIG_SYS_TIMERBASE		DAVINCI_TIMER0_BASE  #define CONFIG_SYS_HZ_CLOCK		clk_get(DAVINCI_AUXCLK_CLKID)  #define CONFIG_SYS_HZ			1000 -#define CONFIG_SYS_TEXT_BASE		0xc1080000  #define CONFIG_SYS_DA850_PLL_INIT  #define CONFIG_SYS_DA850_DDR_INIT +#ifdef CONFIG_DIRECT_NOR_BOOT +#define CONFIG_ARCH_CPU_INIT +#define CONFIG_DA8XX_GPIO +#define CONFIG_SYS_TEXT_BASE		0x60000000 +#define CONFIG_SYS_DV_NOR_BOOT_CFG	(0x11) +#define CONFIG_DA850_LOWLEVEL +#else +#define CONFIG_SYS_TEXT_BASE		0xc1080000 +#endif +  /*   * Memory Info   */ @@ -62,7 +74,6 @@  #define CONFIG_SYS_MEMTEST_END 	(PHYS_SDRAM_1 + 0x2000000 + 16*1024*1024)  #define CONFIG_NR_DRAM_BANKS	1 /* we have 1 bank of DRAM */ -#define CONFIG_STACKSIZE	(256*1024) /* regular stack */  #define CONFIG_SYS_DA850_SYSCFG_SUSPSRC (	\  	DAVINCI_SYSCFG_SUSPSRC_TIMER0 |		\ @@ -154,6 +165,16 @@  #define CONFIG_SF_DEFAULT_SPEED		30000000  #define CONFIG_ENV_SPI_MAX_HZ	CONFIG_SF_DEFAULT_SPEED +#ifdef CONFIG_USE_SPIFLASH +#define CONFIG_SPL_SPI_SUPPORT +#define CONFIG_SPL_SPI_FLASH_SUPPORT +#define CONFIG_SPL_SPI_LOAD +#define CONFIG_SPL_SPI_BUS 0 +#define CONFIG_SPL_SPI_CS 0 +#define CONFIG_SYS_SPI_U_BOOT_OFFS	0x8000 +#define CONFIG_SYS_SPI_U_BOOT_SIZE	0x30000 +#endif +  /*   * I2C Configuration   */ @@ -182,6 +203,32 @@  #define CONFIG_SYS_ALE_MASK		0x8  #undef CONFIG_SYS_NAND_HW_ECC  #define CONFIG_SYS_MAX_NAND_DEVICE	1 /* Max number of NAND devices */ +#define CONFIG_SYS_NAND_HW_ECC_OOBFIRST +#define CONFIG_SYS_NAND_5_ADDR_CYCLE +#define CONFIG_SYS_NAND_PAGE_SIZE	(2 << 10) +#define CONFIG_SYS_NAND_BLOCK_SIZE	(128 << 10) +#define CONFIG_SYS_NAND_U_BOOT_OFFS	0x28000 +#define CONFIG_SYS_NAND_U_BOOT_SIZE	0x60000 +#define CONFIG_SYS_NAND_U_BOOT_DST	0xc1080000 +#define CONFIG_SYS_NAND_U_BOOT_START	CONFIG_SYS_NAND_U_BOOT_DST +#define CONFIG_SYS_NAND_U_BOOT_RELOC_SP	(CONFIG_SYS_NAND_U_BOOT_DST - \ +					CONFIG_SYS_NAND_U_BOOT_SIZE - \ +					CONFIG_SYS_MALLOC_LEN -       \ +					GENERATED_GBL_DATA_SIZE) +#define CONFIG_SYS_NAND_ECCPOS		{				\ +				24, 25, 26, 27, 28, \ +				29, 30, 31, 32, 33, 34, 35, 36, 37, 38, \ +				39, 40, 41, 42, 43, 44, 45, 46, 47, 48, \ +				49, 50, 51, 52, 53, 54, 55, 56, 57, 58, \ +				59, 60, 61, 62, 63 } +#define CONFIG_SYS_NAND_PAGE_COUNT	64 +#define CONFIG_SYS_NAND_BAD_BLOCK_POS	0 +#define CONFIG_SYS_NAND_ECCSIZE		512 +#define CONFIG_SYS_NAND_ECCBYTES	10 +#define CONFIG_SYS_NAND_OOBSIZE		64 +#define CONFIG_SPL_NAND_SUPPORT +#define CONFIG_SPL_NAND_SIMPLE +#define CONFIG_SPL_NAND_LOAD  #endif  /* @@ -311,13 +358,28 @@  #undef CONFIG_CMD_ENV  #endif +/* SD/MMC configuration */ +#ifndef CONFIG_USE_NOR +#define CONFIG_MMC +#define CONFIG_DAVINCI_MMC_SD1 +#define CONFIG_GENERIC_MMC +#define CONFIG_DAVINCI_MMC +#endif + +/* + * Enable MMC commands only when + * MMC support is present + */ +#ifdef CONFIG_MMC +#define CONFIG_DOS_PARTITION +#define CONFIG_CMD_EXT2 +#define CONFIG_CMD_FAT +#define CONFIG_CMD_MMC +#endif + +#ifndef CONFIG_DIRECT_NOR_BOOT  /* defines for SPL */  #define CONFIG_SPL -#define CONFIG_SPL_SPI_SUPPORT -#define CONFIG_SPL_SPI_FLASH_SUPPORT -#define CONFIG_SPL_SPI_LOAD -#define CONFIG_SPL_SPI_BUS 0 -#define CONFIG_SPL_SPI_CS 0  #define CONFIG_SPL_SERIAL_SUPPORT  #define CONFIG_SPL_LIBCOMMON_SUPPORT  #define CONFIG_SPL_LIBGENERIC_SUPPORT @@ -325,11 +387,25 @@  #define CONFIG_SPL_STACK	0x8001ff00  #define CONFIG_SPL_TEXT_BASE	0x80000000  #define CONFIG_SPL_MAX_SIZE	32768 -#define CONFIG_SYS_SPI_U_BOOT_OFFS	0x8000 -#define CONFIG_SYS_SPI_U_BOOT_SIZE	0x30000 +#endif + +/* Load U-Boot Image From MMC */ +#ifdef CONFIG_SPL_MMC_LOAD +#define CONFIG_SPL_MMC_SUPPORT +#define CONFIG_SPL_FAT_SUPPORT +#define CONFIG_SPL_LIBDISK_SUPPORT +#define CONFIG_SYS_MMC_U_BOOT_OFFS	0x75 +#define CONFIG_SYS_MMC_U_BOOT_SIZE	0x30000 +#undef CONFIG_SPL_SPI_LOAD +#endif  /* additions for new relocation code, must added to all boards */  #define CONFIG_SYS_SDRAM_BASE		0xc0000000 + +#ifdef CONFIG_DIRECT_NOR_BOOT +#define CONFIG_SYS_INIT_SP_ADDR		0x8001ff00 +#else  #define CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_SDRAM_BASE + 0x1000 - /* Fix this */ \  					GENERATED_GBL_DATA_SIZE) +#endif /* CONFIG_DIRECT_NOR_BOOT */  #endif /* __CONFIG_H */ diff --git a/include/configs/davinci_dm355evm.h b/include/configs/davinci_dm355evm.h index a30d24c29..de795a2ae 100644 --- a/include/configs/davinci_dm355evm.h +++ b/include/configs/davinci_dm355evm.h @@ -131,7 +131,6 @@  #define CONFIG_MX_CYCLIC  /* U-Boot general configuration */ -#undef CONFIG_USE_IRQ				/* No IRQ/FIQ in U-Boot */  #define CONFIG_BOOTFILE		"uImage"	/* Boot file name */  #define CONFIG_SYS_PROMPT	"DM355 EVM # "	/* Monitor Command Prompt */  #define CONFIG_SYS_CBSIZE	1024		/* Console I/O Buffer Size  */ @@ -170,7 +169,6 @@  #define CONFIG_NET_RETRY_COUNT 10  /* U-Boot memory configuration */ -#define CONFIG_STACKSIZE		(256 << 10)	/* 256 KiB */  #define CONFIG_SYS_MALLOC_LEN		(1 << 20)	/* 1 MiB */  #define CONFIG_SYS_MEMTEST_START	0x87000000	/* physical address */  #define CONFIG_SYS_MEMTEST_END		0x88000000	/* test 16MB RAM */ diff --git a/include/configs/davinci_dm355leopard.h b/include/configs/davinci_dm355leopard.h index 1cd3d2eae..88e667383 100644 --- a/include/configs/davinci_dm355leopard.h +++ b/include/configs/davinci_dm355leopard.h @@ -99,7 +99,6 @@  #define CONFIG_MX_CYCLIC  /* U-Boot general configuration */ -#undef CONFIG_USE_IRQ				/* No IRQ/FIQ in U-Boot */  #define CONFIG_BOOTFILE		"uImage"	/* Boot file name */  #define CONFIG_SYS_PROMPT	"DM355 LEOPARD # "  #define CONFIG_SYS_CBSIZE	1024		/* Console I/O Buffer Size  */ @@ -130,7 +129,6 @@  #define CONFIG_NET_RETRY_COUNT 10  /* U-Boot memory configuration */ -#define CONFIG_STACKSIZE		(256 << 10)	/* 256 KiB */  #define CONFIG_SYS_MALLOC_LEN		(1 << 20)	/* 1 MiB */  #define CONFIG_SYS_MEMTEST_START	0x87000000	/* physical address */  #define CONFIG_SYS_MEMTEST_END		0x88000000	/* test 16MB RAM */ diff --git a/include/configs/davinci_dm365evm.h b/include/configs/davinci_dm365evm.h index bcf10ca55..6a331aa9f 100644 --- a/include/configs/davinci_dm365evm.h +++ b/include/configs/davinci_dm365evm.h @@ -165,7 +165,6 @@  #define CONFIG_MX_CYCLIC  /* U-Boot general configuration */ -#undef CONFIG_USE_IRQ				/* No IRQ/FIQ in U-Boot */  #define CONFIG_BOOTFILE		"uImage"	/* Boot file name */  #define CONFIG_SYS_PROMPT	"DM36x EVM # "	/* Monitor Command Prompt */  #define CONFIG_SYS_CBSIZE	1024		/* Console I/O Buffer Size  */ @@ -202,7 +201,6 @@  #define CONFIG_TIMESTAMP  /* U-Boot memory configuration */ -#define CONFIG_STACKSIZE		(256 << 10)	/* 256 KiB */  #define CONFIG_SYS_MALLOC_LEN		(1 << 20)	/* 1 MiB */  #define CONFIG_SYS_MEMTEST_START	0x87000000	/* physical address */  #define CONFIG_SYS_MEMTEST_END		0x88000000	/* test 16MB RAM */ diff --git a/include/configs/davinci_dm6467evm.h b/include/configs/davinci_dm6467evm.h index 6734ea319..366c77f01 100644 --- a/include/configs/davinci_dm6467evm.h +++ b/include/configs/davinci_dm6467evm.h @@ -54,7 +54,6 @@ extern unsigned int davinci_arm_clk_get(void);  #define CONFIG_SYS_MEMTEST_START	0x80000000  #define CONFIG_SYS_MEMTEST_END		0x81000000	/* 16MB RAM test */  #define CONFIG_NR_DRAM_BANKS		1 -#define CONFIG_STACKSIZE		(256 << 10)	/* 256 KiB */  #define PHYS_SDRAM_1			0x80000000	/* DDR Start */  #define PHYS_SDRAM_1_SIZE		(256 << 20)	/* DDR size 256MB */ @@ -108,7 +107,6 @@ extern unsigned int davinci_arm_clk_get(void);  #endif  /* U-Boot general configuration */ -#undef CONFIG_USE_IRQ				/* No IRQ/FIQ in U-Boot */  #define CONFIG_BOOTDELAY	3  #define CONFIG_BOOTFILE		"uImage"	/* Boot file name */  #define CONFIG_SYS_PROMPT	"DM6467 EVM > "	/* Monitor Command Prompt */ diff --git a/include/configs/davinci_dvevm.h b/include/configs/davinci_dvevm.h index e4443ec89..ab9cedd07 100644 --- a/include/configs/davinci_dvevm.h +++ b/include/configs/davinci_dvevm.h @@ -74,7 +74,6 @@  #define CONFIG_SYS_MEMTEST_START	0x80000000	/* memtest start address */  #define CONFIG_SYS_MEMTEST_END		0x81000000	/* 16MB RAM test */  #define CONFIG_NR_DRAM_BANKS	1		/* we have 1 bank of DRAM */ -#define CONFIG_STACKSIZE	(256*1024)	/* regular stack */  #define PHYS_SDRAM_1		0x80000000	/* DDR Start */  #define PHYS_SDRAM_1_SIZE	0x10000000	/* DDR size 256MB */ @@ -157,7 +156,6 @@  /*==============================*/  /* U-Boot general configuration */  /*==============================*/ -#undef	CONFIG_USE_IRQ			/* No IRQ/FIQ in U-Boot */  #define CONFIG_MISC_INIT_R  #undef CONFIG_BOOTDELAY  #define CONFIG_BOOTFILE		"uImage"	/* Boot file name */ diff --git a/include/configs/davinci_schmoogie.h b/include/configs/davinci_schmoogie.h index 93df4ffe3..8eb7af921 100644 --- a/include/configs/davinci_schmoogie.h +++ b/include/configs/davinci_schmoogie.h @@ -44,7 +44,6 @@  #define CONFIG_SYS_MEMTEST_START	0x80000000	/* memtest start address */  #define CONFIG_SYS_MEMTEST_END		0x81000000	/* 16MB RAM test */  #define CONFIG_NR_DRAM_BANKS	1		/* we have 1 bank of DRAM */ -#define CONFIG_STACKSIZE	(256*1024)	/* regular stack */  #define PHYS_SDRAM_1		0x80000000	/* DDR Start */  #define PHYS_SDRAM_1_SIZE	0x08000000	/* DDR size 128MB */  #define DDR_4BANKS				/* 4-bank DDR2 (128MB) */ @@ -101,7 +100,6 @@  /*==============================*/  /* U-Boot general configuration */  /*==============================*/ -#undef	CONFIG_USE_IRQ			/* No IRQ/FIQ in U-Boot */  #define CONFIG_MISC_INIT_R  #undef CONFIG_BOOTDELAY  #define CONFIG_BOOTFILE		"uImage"	/* Boot file name */ diff --git a/include/configs/davinci_sffsdr.h b/include/configs/davinci_sffsdr.h index 23b0ba700..958b19ad3 100644 --- a/include/configs/davinci_sffsdr.h +++ b/include/configs/davinci_sffsdr.h @@ -44,7 +44,6 @@  #define CONFIG_SYS_MEMTEST_START	0x80000000	/* memtest start address */  #define CONFIG_SYS_MEMTEST_END		0x81000000	/* 16MB RAM test */  #define CONFIG_NR_DRAM_BANKS	1		/* we have 1 bank of DRAM */ -#define CONFIG_STACKSIZE	(256*1024)	/* regular stack */  #define PHYS_SDRAM_1		0x80000000	/* DDR Start */  #define PHYS_SDRAM_1_SIZE	0x08000000	/* DDR size 128MB */  #define DDR_4BANKS				/* 4-bank DDR2 (128MB) */ @@ -88,7 +87,6 @@  #define CONFIG_SYS_I2C_PCA9543_ADDR_LEN	0	/* Single register. */  #define CONFIG_SYS_I2C_PCA9543_ENABLE_CH0	0x01	/* Enable channel 0. */  /* U-Boot general configuration */ -#undef CONFIG_USE_IRQ				/* No IRQ/FIQ in U-Boot */  #define CONFIG_MISC_INIT_R  #define CONFIG_BOOTDELAY	5		/* Autoboot after 5 seconds. */  #define CONFIG_BOOTFILE		"uImage"	/* Boot file name */ diff --git a/include/configs/davinci_sonata.h b/include/configs/davinci_sonata.h index 36a8c0668..3d8d392e8 100644 --- a/include/configs/davinci_sonata.h +++ b/include/configs/davinci_sonata.h @@ -76,7 +76,6 @@  #define CONFIG_SYS_MEMTEST_START	0x80000000	/* memtest start address */  #define CONFIG_SYS_MEMTEST_END		0x81000000	/* 16MB RAM test */  #define CONFIG_NR_DRAM_BANKS	1		/* we have 1 bank of DRAM */ -#define CONFIG_STACKSIZE	(256*1024)	/* regular stack */  #define PHYS_SDRAM_1		0x80000000	/* DDR Start */  #define PHYS_SDRAM_1_SIZE	0x08000000	/* DDR size 128MB */  #define DDR_4BANKS				/* 4-bank DDR2 (128MB) */ @@ -147,7 +146,6 @@  /*==============================*/  /* U-Boot general configuration */  /*==============================*/ -#undef	CONFIG_USE_IRQ			/* No IRQ/FIQ in U-Boot */  #define CONFIG_MISC_INIT_R  #undef CONFIG_BOOTDELAY  #define CONFIG_BOOTFILE		"uImage"	/* Boot file name */ diff --git a/include/configs/devkit3250.h b/include/configs/devkit3250.h index 9f15ffb0f..18d7374ba 100644 --- a/include/configs/devkit3250.h +++ b/include/configs/devkit3250.h @@ -41,7 +41,6 @@   * Memory configurations   */  #define CONFIG_NR_DRAM_BANKS		1 -#define CONFIG_STACKSIZE		SZ_32K  #define CONFIG_SYS_MALLOC_LEN		SZ_1M  #define CONFIG_SYS_GBL_DATA_SIZE	128  #define CONFIG_SYS_SDRAM_BASE		EMC_DYCS0_BASE diff --git a/include/configs/devkit8000.h b/include/configs/devkit8000.h index 037a5bb32..de75dafc9 100644 --- a/include/configs/devkit8000.h +++ b/include/configs/devkit8000.h @@ -36,6 +36,8 @@  #define CONFIG_OMAP34XX		1	/* which is a 34XX */  #define CONFIG_OMAP3_DEVKIT8000	1	/* working with DevKit8000 */  #define CONFIG_MACH_TYPE	MACH_TYPE_DEVKIT8000 +#define CONFIG_OMAP_GPIO +  /*   * 1MB into the SDRAM to allow for SPL's bss at the beginning of SDRAM   * 64 bytes before this address should be set aside for u-boot.img's @@ -57,7 +59,6 @@  #define V_OSCK				26000000	/* Clock output from T2 */  #define V_SCLK				(V_OSCK >> 1) -#undef CONFIG_USE_IRQ			/* no support for IRQs */  #define CONFIG_MISC_INIT_R  #define CONFIG_CMDLINE_TAG		1	/* enable passing of ATAGs */ @@ -274,9 +275,6 @@  #define CONFIG_SYS_PTV			2 /* Divisor: 2^(PTV+1) => 8 */  #define CONFIG_SYS_HZ			1000 -/* The stack sizes are set up in start.S using the settings below */ -#define CONFIG_STACKSIZE	(128 << 10)	/* regular stack 128 KiB */ -  /*  Physical Memory Map  */  #define CONFIG_NR_DRAM_BANKS		2 /* CS1 may or may not be populated */  #define PHYS_SDRAM_1			OMAP34XX_SDRC_CS0 @@ -313,6 +311,7 @@  #define CONFIG_SPL_I2C_SUPPORT  #define CONFIG_SPL_LIBGENERIC_SUPPORT  #define CONFIG_SPL_SERIAL_SUPPORT +#define CONFIG_SPL_GPIO_SUPPORT  #define CONFIG_SPL_POWER_SUPPORT  #define CONFIG_SPL_NAND_SUPPORT  #define CONFIG_SPL_MMC_SUPPORT diff --git a/include/configs/dig297.h b/include/configs/dig297.h index 4845d5198..dda758269 100644 --- a/include/configs/dig297.h +++ b/include/configs/dig297.h @@ -45,6 +45,7 @@   */  #define CONFIG_OMAP		/* in a TI OMAP core */  #define CONFIG_OMAP34XX		/* which is a 34XX */ +#define CONFIG_OMAP_GPIO  #define CONFIG_SYS_TEXT_BASE	0x80008000 @@ -63,7 +64,6 @@  #define V_OSCK			26000000	/* Clock output from T2 */  #define V_SCLK			(V_OSCK >> 1) -#undef CONFIG_USE_IRQ				/* no support for IRQs */  #define CONFIG_MISC_INIT_R  #define CONFIG_CMDLINE_TAG			/* enable passing of ATAGs */ @@ -259,17 +259,6 @@  #define CONFIG_SYS_HZ			1000  /*----------------------------------------------------------------------- - * Stack sizes - * - * The stack sizes are set up in start.S using the settings below - */ -#define CONFIG_STACKSIZE	(128 << 10)	/* regular stack 128 KiB */ -#ifdef CONFIG_USE_IRQ -#define CONFIG_STACKSIZE_IRQ	(4 << 10)	/* IRQ stack 4 KiB */ -#define CONFIG_STACKSIZE_FIQ	(4 << 10)	/* FIQ stack 4 KiB */ -#endif - -/*-----------------------------------------------------------------------   * Physical Memory Map   */  #define CONFIG_NR_DRAM_BANKS	2	/* CS1 may or may not be populated */ diff --git a/include/configs/dvlhost.h b/include/configs/dvlhost.h index 4eda91e7f..a2af1e37f 100644 --- a/include/configs/dvlhost.h +++ b/include/configs/dvlhost.h @@ -104,13 +104,6 @@  					  115200, 230400 }  #define CONFIG_SERIAL_RTS_ACTIVE	1 -/* - * Stack sizes - * - * The stack sizes are set up in start.S using the settings below - */ -#define CONFIG_STACKSIZE		(128*1024)	/* regular stack */ -  /* Expansion bus settings */  #define CONFIG_SYS_EXP_CS0		0xbd113442 diff --git a/include/configs/ea20.h b/include/configs/ea20.h index a9caa814d..337d50492 100644 --- a/include/configs/ea20.h +++ b/include/configs/ea20.h @@ -65,7 +65,6 @@  #define CONFIG_SYS_MEMTEST_END	(PHYS_SDRAM_1 + 0x2000000 + 16*1024*1024)  #define CONFIG_NR_DRAM_BANKS	1 /* we have 1 bank of DRAM */ -#define CONFIG_STACKSIZE	(256*1024) /* regular stack */  /*   * Serial Driver info diff --git a/include/configs/eb_cpux9k2.h b/include/configs/eb_cpux9k2.h index 4d8be2b01..9371ec31f 100644 --- a/include/configs/eb_cpux9k2.h +++ b/include/configs/eb_cpux9k2.h @@ -44,7 +44,12 @@  #define MACH_TYPE_EB_CPUX9K2		1977  #define CONFIG_MACH_TYPE		MACH_TYPE_EB_CPUX9K2  /*--------------------------------------------------------------------------*/ -#define CONFIG_SYS_TEXT_BASE 		0x00000000 +#ifndef CONFIG_RAMBOOT +#define CONFIG_SYS_TEXT_BASE		0x00000000 +#else +#define CONFIG_SKIP_LOWLEVEL_INIT +#define CONFIG_SYS_TEXT_BASE		0x21f00000 +#endif  #define CONFIG_SYS_LOAD_ADDR		0x21000000  /* default load address */  #define CONFIG_SYS_BOOT_SIZE		0x00 /* 0 KBytes */ @@ -61,8 +66,6 @@  #define CONFIG_SYS_PBSIZE	\  	(CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */ -#define CONFIG_STACKSIZE	(32*1024)	/* regular stack */ -  /*   * ARM asynchronous clock   */ diff --git a/include/configs/edminiv2.h b/include/configs/edminiv2.h index 6a67aa572..f2cfaf835 100644 --- a/include/configs/edminiv2.h +++ b/include/configs/edminiv2.h @@ -69,13 +69,18 @@   * - GPIO16 is Power LED control (0 = on, 1 = off)   * - GPIO17 is Power LED source select (0 = CPLD, 1 = GPIO16)   * - GPIO18 is Power Button status (0 = Released, 1 = Pressed) - * - Last GPIO is 26, further bits are supposed to be 0. + * - GPIO19 is SATA disk power toggle (toggles on 0-to-1) + * - GPIO22 is SATA disk power status () + * - GPIO23 is supply status for SATA disk () + * - GPIO24 is supply control for board (write 1 to power off) + * Last GPIO is 25, further bits are supposed to be 0.   * Enable mask has ones for INPUT, 0 for OUTPUT. - * Default is LED ON. + * Default is LED ON, board ON :)   */ -#define ORION5X_GPIO_OUT_ENABLE	0x03fcffff -#define ORION5X_GPIO_OUT_VALUE	0x03fcffff +#define ORION5X_GPIO_OUT_ENABLE		0xfef4f0ca +#define ORION5X_GPIO_OUT_VALUE		0x00000000 +#define ORION5X_GPIO_IN_POLARITY	0x000000d0  /*   * NS16550 Configuration @@ -228,7 +233,6 @@  #define CONFIG_DISPLAY_CPUINFO		/* Display cpu info */  #define CONFIG_NR_DRAM_BANKS		1 -#define CONFIG_STACKSIZE		0x00100000  #define CONFIG_SYS_LOAD_ADDR		0x00800000  #define CONFIG_SYS_MEMTEST_START	0x00400000  #define CONFIG_SYS_MEMTEST_END		0x007fffff diff --git a/include/configs/enbw_cmc.h b/include/configs/enbw_cmc.h index 3fc07e672..e2e0d5c2d 100644 --- a/include/configs/enbw_cmc.h +++ b/include/configs/enbw_cmc.h @@ -71,7 +71,6 @@  #define CONFIG_SYS_MEMTEST_END	(PHYS_SDRAM_1 + 0x2000000 + 16*1024*1024)  #define CONFIG_NR_DRAM_BANKS	1 /* we have 1 bank of DRAM */ -#define CONFIG_STACKSIZE	(256*1024) /* regular stack */  /*   * Serial Driver info @@ -458,6 +457,7 @@  #define CONFIG_BOOTCOUNT_LIMIT  #define CONFIG_SYS_BOOTCOUNT_ADDR	DAVINCI_RTC_BASE +#define CONFIG_SYS_BOOTCOUNT_BE  #define CONFIG_SYS_NAND_U_BOOT_DST	0xc0080000  #define CONFIG_SYS_NAND_U_BOOT_OFFS	0x60004000 diff --git a/include/configs/ethernut5.h b/include/configs/ethernut5.h index f89e9ead9..14a0f02c5 100644 --- a/include/configs/ethernut5.h +++ b/include/configs/ethernut5.h @@ -48,13 +48,12 @@  #define CONFIG_SYS_AT91_SLOW_CLOCK	32768	/* slow clock xtal */  #define CONFIG_SYS_AT91_MAIN_CLOCK	18432000 /* 18.432 MHz crystal */  #define CONFIG_SYS_HZ			1000 -#undef CONFIG_USE_IRQ			/* Running w/o interrupts */  /* 32kB internal SRAM */  #define CONFIG_SRAM_BASE	0x00300000 /*AT91SAM9XE_SRAM_BASE */  #define CONFIG_SRAM_SIZE	(32 << 10) -#define CONFIG_STACKSIZE	(CONFIG_SRAM_SIZE - GENERATED_GBL_DATA_SIZE) -#define CONFIG_SYS_INIT_SP_ADDR	(CONFIG_SRAM_BASE + CONFIG_STACKSIZE) +#define CONFIG_SYS_INIT_SP_ADDR	(CONFIG_SRAM_BASE + CONFIG_SRAM_SIZE - \ +				GENERATED_GBL_DATA_SIZE)  /* 128MB SDRAM in 1 bank */  #define CONFIG_NR_DRAM_BANKS		1 diff --git a/include/configs/flea3.h b/include/configs/flea3.h index 46939d435..46171b98f 100644 --- a/include/configs/flea3.h +++ b/include/configs/flea3.h @@ -31,7 +31,6 @@   /* High Level Configuration Options */  #define CONFIG_ARM1136	/* This is an arm1136 CPU core */  #define CONFIG_MX35 -#define CONFIG_MX35_HCLK_FREQ	24000000  #define CONFIG_SYS_DCACHE_OFF  #define CONFIG_SYS_CACHELINE_SIZE	32 @@ -146,14 +145,6 @@  #define CONFIG_SYS_HZ				1000 - -/* - * Stack sizes - * - * The stack sizes are set up in start.S using the settings below - */ -#define CONFIG_STACKSIZE	(128 * 1024)	/* regular stack */ -  /*   * Physical Memory Map   */ @@ -221,7 +212,6 @@   * NAND FLASH driver setup   */  #define CONFIG_NAND_MXC -#define CONFIG_NAND_MXC_V1_1  #define CONFIG_MXC_NAND_REGS_BASE	(NFC_BASE_ADDR)  #define CONFIG_SYS_MAX_NAND_DEVICE	1  #define CONFIG_SYS_NAND_BASE		(NFC_BASE_ADDR) diff --git a/include/configs/harmony.h b/include/configs/harmony.h index df5265a5a..e407ff4ca 100644 --- a/include/configs/harmony.h +++ b/include/configs/harmony.h @@ -25,24 +25,24 @@  #define __CONFIG_H  #include <asm/sizes.h> -#include "tegra2-common.h" +#include "tegra20-common.h"  /* Enable fdt support for Harmony. Flash the image in u-boot-dtb.bin */ -#define CONFIG_DEFAULT_DEVICE_TREE	tegra2-harmony +#define CONFIG_DEFAULT_DEVICE_TREE	tegra20-harmony  #define CONFIG_OF_CONTROL  #define CONFIG_OF_SEPARATE  /* High-level configuration options */ -#define V_PROMPT		"Tegra2 (Harmony) # " -#define CONFIG_TEGRA2_BOARD_STRING	"NVIDIA Harmony" +#define V_PROMPT		"Tegra20 (Harmony) # " +#define CONFIG_TEGRA_BOARD_STRING	"NVIDIA Harmony"  /* Board-specific serial config */  #define CONFIG_SERIAL_MULTI -#define CONFIG_TEGRA2_ENABLE_UARTD +#define CONFIG_TEGRA_ENABLE_UARTD  /* UARTD: keyboard satellite board UART, default */  #define CONFIG_SYS_NS16550_COM1		NV_PA_APB_UARTD_BASE -#ifdef CONFIG_TEGRA2_ENABLE_UARTA +#ifdef CONFIG_TEGRA_ENABLE_UARTA  /* UARTA: debug board UART */  #define CONFIG_SYS_NS16550_COM2		NV_PA_APB_UARTA_BASE  #endif @@ -62,8 +62,15 @@  #define CONFIG_CMD_EXT2  #define CONFIG_CMD_FAT -/* Environment not stored */ -#define CONFIG_ENV_IS_NOWHERE +/* NAND support */ +#define CONFIG_CMD_NAND +#define CONFIG_TEGRA_NAND +#define CONFIG_SYS_MAX_NAND_DEVICE	1 +#define CONFIG_SYS_NAND_BASE	NV_PA_NAND_BASE + +/* Environment in NAND (which is 512M), aligned to start of last sector */ +#define CONFIG_ENV_IS_IN_NAND +#define CONFIG_ENV_OFFSET	(SZ_512M - SZ_128K) /* 128K sector size */  /* USB Host support */  #define CONFIG_USB_EHCI @@ -80,6 +87,6 @@  #define CONFIG_CMD_NET  #define CONFIG_CMD_DHCP -#include "tegra2-common-post.h" +#include "tegra-common-post.h"  #endif /* __CONFIG_H */ diff --git a/include/configs/hawkboard.h b/include/configs/hawkboard.h index c6e9ce557..73ab4c837 100644 --- a/include/configs/hawkboard.h +++ b/include/configs/hawkboard.h @@ -43,6 +43,7 @@  #define CONFIG_SYS_HZ			1000  #define CONFIG_SKIP_LOWLEVEL_INIT  #define CONFIG_BOARD_EARLY_INIT_F +#define CONFIG_AIS_CONFIG_FILE		"board/$(BOARDDIR)/hawkboard-ais-nand.cfg"  #define CONFIG_SYS_DA850_SYSCFG_SUSPSRC (	\  	DAVINCI_SYSCFG_SUSPSRC_EMAC |		\ @@ -86,7 +87,6 @@  #define CONFIG_SYS_MEMTEST_END		(PHYS_SDRAM_1 + 16*1024*1024)  #define CONFIG_NR_DRAM_BANKS		1 /* we have 1 bank of DRAM */ -#define CONFIG_STACKSIZE		(256*1024) /* regular stack */  /*   * Serial Driver info @@ -136,7 +136,7 @@  #define CONFIG_SYS_NAND_PAGE_SIZE	(2 << 10)  #define CONFIG_SYS_NAND_BLOCK_SIZE	(128 << 10)  #define CONFIG_SYS_NAND_U_BOOT_OFFS	0xe0000 -#define CONFIG_SYS_NAND_U_BOOT_SIZE	0x40000 +#define CONFIG_SYS_NAND_U_BOOT_SIZE	0x60000  #define CONFIG_SYS_NAND_U_BOOT_DST	0xc1180000  #define CONFIG_SYS_NAND_U_BOOT_START	CONFIG_SYS_NAND_U_BOOT_DST  #define CONFIG_SYS_NAND_U_BOOT_RELOC_SP	(CONFIG_SYS_NAND_U_BOOT_DST - \ @@ -157,6 +157,16 @@  #endif /* CONFIG_SYS_USE_NAND */ +/* USB Configs */ +#define CONFIG_SYS_USB_OHCI_CPU_INIT +#define CONFIG_USB_OHCI_NEW +#define CONFIG_USB_OHCI_DA8XX +#define CONFIG_USB_STORAGE +#define CONFIG_DOS_PARTITION +#define CONFIG_SYS_USB_OHCI_REGS_BASE		0x01E25000 +#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS	15 +#define CONFIG_SYS_USB_OHCI_SLOT_NAME		"hawkboard" +  /*   * U-Boot general configuration   */ @@ -199,6 +209,8 @@  #define CONFIG_CMD_PING  #define CONFIG_CMD_SAVES  #define CONFIG_CMD_MEMORY +#define CONFIG_CMD_USB +#define CONFIG_CMD_EXT2  #ifdef CONFIG_CMD_BDI  #define CONFIG_CLOCKS diff --git a/include/configs/highbank.h b/include/configs/highbank.h index 791f3f546..62cc08ceb 100644 --- a/include/configs/highbank.h +++ b/include/configs/highbank.h @@ -41,6 +41,8 @@  #define CONFIG_BAUDRATE			38400  #define CONFIG_BOOTCOUNT_LIMIT +#define CONFIG_SYS_BOOTCOUNT_SINGLEWORD +#define CONFIG_SYS_BOOTCOUNT_LE		/* Use little-endian accessors */  #define CONFIG_SYS_BOOTCOUNT_ADDR	0xfff3cf0c  #define CONFIG_MISC_INIT_R @@ -93,17 +95,6 @@  #define CONFIG_SYS_LOAD_ADDR		0x800000  /*----------------------------------------------------------------------- - * Stack sizes - * - * The stack sizes are set up in start.S using the settings below - */ -#define CONFIG_STACKSIZE		(128*1024)	/* regular stack */ -#ifdef CONFIG_USE_IRQ -#define CONFIG_STACKSIZE_IRQ		(4*1024)	/* IRQ stack */ -#define CONFIG_STACKSIZE_FIQ		(4*1024)	/* FIQ stack */ -#endif - -/*-----------------------------------------------------------------------   * Physical Memory Map   */  #define CONFIG_NR_DRAM_BANKS		1 diff --git a/include/configs/igep00x0.h b/include/configs/igep00x0.h index 88e2e3a1d..5468a1a21 100644 --- a/include/configs/igep00x0.h +++ b/include/configs/igep00x0.h @@ -30,6 +30,7 @@   */  #define CONFIG_OMAP		1	/* in a TI OMAP core */  #define CONFIG_OMAP34XX		1	/* which is a 34XX */ +#define CONFIG_OMAP_GPIO  #define CONFIG_SDRC	/* The chip has SDRC controller */ @@ -105,7 +106,12 @@  #define CONFIG_CMD_FAT		/* FAT support			*/  #define CONFIG_CMD_I2C		/* I2C serial bus support	*/  #define CONFIG_CMD_MMC		/* MMC support			*/ +#ifdef CONFIG_BOOT_ONENAND  #define CONFIG_CMD_ONENAND	/* ONENAND support		*/ +#endif +#ifdef CONFIG_BOOT_NAND +#define CONFIG_CMD_NAND +#endif  #define CONFIG_CMD_NET		/* bootp, tftpboot, rarpboot	*/  #define CONFIG_CMD_DHCP  #define CONFIG_CMD_PING @@ -135,14 +141,14 @@  	"usbtty=cdc_acm\0" \  	"loadaddr=0x82000000\0" \  	"usbtty=cdc_acm\0" \ -	"console=ttyS2,115200n8\0" \ +	"console=ttyO2,115200n8\0" \  	"mpurate=auto\0" \  	"vram=12M\0" \  	"dvimode=1024x768MR-16@60\0" \  	"defaultdisplay=dvi\0" \  	"mmcdev=0\0" \  	"mmcroot=/dev/mmcblk0p2 rw\0" \ -	"mmcrootfstype=ext3 rootwait\0" \ +	"mmcrootfstype=ext4 rootwait\0" \  	"nandroot=/dev/mtdblock4 rw\0" \  	"nandrootfstype=jffs2\0" \  	"mmcargs=setenv bootargs console=${console} " \ @@ -225,13 +231,6 @@  #define CONFIG_SYS_HZ			1000  /* - * Stack sizes - * - * The stack sizes are set up in start.S using the settings below - */ -#define CONFIG_STACKSIZE	(128 << 10)	/* regular stack 128 KiB */ - -/*   * Physical Memory Map   *   */ @@ -244,6 +243,7 @@   * FLASH and environment organization   */ +#ifdef CONFIG_BOOT_ONENAND  #define PISMO1_ONEN_SIZE		GPMC_SIZE_128M /* Configure the PISMO */  #define CONFIG_SYS_ONENAND_BASE		ONENAND_MAP @@ -253,6 +253,19 @@  #define CONFIG_ENV_IS_IN_ONENAND	1  #define CONFIG_ENV_SIZE			(512 << 10) /* Total Size Environment */  #define CONFIG_ENV_ADDR			ONENAND_ENV_OFFSET +#endif + +#ifdef CONFIG_BOOT_NAND +#define PISMO1_NAND_SIZE		GPMC_SIZE_128M /* Configure the PISMO */ +#define CONFIG_NAND_OMAP_GPMC +#define CONFIG_SYS_NAND_BASE		NAND_BASE +#define GPMC_NAND_ECC_LP_x16_LAYOUT	1 +#define CONFIG_ENV_OFFSET		0x260000 /* environment starts here */ +#define CONFIG_ENV_IS_IN_NAND	        1 +#define CONFIG_ENV_SIZE			(512 << 10) /* Total Size Environment */ +#define CONFIG_ENV_ADDR			NAND_ENV_OFFSET +#define CONFIG_SYS_MAX_NAND_DEVICE      1 +#endif  /*   * Size of malloc() pool @@ -268,6 +281,11 @@  #define CONFIG_SMC911X_BASE	0x2C000000  #endif /* (CONFIG_CMD_NET) */ +/* + * Leave it at 0x80008000 to allow booting new u-boot.bin with X-loader + * and older u-boot.bin with the new U-Boot SPL. + */ +#define CONFIG_SYS_TEXT_BASE		0x80008000  #define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM_1  #define CONFIG_SYS_INIT_RAM_ADDR	0x4020f800  #define CONFIG_SYS_INIT_RAM_SIZE	0x800 @@ -275,4 +293,64 @@  					 CONFIG_SYS_INIT_RAM_SIZE - \  					 GENERATED_GBL_DATA_SIZE) +/* SPL */ +#define CONFIG_SPL +#define CONFIG_SPL_NAND_SIMPLE +#define CONFIG_SPL_TEXT_BASE		0x40200800 +#define CONFIG_SPL_MAX_SIZE		(54 * 1024) +#define CONFIG_SPL_STACK		LOW_LEVEL_SRAM_STACK + +/* move malloc and bss high to prevent clashing with the main image */ +#define CONFIG_SYS_SPL_MALLOC_START	0x87000000 +#define CONFIG_SYS_SPL_MALLOC_SIZE	0x80000 +#define CONFIG_SPL_BSS_START_ADDR	0x87080000	/* end of minimum RAM */ +#define CONFIG_SPL_BSS_MAX_SIZE		0x80000		/* 512 KB */ + +/* MMC boot config */ +#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR	0x300 /* address 0x60000 */ +#define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS	0x200 /* 256 KB */ +#define CONFIG_SYS_MMC_SD_FAT_BOOT_PARTITION	1 +#define CONFIG_SPL_FAT_LOAD_PAYLOAD_NAME	"u-boot.img" + +#define CONFIG_SPL_LIBCOMMON_SUPPORT +#define CONFIG_SPL_LIBDISK_SUPPORT +#define CONFIG_SPL_I2C_SUPPORT +#define CONFIG_SPL_LIBGENERIC_SUPPORT +#define CONFIG_SPL_MMC_SUPPORT +#define CONFIG_SPL_FAT_SUPPORT +#define CONFIG_SPL_SERIAL_SUPPORT + +#define CONFIG_SPL_POWER_SUPPORT +#define CONFIG_SPL_LDSCRIPT		"$(CPUDIR)/omap-common/u-boot-spl.lds" + +#ifdef CONFIG_BOOT_ONENAND +#define CONFIG_SPL_ONENAND_SUPPORT + +/* OneNAND boot config */ +#define CONFIG_SYS_ONENAND_U_BOOT_OFFS  0x80000 +#define CONFIG_SYS_ONENAND_PAGE_SIZE	2048 +#define CONFIG_SPL_ONENAND_LOAD_ADDR    0x80000 +#define CONFIG_SPL_ONENAND_LOAD_SIZE    \ +	(512 * 1024 - CONFIG_SPL_ONENAND_LOAD_ADDR) + +#endif + +#ifdef CONFIG_BOOT_NAND +#define CONFIG_SPL_NAND_SUPPORT + +/* NAND boot config */ +#define CONFIG_SYS_NAND_5_ADDR_CYCLE +#define CONFIG_SYS_NAND_PAGE_COUNT	64 +#define CONFIG_SYS_NAND_PAGE_SIZE	2048 +#define CONFIG_SYS_NAND_OOBSIZE		64 +#define CONFIG_SYS_NAND_BLOCK_SIZE	(128*1024) +#define CONFIG_SYS_NAND_BAD_BLOCK_POS	0 +#define CONFIG_SYS_NAND_ECCPOS		{2, 3, 4, 5, 6, 7, 8, 9,\ +						10, 11, 12, 13} +#define CONFIG_SYS_NAND_ECCSIZE		512 +#define CONFIG_SYS_NAND_ECCBYTES	3 +#define CONFIG_SYS_NAND_U_BOOT_START	CONFIG_SYS_TEXT_BASE +#define CONFIG_SYS_NAND_U_BOOT_OFFS	0x80000 +#endif +  #endif /* __IGEP00X0_H */ diff --git a/include/configs/ima3-mx53.h b/include/configs/ima3-mx53.h index 17fa4a13d..dbc59b91e 100644 --- a/include/configs/ima3-mx53.h +++ b/include/configs/ima3-mx53.h @@ -64,7 +64,6 @@  /* Ethernet on FEC */  #define CONFIG_NET_MULTI  #define CONFIG_MII -#define CONFIG_DISCOVER_PHY  #define CONFIG_FEC_MXC  #define IMX_FEC_BASE			FEC_BASE_ADDR @@ -72,7 +71,7 @@  #define CONFIG_PHY_ADDR			CONFIG_FEC_MXC_PHYADDR  #define CONFIG_RESET_PHY_R  #define CONFIG_FEC_MXC_NO_ANEG -#define CONFIG_PRIME	"FEC0" +#define CONFIG_ETHPRIME			"FEC0"  /* SPI */  #define CONFIG_HARD_SPI @@ -133,9 +132,6 @@  #define CONFIG_SYS_HZ		1000  #define CONFIG_CMDLINE_EDITING -/* Stack sizes */ -#define CONFIG_STACKSIZE	(128 * 1024)	/* regular stack */ -  /* Physical Memory Map */  #define CONFIG_NR_DRAM_BANKS	1  #define PHYS_SDRAM_1		CSD0_BASE_ADDR diff --git a/include/configs/imx27lite-common.h b/include/configs/imx27lite-common.h index 7d2876b9c..a2853a7ef 100644 --- a/include/configs/imx27lite-common.h +++ b/include/configs/imx27lite-common.h @@ -94,7 +94,6 @@  #define CONFIG_SYS_MEMTEST_START	0xA0000000  #define CONFIG_SYS_MEMTEST_END		0xA1000000	/* 16MB RAM test */  #define CONFIG_NR_DRAM_BANKS	1		/* we have 1 bank of DRAM */ -#define CONFIG_STACKSIZE	(256 * 1024)	/* regular stack */  #define PHYS_SDRAM_1		0xA0000000	/* DDR Start */  #define PHYS_SDRAM_1_SIZE	0x08000000	/* DDR size 128MB */ @@ -162,6 +161,11 @@  #define CONFIG_DOS_PARTITION  /* + * GPIO + */ +#define CONFIG_MXC_GPIO + +/*   * MTD partitions   */  #define CONFIG_CMD_MTDPARTS diff --git a/include/configs/imx31_litekit.h b/include/configs/imx31_litekit.h index a340e97f0..6ae764a2d 100644 --- a/include/configs/imx31_litekit.h +++ b/include/configs/imx31_litekit.h @@ -33,7 +33,6 @@   /* High Level Configuration Options */  #define CONFIG_ARM1136		1    /* This is an arm1136 CPU core */  #define CONFIG_MX31		1    /* in a mx31 */ -#define CONFIG_MX31_HCLK_FREQ	26000000  #define CONFIG_MX31_CLK32	32000  #define CONFIG_DISPLAY_CPUINFO @@ -139,13 +138,6 @@  #define CONFIG_CMDLINE_EDITING	1  /*----------------------------------------------------------------------- - * Stack sizes - * - * The stack sizes are set up in start.S using the settings below - */ -#define CONFIG_STACKSIZE	(128 * 1024) /* regular stack */ - -/*-----------------------------------------------------------------------   * Physical Memory Map   */  #define CONFIG_NR_DRAM_BANKS	1 diff --git a/include/configs/imx31_phycore.h b/include/configs/imx31_phycore.h index a412cf61e..f36ceea57 100644 --- a/include/configs/imx31_phycore.h +++ b/include/configs/imx31_phycore.h @@ -33,7 +33,6 @@  /* High Level Configuration Options */  #define CONFIG_ARM1136			/* This is an arm1136 CPU core */  #define CONFIG_MX31			/* in a mx31 */ -#define CONFIG_MX31_HCLK_FREQ	26000000  #define CONFIG_MX31_CLK32	32000  #define CONFIG_DISPLAY_CPUINFO @@ -143,13 +142,6 @@  #define CONFIG_CMDLINE_EDITING  /* - * Stack sizes - * - * The stack sizes are set up in start.S using the settings below - */ -#define CONFIG_STACKSIZE	(128 * 1024) /* regular stack */ - -/*   * Physical Memory Map   */  #define CONFIG_NR_DRAM_BANKS		1 diff --git a/include/configs/integrator-common.h b/include/configs/integrator-common.h new file mode 100644 index 000000000..564b418fa --- /dev/null +++ b/include/configs/integrator-common.h @@ -0,0 +1,103 @@ +/* + * (C) Copyright 2012 + * Linaro + * Linus Walleij <linus.walleij@linaro.org> + * Common ARM Integrator configuration settings + * + * 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 + */ + +#define CONFIG_INTEGRATOR + +#define CONFIG_SYS_TEXT_BASE		0x01000000 +#define CONFIG_SYS_MEMTEST_START	0x100000 +#define CONFIG_SYS_MEMTEST_END		0x10000000 +#define CONFIG_SYS_HZ			1000 +#define CONFIG_SYS_TIMERBASE		0x13000100	/* Timer1 */ +#define CONFIG_SYS_LOAD_ADDR		0x7fc0	/* default load address */ +#define CONFIG_SYS_LONGHELP +#define CONFIG_SYS_HUSH_PARSER +#define CONFIG_SYS_CBSIZE		256	/* Console I/O Buffer Size*/ +#define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) +#define CONFIG_SYS_MAXARGS		16	/* max number of command args */ +#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size*/ +#define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + 128*1024) /* Size of malloc() pool */ + +#define CONFIG_CMDLINE_TAG		/* enable passing of ATAGs  */ +#define CONFIG_SETUP_MEMORY_TAGS +#define CONFIG_MISC_INIT_R		/* call misc_init_r during start up */ + +/* + * There are various dependencies on the core module (CM) fitted + * Users should refer to their CM user guide + */ +#include "armcoremodule.h" + +/* + * Initialize and remap the core module, use SPD to detect memory size + * If CONFIG_SKIP_LOWLEVEL_INIT is not defined & + * the core module has a CM_INIT register + * then the U-Boot initialisation code will + * e.g. ARM Boot Monitor or pre-loader is repeated once + * (to re-initialise any existing CM_INIT settings to safe values). + * + * This is usually not the desired behaviour since the platform + * will either reboot into the ARM monitor (or pre-loader) + * or continuously cycle thru it without U-Boot running, + * depending upon the setting of Integrator/CP switch S2-4. + * + * However it may be needed if Integrator/CP switch S2-1 + * is set OFF to boot direct into U-Boot. + * In that case comment out the line below. + */ +#define CONFIG_CM_INIT +#define CONFIG_CM_REMAP +#define CONFIG_CM_SPD_DETECT + +/* + * The ARM boot monitor initializes the board. + * However, the default U-Boot code also performs the initialization. + * If desired, this can be prevented by defining SKIP_LOWLEVEL_INIT + * - see documentation supplied with board for details of how to choose the + * image to run at reset/power up + * e.g. whether the ARM Boot Monitor runs before U-Boot + */ +/* #define CONFIG_SKIP_LOWLEVEL_INIT */ + +/* + * The ARM boot monitor does not relocate U-Boot. + * However, the default U-Boot code performs the relocation check, + * and may relocate the code if the memory map is changed. + * If necessary this can be prevented by defining SKIP_RELOCATE_UBOOT + */ +/* #define SKIP_CONFIG_RELOCATE_UBOOT */ + + +/* + * Physical Memory Map + */ +#define CONFIG_NR_DRAM_BANKS	1		/* we have 1 bank of DRAM */ +#define PHYS_SDRAM_1		0x00000000	/* SDRAM Bank #1 */ +#define PHYS_SDRAM_1_SIZE	0x08000000	/* 128 MB */ +#define CONFIG_SYS_SDRAM_BASE	PHYS_SDRAM_1 +#define CONFIG_SYS_INIT_RAM_SIZE PHYS_SDRAM_1_SIZE +#define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_SDRAM_BASE + \ +				    CONFIG_SYS_INIT_RAM_SIZE - \ +				    GENERATED_GBL_DATA_SIZE) +#define CONFIG_SYS_INIT_SP_ADDR CONFIG_SYS_GBL_DATA_OFFSET diff --git a/include/configs/integratorap.h b/include/configs/integratorap.h index 2252d9383..c6907b512 100644 --- a/include/configs/integratorap.h +++ b/include/configs/integratorap.h @@ -31,32 +31,11 @@  #ifndef __CONFIG_H  #define __CONFIG_H -#define CONFIG_INTEGRATOR +#include "integrator-common.h" + +/* Integrator/AP-specific configuration */  #define CONFIG_ARCH_INTEGRATOR -/* - * High Level Configuration Options - * (easy to change) - */ -#define CONFIG_SYS_TEXT_BASE		0x01000000 -#define CONFIG_SYS_MEMTEST_START	0x100000 -#define CONFIG_SYS_MEMTEST_END		0x10000000 -#define CONFIG_SYS_HZ			1000  #define CONFIG_SYS_HZ_CLOCK		24000000	/* Timer 1 is clocked at 24Mhz */ -#define CONFIG_SYS_TIMERBASE		0x13000100	/* Timer1		       */ - -#define CONFIG_CMDLINE_TAG	1	/* enable passing of ATAGs  */ -#define CONFIG_SETUP_MEMORY_TAGS	1 -#define CONFIG_MISC_INIT_R	1	/* call misc_init_r during start up */ - -#define CONFIG_SKIP_LOWLEVEL_INIT -#define CONFIG_CM_INIT		1 -#define CONFIG_CM_REMAP		1 -#define CONFIG_CM_SPD_DETECT - -/* - * Size of malloc() pool - */ -#define CONFIG_SYS_MALLOC_LEN	(CONFIG_ENV_SIZE + 128*1024)  /*   * PL010 Configuration @@ -90,40 +69,7 @@  /*   * Miscellaneous configurable options   */ -#define CONFIG_SYS_LONGHELP	/* undef to save memory	    */ -#define CONFIG_SYS_HUSH_PARSER  #define CONFIG_SYS_PROMPT	"Integrator-AP # "	/* Monitor Command Prompt   */ -#define CONFIG_SYS_CBSIZE	256		/* Console I/O Buffer Size  */ -/* Print Buffer Size */ -#define CONFIG_SYS_PBSIZE	(CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) -#define CONFIG_SYS_MAXARGS	16		/* max number of command args	*/ -#define CONFIG_SYS_BARGSIZE	CONFIG_SYS_CBSIZE	/* Boot Argument Buffer Size	*/ - -#define CONFIG_SYS_LOAD_ADDR	0x7fc0	/* default load address */ - -/*----------------------------------------------------------------------- - * Stack sizes - * - * The stack sizes are set up in start.S using the settings below - */ -#define CONFIG_STACKSIZE	(128*1024)	/* regular stack */ -#ifdef CONFIG_USE_IRQ -#define CONFIG_STACKSIZE_IRQ	(4*1024)	/* IRQ stack */ -#define CONFIG_STACKSIZE_FIQ	(4*1024)	/* FIQ stack */ -#endif - -/*----------------------------------------------------------------------- - * Physical Memory Map - */ -#define CONFIG_NR_DRAM_BANKS	1	/* we have 1 bank of DRAM */ -#define PHYS_SDRAM_1		0x00000000	/* SDRAM Bank #1 */ -#define PHYS_SDRAM_1_SIZE	0x02000000	/* 32 MB */ -#define CONFIG_SYS_SDRAM_BASE	PHYS_SDRAM_1 -#define CONFIG_SYS_INIT_RAM_SIZE PHYS_SDRAM_1_SIZE -#define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_SDRAM_BASE + \ -				    CONFIG_SYS_INIT_RAM_SIZE - \ -				    GENERATED_GBL_DATA_SIZE) -#define CONFIG_SYS_INIT_SP_ADDR CONFIG_SYS_GBL_DATA_OFFSET  #define CONFIG_SYS_FLASH_BASE	0x24000000 diff --git a/include/configs/integratorcp.h b/include/configs/integratorcp.h index ca2d92d79..ca02a6f1d 100644 --- a/include/configs/integratorcp.h +++ b/include/configs/integratorcp.h @@ -31,32 +31,11 @@  #ifndef __CONFIG_H  #define __CONFIG_H -/* Integrator-specific configuration */ -#define CONFIG_INTEGRATOR -#define CONFIG_ARCH_CINTEGRATOR -#define CONFIG_CM_INIT -#define CONFIG_CM_REMAP -#define CONFIG_CM_SPD_DETECT +#include "integrator-common.h" -/* - * High Level Configuration Options - * (easy to change) - */ -#define CONFIG_SYS_TEXT_BASE		0x01000000 -#define CONFIG_SYS_MEMTEST_START	0x100000 -#define CONFIG_SYS_MEMTEST_END		0x10000000 -#define CONFIG_SYS_HZ			1000 +/* Integrator CP-specific configuration */ +#define CONFIG_ARCH_CINTEGRATOR  #define CONFIG_SYS_HZ_CLOCK		1000000	/* Timer 1 is clocked at 1Mhz */ -#define CONFIG_SYS_TIMERBASE		0x13000100 - -#define CONFIG_CMDLINE_TAG		1	/* enable passing of ATAGs  */ -#define CONFIG_SETUP_MEMORY_TAGS	1 -#define CONFIG_MISC_INIT_R		1	/* call misc_init_r during start up */ - -/* - * Size of malloc() pool - */ -#define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + 128*1024)  /*   * Hardware drivers @@ -66,9 +45,7 @@  #define CONFIG_SMC91111_BASE    0xC8000000  #undef CONFIG_SMC91111_EXT_PHY -/* - * NS16550 Configuration - */ +/* PL011 configuration */  #define CONFIG_PL011_SERIAL  #define CONFIG_PL011_CLOCK	14745600  #define CONFIG_PL01x_PORTS	{ (void *)CONFIG_SYS_SERIAL0, (void *)CONFIG_SYS_SERIAL1 } @@ -77,16 +54,6 @@  #define CONFIG_SYS_SERIAL0		0x16000000  #define CONFIG_SYS_SERIAL1		0x17000000 - -/* - * BOOTP options - */ -#define CONFIG_BOOTP_BOOTFILESIZE -#define CONFIG_BOOTP_BOOTPATH -#define CONFIG_BOOTP_GATEWAY -#define CONFIG_BOOTP_HOSTNAME - -  /*   * Command line configuration.   */ @@ -102,43 +69,10 @@  /*   * Miscellaneous configurable options   */ -#define CONFIG_SYS_LONGHELP				/* undef to save memory */  #define CONFIG_SYS_PROMPT	"Integrator-CP # "	/* Monitor Command Prompt */ -#define CONFIG_SYS_CBSIZE	256			/* Console I/O Buffer Size*/ -/* Print Buffer Size */ -#define CONFIG_SYS_PBSIZE	(CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) -#define CONFIG_SYS_MAXARGS	16			/* max number of command args */ -#define CONFIG_SYS_BARGSIZE	CONFIG_SYS_CBSIZE		/* Boot Argument Buffer Size*/ - -#define CONFIG_SYS_LOAD_ADDR	0x7fc0	/* default load address */ - -/*----------------------------------------------------------------------- - * Stack sizes - * - * The stack sizes are set up in start.S using the settings below - */ -#define CONFIG_STACKSIZE	(128*1024)	/* regular stack */ -#ifdef CONFIG_USE_IRQ -#define CONFIG_STACKSIZE_IRQ	(4*1024)	/* IRQ stack */ -#define CONFIG_STACKSIZE_FIQ	(4*1024)	/* FIQ stack */ -#endif - -/*----------------------------------------------------------------------- - * Physical Memory Map - */ -#define CONFIG_NR_DRAM_BANKS	1		/* we have 1 bank of DRAM */ -#define PHYS_SDRAM_1		0x00000000	/* SDRAM Bank #1 */ -#define PHYS_SDRAM_1_SIZE	0x08000000	/* 128 MB */ -#define CONFIG_SYS_SDRAM_BASE	PHYS_SDRAM_1 -#define CONFIG_SYS_INIT_RAM_SIZE PHYS_SDRAM_1_SIZE -#define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_SDRAM_BASE + \ -				    CONFIG_SYS_INIT_RAM_SIZE - \ -				    GENERATED_GBL_DATA_SIZE) -#define CONFIG_SYS_INIT_SP_ADDR CONFIG_SYS_GBL_DATA_OFFSET -/*----------------------------------------------------------------------- +/*   * FLASH and environment organization -   * Top varies according to amount fitted   * Reserve top 4 blocks of flash   * - ARM Boot Monitor @@ -147,7 +81,6 @@   * - U-Boot environment   *   * Base is always 0x24000000 -   */  #define CONFIG_SYS_FLASH_BASE		0x24000000  #define CONFIG_SYS_FLASH_CFI		1 @@ -189,53 +122,4 @@  #define CONFIG_ENV_SECT_SIZE	0x40000		/* 256KB */  #define CONFIG_ENV_SIZE		8192		/* 8KB */ -/* - * The ARM boot monitor initializes the board. - * However, the default U-Boot code also performs the initialization. - * If desired, this can be prevented by defining SKIP_LOWLEVEL_INIT - * - see documentation supplied with board for details of how to choose the - * image to run at reset/power up - * e.g. whether the ARM Boot Monitor runs before U-Boot - -#define CONFIG_SKIP_LOWLEVEL_INIT - - */ - -/* - * The ARM boot monitor does not relocate U-Boot. - * However, the default U-Boot code performs the relocation check, - * and may relocate the code if the memory map is changed. - * If necessary this can be prevented by defining SKIP_RELOCATE_UBOOT - -#define SKIP_CONFIG_RELOCATE_UBOOT - - */ -/*----------------------------------------------------------------------- - * There are various dependencies on the core module (CM) fitted - * Users should refer to their CM user guide - * - when porting adjust u-boot/Makefile accordingly - * to define the necessary CONFIG_ s for the CM involved - * see e.g. cp_926ejs_config - */ - -#include "armcoremodule.h" - -/* - * If CONFIG_SKIP_LOWLEVEL_INIT is not defined & - * the core module has a CM_INIT register - * then the U-Boot initialisation code will - * e.g. ARM Boot Monitor or pre-loader is repeated once - * (to re-initialise any existing CM_INIT settings to safe values). - * - * This is usually not the desired behaviour since the platform - * will either reboot into the ARM monitor (or pre-loader) - * or continuously cycle thru it without U-Boot running, - * depending upon the setting of Integrator/CP switch S2-4. - * - * However it may be needed if Integrator/CP switch S2-1 - * is set OFF to boot direct into U-Boot. - * In that case comment out the line below. -#undef	CONFIG_CM_INIT - */ -  #endif /* __CONFIG_H */ diff --git a/include/configs/jadecpu.h b/include/configs/jadecpu.h index 2badadbc3..7b9d36d5d 100644 --- a/include/configs/jadecpu.h +++ b/include/configs/jadecpu.h @@ -32,7 +32,6 @@  #define CONFIG_SYS_TEXT_BASE	0x10000000  #define CONFIG_ARM926EJS	1	/* This is an ARM926EJS Core	*/ -#undef CONFIG_USE_IRQ			/* we don't need IRQ/FIQ stuff	*/  #define CONFIG_USE_ARCH_MEMCPY  #define CONFIG_USE_ARCH_MEMSET @@ -204,8 +203,6 @@  #define CONFIG_SYS_MALLOC_LEN	(10 << 20)  #define CONFIG_SYS_MEM_TOP_HIDE	(4 << 20) -#define CONFIG_STACKSIZE	(32*1024)	/* regular stack */ -  /*   * Clock reset generator init   */ @@ -292,8 +289,4 @@  #define CONFIG_SYS_DDR2_INIT_DRIC1_10	0x0005  #define CONFIG_SYS_DDR2_INIT_DRIC2_10	0x0002 -#ifdef CONFIG_USE_IRQ -#error CONFIG_USE_IRQ not supported -#endif -  #endif	/* __CONFIG_H */ diff --git a/include/configs/jornada.h b/include/configs/jornada.h index 84ad2d874..d499abe4a 100644 --- a/include/configs/jornada.h +++ b/include/configs/jornada.h @@ -33,7 +33,6 @@  /* we will never enable dcache, because we have to setup MMU first */  #define CONFIG_SYS_DCACHE_OFF -#undef CONFIG_USE_IRQ  /* Console setting */ @@ -88,12 +87,6 @@  #define CONFIG_SYS_CPUSPEED		0x0a /* core clock 206MHz */  #define CONFIG_SYS_BAUDRATE_TABLE	{ 19200, 38400, 57600, 115200 } -/*----------------------------------------------------------------------- - * Stack sizes - * - * The stack sizes are set up in start.S using the settings below - */ -#define CONFIG_STACKSIZE		(128*1024)	/* regular stack */  #define CONFIG_SYS_FLASH_CFI		1  #define CONFIG_FLASH_CFI_DRIVER	1  #define CONFIG_FLASH_CFI_WIDTH		FLASH_CFI_32BIT diff --git a/include/configs/km/keymile-common.h b/include/configs/km/keymile-common.h index 7ed99587a..998310473 100644 --- a/include/configs/km/keymile-common.h +++ b/include/configs/km/keymile-common.h @@ -81,7 +81,6 @@  #define CONFIG_LOADS_ECHO  #define CONFIG_SYS_LOADS_BAUD_CHANGE -#define CONFIG_SYS_BOARD_DRAM_INIT	/* Used board specific dram_init */  #define CONFIG_I2C_MULTI_BUS  #define CONFIG_SYS_MAX_I2C_BUS		1 diff --git a/include/configs/km/km_arm.h b/include/configs/km/km_arm.h index 3aa5ca152..44d537396 100644 --- a/include/configs/km/km_arm.h +++ b/include/configs/km/km_arm.h @@ -57,10 +57,14 @@  #define CONFIG_CMD_SF  #define CONFIG_SOFT_I2C		/* I2C bit-banged	*/ +/* SPI NOR Flash default params, used by sf commands */ +#define CONFIG_SF_DEFAULT_SPEED		8100000 +#define CONFIG_SF_DEFAULT_MODE		SPI_MODE_3 +  #if defined CONFIG_KM_ENV_IS_IN_SPI_NOR  #define CONFIG_ENV_SPI_BUS		0  #define CONFIG_ENV_SPI_CS		0 -#define CONFIG_ENV_SPI_MAX_HZ		5000000 +#define CONFIG_ENV_SPI_MAX_HZ		8100000  #define CONFIG_ENV_SPI_MODE		SPI_MODE_3  #endif @@ -158,7 +162,6 @@  #define CONFIG_ARCH_MISC_INIT		/* call arch_misc_init() */  #define CONFIG_DISPLAY_CPUINFO		/* Display cpu info */  #define CONFIG_NR_DRAM_BANKS	4 -#define CONFIG_STACKSIZE	0x00100000	/* regular stack- 1M */  #define CONFIG_SYS_RESET_ADDRESS 0xffff0000	/* Rst Vector Adr */  /* @@ -307,6 +310,8 @@ int get_scl(void);  #define CONFIG_KM_RESERVED_PRAM 0x801000  /* address for the bootcount (taken from end of RAM) */  #define BOOTCOUNT_ADDR          (CONFIG_KM_RESERVED_PRAM) +/* Use generic bootcount RAM driver */ +#define CONFIG_BOOTCOUNT_RAM  /* enable POST tests */  #define CONFIG_POST	(CONFIG_SYS_POST_MEM_REGIONS) diff --git a/include/configs/lubbock.h b/include/configs/lubbock.h index 4b9b29082..0a1d1e09a 100644 --- a/include/configs/lubbock.h +++ b/include/configs/lubbock.h @@ -44,7 +44,6 @@  #define CONFIG_BOARD_LATE_INIT  #define CONFIG_DOS_PARTITION  #define	CONFIG_SYS_TEXT_BASE	0x0 -#undef CONFIG_USE_IRQ			/* we don't need IRQ/FIQ stuff */  /* we will never enable dcache, because we have to setup MMU first */  #define CONFIG_SYS_DCACHE_OFF @@ -136,17 +135,6 @@  #endif  /* - * Stack sizes - * - * The stack sizes are set up in start.S using the settings below - */ -#define CONFIG_STACKSIZE	(128*1024)	/* regular stack */ -#ifdef CONFIG_USE_IRQ -#define CONFIG_STACKSIZE_IRQ	(4*1024)	/* IRQ stack */ -#define CONFIG_STACKSIZE_FIQ	(4*1024)	/* FIQ stack */ -#endif - -/*   * Physical Memory Map   */  #define CONFIG_NR_DRAM_BANKS	4	   /* we have 2 banks of DRAM */ diff --git a/include/configs/m28evk.h b/include/configs/m28evk.h index 3ee538a44..9eb2a547f 100644 --- a/include/configs/m28evk.h +++ b/include/configs/m28evk.h @@ -20,8 +20,6 @@  #ifndef __M28EVK_CONFIG_H__  #define __M28EVK_CONFIG_H__ -#include <asm/arch/regs-base.h> -  /*   * SoC configurations   */ @@ -36,9 +34,9 @@  #define	CONFIG_MACH_TYPE	MACH_TYPE_M28EVK +#include <asm/arch/regs-base.h> +  #define	CONFIG_SYS_NO_FLASH -#define	CONFIG_SYS_ICACHE_OFF -#define	CONFIG_SYS_DCACHE_OFF  #define	CONFIG_BOARD_EARLY_INIT_F  #define	CONFIG_ARCH_MISC_INIT @@ -47,8 +45,8 @@   */  #define	CONFIG_SPL  #define	CONFIG_SPL_NO_CPU_SUPPORT_CODE -#define	CONFIG_SPL_START_S_PATH		"arch/arm/cpu/arm926ejs/mx28" -#define	CONFIG_SPL_LDSCRIPT	"arch/arm/cpu/arm926ejs/mx28/u-boot-spl.lds" +#define	CONFIG_SPL_START_S_PATH		"arch/arm/cpu/arm926ejs/mxs" +#define	CONFIG_SPL_LDSCRIPT	"arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds"  #define	CONFIG_SPL_LIBCOMMON_SUPPORT  #define	CONFIG_SPL_LIBGENERIC_SUPPORT  #define	CONFIG_SPL_GPIO_SUPPORT @@ -85,7 +83,6 @@  #define	CONFIG_NR_DRAM_BANKS		1		/* 1 bank of DRAM */  #define	PHYS_SDRAM_1			0x40000000	/* Base address */  #define	PHYS_SDRAM_1_SIZE		0x20000000	/* Max 512 MB RAM */ -#define	CONFIG_STACKSIZE		(128 * 1024)	/* 128 KB stack */  #define	CONFIG_SYS_MALLOC_LEN		0x00400000	/* 4 MB for malloc */  #define	CONFIG_SYS_GBL_DATA_SIZE	128		/* Initial data */  #define	CONFIG_SYS_MEMTEST_START	0x40000000	/* Memtest start adr */ @@ -174,9 +171,9 @@  #define	CONFIG_LZO  #define	CONFIG_MTD_DEVICE  #define	CONFIG_MTD_PARTITIONS -#define	MTDIDS_DEFAULT			"nand0=gpmi-nand.0" +#define	MTDIDS_DEFAULT			"nand0=gpmi-nand"  #define	MTDPARTS_DEFAULT			\ -	"mtdparts=gpmi-nand.0:"			\ +	"mtdparts=gpmi-nand:"			\  		"3m(bootloader)ro,"		\  		"512k(environment),"		\  		"512k(redundant-environment),"	\ @@ -246,6 +243,7 @@  #ifdef	CONFIG_CMD_SPI  #define	CONFIG_HARD_SPI  #define	CONFIG_MXS_SPI +#define	CONFIG_MXS_SPI_DMA_ENABLE  #define	CONFIG_SPI_HALF_DUPLEX  #define	CONFIG_DEFAULT_SPI_BUS		2  #define	CONFIG_DEFAULT_SPI_MODE		SPI_MODE_0 @@ -256,11 +254,11 @@  #define	CONFIG_SPI_FLASH_STMICRO  #define	CONFIG_SF_DEFAULT_CS		2  #define	CONFIG_SF_DEFAULT_MODE		SPI_MODE_0 -#define	CONFIG_SF_DEFAULT_SPEED		24000000 +#define	CONFIG_SF_DEFAULT_SPEED		40000000  #define	CONFIG_ENV_SPI_CS		0  #define	CONFIG_ENV_SPI_BUS		2 -#define	CONFIG_ENV_SPI_MAX_HZ		24000000 +#define	CONFIG_ENV_SPI_MAX_HZ		40000000  #define	CONFIG_ENV_SPI_MODE		SPI_MODE_0  #endif  #endif diff --git a/include/configs/mcx.h b/include/configs/mcx.h index 970c882d3..733022e78 100644 --- a/include/configs/mcx.h +++ b/include/configs/mcx.h @@ -27,9 +27,11 @@  #define CONFIG_OMAP			/* in a TI OMAP core */  #define CONFIG_OMAP34XX			/* which is a 34XX */  #define CONFIG_OMAP3_MCX		/* working with mcx */ +#define CONFIG_OMAP_GPIO  #define MACH_TYPE_MCX			3656  #define CONFIG_MACH_TYPE	MACH_TYPE_MCX +#define CONFIG_BOARD_LATE_INIT  #define CONFIG_SYS_CACHELINE_SIZE	64 @@ -140,6 +142,7 @@  #define CONFIG_MTD_PARTITIONS  #define CONFIG_MTD_DEVICE  #define CONFIG_CMD_MTDPARTS +#define CONFIG_CMD_GPIO  #undef CONFIG_CMD_FLASH		/* flinfo, erase, protect	*/  #undef CONFIG_CMD_FPGA		/* FPGA configuration Support	*/ @@ -183,38 +186,95 @@  #define CONFIG_BOOTFILE		"uImage" +#define xstr(s)	str(s) +#define str(s)	#s + +/* Setup MTD for NAND on the SOM */ +#define MTDIDS_DEFAULT		"nand0=omap2-nand.0" +#define MTDPARTS_DEFAULT	"mtdparts=omap2-nand.0:512k(MLO),"	\ +				"1m(u-boot),256k(env1),"		\ +				"256k(env2),6m(kernel),6m(k_recovery),"	\ +				"8m(fs_recovery),-(common_data)" + +#define CONFIG_HOSTNAME mcx  #define CONFIG_EXTRA_ENV_SETTINGS \ -	"loadaddr=0x82000000\0" \ -	"console=ttyO2,115200n8\0" \ -	"mmcargs=setenv bootargs console=${console} " \ -		"root=/dev/mmcblk0p2 rw " \ -		"rootfstype=ext3 rootwait\0" \ -	"nandargs=setenv bootargs console=${console} " \ -		"root=/dev/mtdblock4 rw " \ -		"rootfstype=jffs2\0" \ -	"loadbootscript=fatload mmc 0 ${loadaddr} boot.scr\0" \ -	"bootscript=echo Running bootscript from mmc ...; " \ -		"source ${loadaddr}\0" \ -	"loaduimage=fatload mmc 0 ${loadaddr} uImage\0" \ -	"mmcboot=echo Booting from mmc ...; " \ -		"run mmcargs; " \ -		"bootm ${loadaddr}\0" \ -	"nandboot=echo Booting from nand ...; " \ -		"run nandargs; " \ -		"nand read ${loadaddr} 280000 400000; " \ -		"bootm ${loadaddr}\0" \ +	"adddbg=setenv bootargs ${bootargs} trace_buf_size=64M\0"	\ +	"adddebug=setenv bootargs ${bootargs} earlyprintk=serial\0"	\ +	"addeth=setenv bootargs ${bootargs} ethaddr=${ethaddr}\0"	\ +	"addfb=setenv bootargs ${bootargs} vram=6M "			\ +		"omapfb.vram=1:2M,2:2M,3:2M omapdss.def_disp=lcd\0"	\ +	"addip_sta=setenv bootargs ${bootargs} "			\ +		"ip=${ipaddr}:${serverip}:${gatewayip}:"		\ +		"${netmask}:${hostname}:eth0:off\0"			\ +	"addip_dyn=setenv bootargs ${bootargs} ip=dhcp\0"		\ +	"addip=if test -n ${ipdyn};then run addip_dyn;"			\ +		"else run addip_sta;fi\0"				\ +	"addmisc=setenv bootargs ${bootargs} ${misc}\0"			\ +	"addtty=setenv bootargs ${bootargs} "				\ +		"console=${consoledev},${baudrate}\0"			\ +	"addmtd=setenv bootargs ${bootargs} ${mtdparts}\0"		\ +	"baudrate=115200\0"						\ +	"consoledev=ttyO2\0"						\ +	"hostname=" xstr(CONFIG_HOSTNAME) "\0"				\ +	"loadaddr=0x82000000\0"						\ +	"load=tftp ${loadaddr} ${u-boot}\0"				\ +	"load_k=tftp ${loadaddr} ${bootfile}\0"				\ +	"loaduimage=fatload mmc 0 ${loadaddr} uImage\0"			\ +	"loadmlo=tftp ${loadaddr} ${mlo}\0"				\ +	"mlo=" xstr(CONFIG_HOSTNAME) "/MLO\0"				\ +	"mmcargs=root=/dev/mmcblk0p2 rw "				\ +		"rootfstype=ext3 rootwait\0"				\ +	"mmcboot=echo Booting from mmc ...; "				\ +		"run mmcargs; "						\ +		"run addip addtty addmtd addfb addeth addmisc;"		\ +		"run loaduimage; "					\ +		"bootm ${loadaddr}\0"					\ +	"net_nfs=run load_k; "						\ +		"run nfsargs; "						\ +		"run addip addtty addmtd addfb addeth addmisc;"		\ +		"bootm ${loadaddr}\0"					\ +	"nfsargs=setenv bootargs root=/dev/nfs rw "			\ +		"nfsroot=${serverip}:${rootpath}\0"			\ +	"u-boot=" xstr(CONFIG_HOSTNAME) "/u-boot.img\0"			\ +	"uboot_addr=0x80000\0"						\ +	"update=nandecc sw;nand erase ${uboot_addr} 100000;"		\ +		"nand write ${loadaddr} ${uboot_addr} 80000\0"		\ +	"updatemlo=nandecc hw;nand erase 0 20000;"			\ +		"nand write ${loadaddr} 0 20000\0"			\ +	"upd=if run load;then echo Updating u-boot;if run update;"	\ +		"then echo U-Boot updated;"				\ +			"else echo Error updating u-boot !;"		\ +			"echo Board without bootloader !!;"		\ +		"fi;"							\ +		"else echo U-Boot not downloaded..exiting;fi\0"		\ +	"loadbootscript=fatload mmc 0 ${loadaddr} boot.scr\0"		\ +	"bootscript=echo Running bootscript from mmc ...; "		\ +		"source ${loadaddr}\0"					\ +	"nandargs=setenv bootargs ubi.mtd=7 "				\ +		"root=ubi0:rootfs rootfstype=ubifs\0"			\ +	"nandboot=echo Booting from nand ...; "				\ +		"run nandargs; "					\ +		"ubi part nand0,4;"					\ +		"ubi readvol ${loadaddr} kernel;"			\ +		"run addip addtty addmtd addfb addeth addmisc;"		\ +		"bootm ${loadaddr}\0"					\ +	"swupdate_args=setenv bootargs ubi.mtd=6 root=ubi0:fs_recovery "\ +		"rootfstype=ubifs quiet loglevel=1 "			\ +			"consoleblank=0 ${swupdate_misc}\0"		\ +	"swupdate=echo Running Sw-Update...;"				\ +		"if printenv mtdparts;then echo Starting SwUpdate...; "	\ +		"else mtdparts default;fi; "				\ +		"ubi part nand0,5;"					\ +		"ubi readvol 0x82000000 kernel_recovery;"		\ +		"run swupdate_args; "					\ +		"setenv bootargs ${bootargs} "				\ +			"${mtdparts} "					\ +			"vram=6M omapfb.vram=1:2M,2:2M,3:2M "		\ +			"omapdss.def_disp=lcd;"				\ +		"bootm ${loadaddr}\0"  #define CONFIG_BOOTCOMMAND \ -	"if mmc init; then " \ -		"if run loadbootscript; then " \ -			"run bootscript; " \ -		"else " \ -			"if run loaduimage; then " \ -				"run mmcboot; " \ -			"else run nandboot; " \ -			"fi; " \ -		"fi; " \ -	"else run nandboot; fi" +	"run nandboot"  #define CONFIG_AUTO_COMPLETE  #define CONFIG_CMDLINE_EDITING @@ -227,7 +287,7 @@  #define CONFIG_SYS_LONGHELP		/* undef to save memory */  #define CONFIG_SYS_HUSH_PARSER		/* use "hush" command parser */  #define CONFIG_SYS_PROMPT		V_PROMPT -#define CONFIG_SYS_CBSIZE		512	/* Console I/O Buffer Size */ +#define CONFIG_SYS_CBSIZE		1024/* Console I/O Buffer Size */  /* Print Buffer Size */  #define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE + \  					sizeof(CONFIG_SYS_PROMPT) + 16) @@ -253,13 +313,6 @@  #define CONFIG_SYS_HZ			1000  /* - * Stack sizes - * - * The stack sizes are set up in start.S using the settings below - */ -#define CONFIG_STACKSIZE	(128 << 10)	/* regular stack 128 KiB */ - -/*   * Physical Memory Map   */  #define CONFIG_NR_DRAM_BANKS	2	/* CS1 may or may not be populated */ @@ -279,18 +332,15 @@  #define CONFIG_NAND_OMAP_GPMC  #define GPMC_NAND_ECC_LP_x16_LAYOUT  #define CONFIG_ENV_IS_IN_NAND -#define SMNAND_ENV_OFFSET		0x260000 /* environment starts here */ +#define SMNAND_ENV_OFFSET		0x180000 /* environment starts here */ +/* Redundant Environment */  #define CONFIG_SYS_ENV_SECT_SIZE	(128 << 10)	/* 128 KiB */  #define CONFIG_ENV_OFFSET		SMNAND_ENV_OFFSET  #define CONFIG_ENV_ADDR			SMNAND_ENV_OFFSET - -/* - * CFI FLASH driver setup - */ -/* timeout values are in ticks */ -#define CONFIG_SYS_FLASH_ERASE_TOUT	(100 * CONFIG_SYS_HZ) -#define CONFIG_SYS_FLASH_WRITE_TOUT	(100 * CONFIG_SYS_HZ) +#define CONFIG_ENV_OFFSET_REDUND	(CONFIG_ENV_OFFSET + \ +						2 * CONFIG_SYS_ENV_SECT_SIZE) +#define CONFIG_ENV_SIZE_REDUND		CONFIG_ENV_SIZE  /* Flash banks JFFS2 should use */  #define CONFIG_SYS_MAX_MTD_BANKS	(CONFIG_SYS_MAX_FLASH_BANKS + \ diff --git a/include/configs/medcom.h b/include/configs/medcom.h index c84db03e7..678b36b6c 100644 --- a/include/configs/medcom.h +++ b/include/configs/medcom.h @@ -26,20 +26,20 @@  #ifndef __CONFIG_H  #define __CONFIG_H -#include "tegra2-common.h" +#include "tegra20-common.h"  /* Enable fdt support for Medcom. Flash the image in u-boot-dtb.bin */ -#define CONFIG_DEFAULT_DEVICE_TREE	tegra2-medcom +#define CONFIG_DEFAULT_DEVICE_TREE	tegra20-medcom  #define CONFIG_OF_CONTROL  #define CONFIG_OF_SEPARATE  /* High-level configuration options */ -#define V_PROMPT			"Tegra2 (Medcom) # " -#define CONFIG_TEGRA2_BOARD_STRING	"Avionic Design Medcom" +#define V_PROMPT			"Tegra20 (Medcom) # " +#define CONFIG_TEGRA_BOARD_STRING	"Avionic Design Medcom"  /* Board-specific serial config */  #define CONFIG_SERIAL_MULTI -#define CONFIG_TEGRA2_ENABLE_UARTD	/* UARTD: debug UART */ +#define CONFIG_TEGRA_ENABLE_UARTD	/* UARTD: debug UART */  #define CONFIG_SYS_NS16550_COM1		NV_PA_APB_UARTD_BASE  #define CONFIG_BOARD_EARLY_INIT_F @@ -78,6 +78,6 @@  	"ext2load mmc 0 0x17000000 /boot/uImage;"	\  	"bootm" -#include "tegra2-common-post.h" +#include "tegra-common-post.h"  #endif /* __CONFIG_H */ diff --git a/include/configs/meesc.h b/include/configs/meesc.h index 1e897e23e..31f2a8cf1 100644 --- a/include/configs/meesc.h +++ b/include/configs/meesc.h @@ -68,7 +68,6 @@  #define CONFIG_REVISION_TAG  #define CONFIG_CMDLINE_TAG			/* enable passing of ATAGs */  #define CONFIG_MISC_INIT_R			/* Call misc_init_r */ -#undef CONFIG_USE_IRQ				/* don't need IRQ/FIQ stuff */  #define CONFIG_DISPLAY_BOARDINFO		/* call checkboard() */  #define CONFIG_DISPLAY_CPUINFO			/* display cpu info and speed */ @@ -221,10 +220,4 @@  #define CONFIG_SYS_MALLOC_LEN		ROUND(3 * CONFIG_ENV_SIZE + \  					128*1024, 0x1000) -#define CONFIG_STACKSIZE		(32 * 1024)	/* regular stack */ - -#ifdef CONFIG_USE_IRQ -# error CONFIG_USE_IRQ not supported -#endif -  #endif diff --git a/include/configs/microblaze-generic.h b/include/configs/microblaze-generic.h index 1266cf72f..721cd906a 100644 --- a/include/configs/microblaze-generic.h +++ b/include/configs/microblaze-generic.h @@ -115,19 +115,11 @@  #endif  /* timer */ -#ifdef XILINX_TIMER_BASEADDR -# if (XILINX_TIMER_IRQ != -1) -#  define CONFIG_SYS_TIMER_0		1 +#if defined(XILINX_TIMER_BASEADDR) && defined(XILINX_TIMER_IRQ)  #  define CONFIG_SYS_TIMER_0_ADDR	XILINX_TIMER_BASEADDR  #  define CONFIG_SYS_TIMER_0_IRQ	XILINX_TIMER_IRQ -#  define FREQUENCE	XILINX_CLOCK_FREQ -#  define CONFIG_SYS_TIMER_0_PRELOAD	( FREQUENCE/1000 ) -# endif -#elif XILINX_CLOCK_FREQ -# define CONFIG_XILINX_CLOCK_FREQ	XILINX_CLOCK_FREQ -#else -# error BAD CLOCK FREQ  #endif +  /* FSL */  /* #define	CONFIG_SYS_FSL_2 */  /* #define	FSL_INTR_2	1 */ diff --git a/include/configs/mt_ventoux.h b/include/configs/mt_ventoux.h index 5db6d5766..8d35943fa 100644 --- a/include/configs/mt_ventoux.h +++ b/include/configs/mt_ventoux.h @@ -2,6 +2,9 @@   * Copyright (C) 2011   * Stefano Babic, DENX Software Engineering, sbabic@denx.de.   * + * + * Configuration settings for the Teejet mt_ventoux board. + *   * Copyright (C) 2009 TechNexion Ltd.   *   * This program is free software; you can redistribute it and/or modify @@ -24,6 +27,10 @@  #include "tam3517-common.h" +#undef CONFIG_SYS_MALLOC_LEN +#define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + (128 << 10) + \ +					6 * 1024 * 1024) +  #define MACH_TYPE_AM3517_MT_VENTOUX	3832  #define CONFIG_MACH_TYPE	MACH_TYPE_AM3517_MT_VENTOUX @@ -31,6 +38,7 @@  #define CONFIG_BOOTFILE		"uImage"  #define CONFIG_AUTO_COMPLETE +#define CONFIG_OMAP3_GPIO_4  #define CONFIG_HOSTNAME mt_ventoux  /* @@ -62,6 +70,15 @@  #define CONFIG_FPGA_DELAY() udelay(1)  #define CONFIG_SYS_FPGA_PROG_FEEDBACK +#define CONFIG_VIDEO +#define CONFIG_CFB_CONSOLE +#define CONFIG_VGA_AS_SINGLE_DEVICE +#define CONFIG_SPLASH_SCREEN +#define CONFIG_VIDEO_BMP_RLE8 +#define CONFIG_CMD_BMP +#define CONFIG_VIDEO_OMAP3	/* DSS Support			*/ +#define CONFIG_SYS_CONSOLE_IS_IN_ENV +  #define	CONFIG_EXTRA_ENV_SETTINGS	CONFIG_TAM3517_SETTINGS \  	"bootcmd=run net_nfs\0" diff --git a/include/configs/mv-common.h b/include/configs/mv-common.h index 27b489902..7086d1d0e 100644 --- a/include/configs/mv-common.h +++ b/include/configs/mv-common.h @@ -105,7 +105,6 @@  #define CONFIG_ARCH_MISC_INIT	/* call arch_misc_init() */  #define CONFIG_BOARD_EARLY_INIT_F /* call board_init_f for early inits */  #define CONFIG_DISPLAY_CPUINFO	/* Display cpu info */ -#define CONFIG_STACKSIZE	0x00100000	/* regular stack- 1M */  #define CONFIG_SYS_LOAD_ADDR	0x00800000	/* default load adr- 8M */  #define CONFIG_SYS_MEMTEST_START 0x00800000	/* 8M */  #define CONFIG_SYS_MEMTEST_END	0x00ffffff	/*(_16M -1) */ diff --git a/include/configs/mx1ads.h b/include/configs/mx1ads.h index 665e33d86..3ede042ad 100644 --- a/include/configs/mx1ads.h +++ b/include/configs/mx1ads.h @@ -35,7 +35,6 @@  #define CONFIG_ARM920T		1	/* This is an ARM920T Core		*/  #define CONFIG_IMX		1	/* It's a Motorola MC9328 SoC		*/  #define CONFIG_MX1ADS		1	/* on a Motorola MX1ADS Board		*/ -#undef CONFIG_USE_IRQ			/* we don't need IRQ/FIQ stuff		*/  /*   * Select serial console configuration @@ -133,17 +132,6 @@  #define CONFIG_SYS_CPUSPEED		0x141  /*----------------------------------------------------------------------- - * Stack sizes - * - * The stack sizes are set up in start.S using the settings below - */ -#define CONFIG_STACKSIZE	(128*1024)	/* regular stack */ -#ifdef CONFIG_USE_IRQ -#define CONFIG_STACKSIZE_IRQ	(4*1024)	/* IRQ stack */ -#define CONFIG_STACKSIZE_FIQ	(4*1024)	/* FIQ stack */ -#endif - -/*-----------------------------------------------------------------------   * Physical Memory Map   */ diff --git a/include/configs/mx25pdk.h b/include/configs/mx25pdk.h index efca28753..96c143efb 100644 --- a/include/configs/mx25pdk.h +++ b/include/configs/mx25pdk.h @@ -17,7 +17,6 @@  /* High Level Configuration Options */ -#define CONFIG_MX25_CLK32		32768	/* OSC32K frequency */  #define CONFIG_SYS_HZ			1000  #define CONFIG_SYS_TEXT_BASE		0x81200000 @@ -49,9 +48,6 @@  #define CONFIG_SYS_MEMTEST_START	(PHYS_SDRAM_1 + PHYS_SDRAM_1_SIZE/2)  #define CONFIG_SYS_MEMTEST_END		(PHYS_SDRAM_1 + PHYS_SDRAM_1_SIZE) -/* Stack sizes */ -#define CONFIG_STACKSIZE	(128 * 1024)	/* regular stack */ -  /* Serial Info */  #define CONFIG_MXC_UART  #define CONFIG_MXC_UART_BASE	UART1_BASE diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h index a4a22fc8a..dffb744c3 100644 --- a/include/configs/mx28evk.h +++ b/include/configs/mx28evk.h @@ -19,20 +19,19 @@  #ifndef __MX28EVK_CONFIG_H__  #define __MX28EVK_CONFIG_H__ -#include <asm/arch/regs-base.h> -  /*   * SoC configurations   */  #define CONFIG_MX28				/* i.MX28 SoC */ +  #define CONFIG_MXS_GPIO			/* GPIO control */  #define CONFIG_SYS_HZ		1000		/* Ticks per second */  #define CONFIG_MACH_TYPE	MACH_TYPE_MX28EVK +#include <asm/arch/regs-base.h> +  #define CONFIG_SYS_NO_FLASH -#define CONFIG_SYS_ICACHE_OFF -#define CONFIG_SYS_DCACHE_OFF  #define CONFIG_BOARD_EARLY_INIT_F  #define CONFIG_ARCH_MISC_INIT @@ -41,8 +40,8 @@   */  #define CONFIG_SPL  #define CONFIG_SPL_NO_CPU_SUPPORT_CODE -#define CONFIG_SPL_START_S_PATH	"arch/arm/cpu/arm926ejs/mx28" -#define CONFIG_SPL_LDSCRIPT	"arch/arm/cpu/arm926ejs/mx28/u-boot-spl.lds" +#define CONFIG_SPL_START_S_PATH	"arch/arm/cpu/arm926ejs/mxs" +#define CONFIG_SPL_LDSCRIPT	"arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds"  #define CONFIG_SPL_LIBCOMMON_SUPPORT  #define CONFIG_SPL_LIBGENERIC_SUPPORT  #define CONFIG_SPL_GPIO_SUPPORT @@ -76,7 +75,6 @@  #define CONFIG_NR_DRAM_BANKS		1		/* 1 bank of DRAM */  #define PHYS_SDRAM_1			0x40000000	/* Base address */  #define PHYS_SDRAM_1_SIZE		0x40000000	/* Max 1 GB RAM */ -#define CONFIG_STACKSIZE		(128 * 1024)	/* 128 KB stack */  #define CONFIG_SYS_MALLOC_LEN		0x00400000	/* 4 MB for malloc */  #define CONFIG_SYS_MEMTEST_START	0x40000000	/* Memtest start adr */  #define CONFIG_SYS_MEMTEST_END		0x40400000	/* 4 MB RAM test */ @@ -186,6 +184,9 @@  #define	CONFIG_EHCI_MXS_PORT 1  #define	CONFIG_EHCI_IS_TDI  #define	CONFIG_USB_STORAGE +#define	CONFIG_USB_HOST_ETHER +#define	CONFIG_USB_ETHER_ASIX +#define	CONFIG_USB_ETHER_SMSC95XX  #endif  /* I2C */ @@ -201,6 +202,7 @@  #ifdef CONFIG_CMD_SPI  #define CONFIG_HARD_SPI  #define CONFIG_MXS_SPI +#define CONFIG_MXS_SPI_DMA_ENABLE  #define CONFIG_SPI_HALF_DUPLEX  #define CONFIG_DEFAULT_SPI_BUS		2  #define CONFIG_DEFAULT_SPI_MODE		SPI_MODE_0 @@ -216,7 +218,6 @@  #define CONFIG_SF_DEFAULT_SPEED		24000000  /* (redundant) environemnt in SPI flash */ -#undef CONFIG_ENV_IS_IN_SPI_FLASH  #ifdef CONFIG_ENV_IS_IN_SPI_FLASH  #define CONFIG_SYS_REDUNDAND_ENVIRONMENT  #define CONFIG_ENV_SIZE			0x1000		/* 4KB */ @@ -238,7 +239,6 @@  #define CONFIG_SETUP_MEMORY_TAGS  #define CONFIG_BOOTDELAY	3  #define CONFIG_BOOTFILE	"uImage" -#define CONFIG_BOOTCOMMAND	"run bootcmd_net"  #define CONFIG_LOADADDR	0x42000000  #define CONFIG_SYS_LOAD_ADDR	CONFIG_LOADADDR  #define CONFIG_OF_LIBFDT @@ -247,13 +247,80 @@   * Extra Environments   */  #define CONFIG_EXTRA_ENV_SETTINGS \ -	"console_fsl=console=ttyAM0" \ -	"console_mainline=console=ttyAMA0" \ -	"netargs=setenv bootargs console=${console_mainline}" \ +	"update_nand_full_filename=u-boot.nand\0" \ +	"update_nand_firmware_filename=u-boot.sb\0"	\ +	"update_sd_firmware_filename=u-boot.sd\0" \ +	"update_nand_firmware_maxsz=0x100000\0"	\ +	"update_nand_stride=0x40\0"	/* MX28 datasheet ch. 12.12 */ \ +	"update_nand_count=0x4\0"	/* MX28 datasheet ch. 12.12 */ \ +	"update_nand_get_fcb_size="	/* Get size of FCB blocks */ \ +		"nand device 0 ; " \ +		"nand info ; " \ +		"setexpr fcb_sz ${update_nand_stride} * ${update_nand_count};" \ +		"setexpr update_nand_fcb ${fcb_sz} * ${nand_writesize}\0" \ +	"update_nand_full="		    /* Update FCB, DBBT and FW */ \ +		"if tftp ${update_nand_full_filename} ; then " \ +		"run update_nand_get_fcb_size ; " \ +		"nand scrub -y 0x0 ${filesize} ; " \ +		"nand write.raw ${loadaddr} 0x0 ${update_nand_fcb} ; " \ +		"setexpr update_off ${loadaddr} + ${update_nand_fcb} ; " \ +		"setexpr update_sz ${filesize} - ${update_nand_fcb} ; " \ +		"nand write ${update_off} ${update_nand_fcb} ${update_sz} ; " \ +		"fi\0" \ +	"update_nand_firmware="		/* Update only firmware */ \ +		"if tftp ${update_nand_firmware_filename} ; then " \ +		"run update_nand_get_fcb_size ; " \ +		"setexpr fcb_sz ${update_nand_fcb} * 2 ; " /* FCB + DBBT */ \ +		"setexpr fw_sz ${update_nand_firmware_maxsz} * 2 ; " \ +		"setexpr fw_off ${fcb_sz} + ${update_nand_firmware_maxsz};" \ +		"nand erase ${fcb_sz} ${fw_sz} ; " \ +		"nand write ${loadaddr} ${fcb_sz} ${filesize} ; " \ +		"nand write ${loadaddr} ${fw_off} ${filesize} ; " \ +		"fi\0" \ +	"update_sd_firmware="		/* Update the SD firmware partition */ \ +		"if mmc rescan ; then "	\ +		"if tftp ${update_sd_firmware_filename} ; then " \ +		"setexpr fw_sz ${filesize} / 0x200 ; "	/* SD block size */ \ +		"setexpr fw_sz ${fw_sz} + 1 ; "	\ +		"mmc write ${loadaddr} 0x800 ${fw_sz} ; " \ +		"fi ; "	\ +		"fi\0" \ +	"script=boot.scr\0"	\ +	"uimage=uImage\0" \ +	"console_fsl=ttyAM0\0" \ +	"console_mainline=ttyAMA0\0" \ +	"mmcdev=0\0" \ +	"mmcpart=2\0" \ +	"mmcroot=/dev/mmcblk0p3 rw\0" \ +	"mmcrootfstype=ext3 rootwait\0"	\ +	"mmcargs=setenv bootargs console=${console_mainline},${baudrate} " \ +		"root=${mmcroot} " \ +		"rootfstype=${mmcrootfstype}\0"	\ +	"loadbootscript="  \ +		"fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ +	"bootscript=echo Running bootscript from mmc ...; "	\ +		"source\0" \ +	"loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \ +	"mmcboot=echo Booting from mmc ...; " \ +		"run mmcargs; "	\ +		"bootm\0" \ +	"netargs=setenv bootargs console=${console_mainline},${baudrate} " \  		"root=/dev/nfs " \ -		"ip=dhcp nfsroot=${serverip}:${nfsroot}\0" \ -	"bootcmd_net=echo Booting from net ...; " \ -		"run netargs; " \ -		"dhcp ${uimage}; bootm\0" \ +		"ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \ +	"netboot=echo Booting from net ...; " \ +		"run netargs; "	\ +		"dhcp ${uimage}; bootm\0" + +#define CONFIG_BOOTCOMMAND \ +	"if mmc rescan ${mmcdev}; then " \ +		"if run loadbootscript; then " \ +			"run bootscript; " \ +		"else " \ +			"if run loaduimage; then " \ +				"run mmcboot; " \ +			"else run netboot; " \ +			"fi; " \ +		"fi; " \ +	"else run netboot; fi"  #endif /* __MX28EVK_CONFIG_H__ */ diff --git a/include/configs/mx31ads.h b/include/configs/mx31ads.h index cc720e808..9d9f4a782 100644 --- a/include/configs/mx31ads.h +++ b/include/configs/mx31ads.h @@ -27,8 +27,6 @@   /* High Level Configuration Options */  #define CONFIG_ARM1136		1		/* This is an arm1136 CPU core */  #define CONFIG_MX31		1		/* in a mx31 */ -#define CONFIG_MX31_HCLK_FREQ	26000000	/* RedBoot says 26MHz */ -#define CONFIG_MX31_CLK32	32768  #define CONFIG_DISPLAY_CPUINFO  #define CONFIG_DISPLAY_BOARDINFO @@ -155,13 +153,6 @@  #define CONFIG_CMDLINE_EDITING	1  /*----------------------------------------------------------------------- - * Stack sizes - * - * The stack sizes are set up in start.S using the settings below - */ -#define CONFIG_STACKSIZE	(128 * 1024)	/* regular stack */ - -/*-----------------------------------------------------------------------   * Physical Memory Map   */  #define CONFIG_NR_DRAM_BANKS	1 diff --git a/include/configs/mx31pdk.h b/include/configs/mx31pdk.h index 7634de72c..b272674f8 100644 --- a/include/configs/mx31pdk.h +++ b/include/configs/mx31pdk.h @@ -35,8 +35,6 @@  /* High Level Configuration Options */  #define CONFIG_ARM1136			/* This is an arm1136 CPU core */  #define CONFIG_MX31			/* in a mx31 */ -#define CONFIG_MX31_HCLK_FREQ	26000000 -#define CONFIG_MX31_CLK32	32768  #define CONFIG_DISPLAY_CPUINFO  #define CONFIG_DISPLAY_BOARDINFO @@ -151,13 +149,6 @@  #define CONFIG_CMDLINE_EDITING  /*----------------------------------------------------------------------- - * Stack sizes - * - * The stack sizes are set up in start.S using the settings below - */ -#define CONFIG_STACKSIZE	(128 * 1024) /* regular stack */ - -/*-----------------------------------------------------------------------   * Physical Memory Map   */  #define CONFIG_NR_DRAM_BANKS	1 diff --git a/include/configs/mx35pdk.h b/include/configs/mx35pdk.h index 6eb5da5d8..69bd654b9 100644 --- a/include/configs/mx35pdk.h +++ b/include/configs/mx35pdk.h @@ -31,7 +31,6 @@   /* High Level Configuration Options */  #define CONFIG_ARM1136	/* This is an arm1136 CPU core */  #define CONFIG_MX35 -#define CONFIG_MX35_HCLK_FREQ	24000000  #define CONFIG_DISPLAY_CPUINFO @@ -111,6 +110,12 @@  #define CONFIG_NET_RETRY_COUNT	100  #define CONFIG_CMD_DATE +#define CONFIG_CMD_MMC +#define CONFIG_DOS_PARTITION +#define CONFIG_EFI_PARTITION +#define CONFIG_CMD_EXT2 +#define CONFIG_CMD_FAT +  #define CONFIG_BOOTDELAY	3  #define CONFIG_LOADADDR		0x80800000	/* loadaddr env var */ @@ -160,14 +165,6 @@  #define CONFIG_SYS_HZ				1000 - -/* - * Stack sizes - * - * The stack sizes are set up in start.S using the settings below - */ -#define CONFIG_STACKSIZE	(128 * 1024)	/* regular stack */ -  /*   * Physical Memory Map   */ @@ -239,13 +236,19 @@   * NAND FLASH driver setup   */  #define CONFIG_NAND_MXC -#define CONFIG_NAND_MXC_V1_1  #define CONFIG_MXC_NAND_REGS_BASE	(NFC_BASE_ADDR)  #define CONFIG_SYS_MAX_NAND_DEVICE	1  #define CONFIG_SYS_NAND_BASE		(NFC_BASE_ADDR)  #define CONFIG_MXC_NAND_HWECC  #define CONFIG_SYS_NAND_LARGEPAGE +/* mmc driver */ +#define CONFIG_MMC +#define CONFIG_GENERIC_MMC +#define CONFIG_FSL_ESDHC +#define CONFIG_SYS_FSL_ESDHC_ADDR	0 +#define CONFIG_SYS_FSL_ESDHC_NUM	1 +  /*   * Default environment and default scripts   * to update uboot and load kernel @@ -287,8 +290,8 @@  	"u-boot=" xstr(CONFIG_HOSTNAME) "/u-boot.bin\0"			\  	"load=tftp ${loadaddr} ${u-boot}\0"				\  	"uboot_addr=" xstr(CONFIG_SYS_MONITOR_BASE) "\0"		\ -	"update=protect off ${uboot_addr} +40000;"			\ -		"erase ${uboot_addr} +40000;"				\ +	"update=protect off ${uboot_addr} +80000;"			\ +		"erase ${uboot_addr} +80000;"				\  		"cp.b ${loadaddr} ${uboot_addr} ${filesize}\0"		\  	"upd=if run load;then echo Updating u-boot;if run update;"	\  		"then echo U-Boot updated;"				\ diff --git a/include/configs/efikamx.h b/include/configs/mx51_efikamx.h index 143b0f01f..439b5f3fe 100644 --- a/include/configs/efikamx.h +++ b/include/configs/mx51_efikamx.h @@ -246,13 +246,6 @@  #define CONFIG_CMDLINE_EDITING  /*----------------------------------------------------------------------- - * Stack sizes - * - * The stack sizes are set up in start.S using the settings below - */ -#define CONFIG_STACKSIZE	(128 * 1024)	/* regular stack */ - -/*-----------------------------------------------------------------------   * Physical Memory Map   */  #define CONFIG_NR_DRAM_BANKS		1 diff --git a/include/configs/mx51evk.h b/include/configs/mx51evk.h index e975f549b..ba4a4a623 100644 --- a/include/configs/mx51evk.h +++ b/include/configs/mx51evk.h @@ -128,6 +128,8 @@  #define CONFIG_VIDEO_IPUV3  #define CONFIG_CFB_CONSOLE  #define CONFIG_VGA_AS_SINGLE_DEVICE +#define CONFIG_SYS_CONSOLE_IS_IN_ENV +#define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE  #define CONFIG_VIDEO_BMP_RLE8  #define CONFIG_SPLASH_SCREEN  #define CONFIG_BMP_16BPP @@ -216,13 +218,6 @@  #define CONFIG_CMDLINE_EDITING  /*----------------------------------------------------------------------- - * Stack sizes - * - * The stack sizes are set up in start.S using the settings below - */ -#define CONFIG_STACKSIZE	(128 * 1024)	/* regular stack */ - -/*-----------------------------------------------------------------------   * Physical Memory Map   */  #define CONFIG_NR_DRAM_BANKS	1 diff --git a/include/configs/mx53ard.h b/include/configs/mx53ard.h index b48625353..6ab4cde48 100644 --- a/include/configs/mx53ard.h +++ b/include/configs/mx53ard.h @@ -153,9 +153,6 @@  #define CONFIG_SYS_HZ		1000  #define CONFIG_CMDLINE_EDITING -/* Stack sizes */ -#define CONFIG_STACKSIZE	(128 * 1024)	/* regular stack */ -  /* Physical Memory Map */  #define CONFIG_NR_DRAM_BANKS	2  #define PHYS_SDRAM_1		CSD0_BASE_ADDR diff --git a/include/configs/mx53evk.h b/include/configs/mx53evk.h index d6aa46d7b..b46855f7e 100644 --- a/include/configs/mx53evk.h +++ b/include/configs/mx53evk.h @@ -88,6 +88,9 @@  #define CONFIG_CMD_NET  #define CONFIG_CMD_DATE +/* Miscellaneous commands */ +#define CONFIG_CMD_BMODE +  /* allow to overwrite serial and ethaddr */  #define CONFIG_ENV_OVERWRITE  #define CONFIG_CONS_INDEX		1 @@ -164,9 +167,6 @@  #define CONFIG_SYS_HZ		1000  #define CONFIG_CMDLINE_EDITING -/* Stack sizes */ -#define CONFIG_STACKSIZE	(128 * 1024)	/* regular stack */ -  /* Physical Memory Map */  #define CONFIG_NR_DRAM_BANKS	1  #define PHYS_SDRAM_1		CSD0_BASE_ADDR diff --git a/include/configs/mx53loco.h b/include/configs/mx53loco.h index 597c4e45d..8cbaf08e0 100644 --- a/include/configs/mx53loco.h +++ b/include/configs/mx53loco.h @@ -175,9 +175,6 @@  #define CONFIG_SYS_HZ		1000  #define CONFIG_CMDLINE_EDITING -/* Stack sizes */ -#define CONFIG_STACKSIZE	(128 * 1024)	/* regular stack */ -  /* Physical Memory Map */  #define CONFIG_NR_DRAM_BANKS	2  #define PHYS_SDRAM_1		CSD0_BASE_ADDR @@ -221,6 +218,8 @@  #define CONFIG_VIDEO_IPUV3  #define CONFIG_CFB_CONSOLE  #define CONFIG_VGA_AS_SINGLE_DEVICE +#define CONFIG_SYS_CONSOLE_IS_IN_ENV +#define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE  #define CONFIG_VIDEO_BMP_RLE8  #define CONFIG_SPLASH_SCREEN  #define CONFIG_BMP_16BPP diff --git a/include/configs/mx53smd.h b/include/configs/mx53smd.h index 1982184c8..f54d328be 100644 --- a/include/configs/mx53smd.h +++ b/include/configs/mx53smd.h @@ -152,9 +152,6 @@  #define CONFIG_SYS_HZ		1000  #define CONFIG_CMDLINE_EDITING -/* Stack sizes */ -#define CONFIG_STACKSIZE	(128 * 1024)	/* regular stack */ -  /* Physical Memory Map */  #define CONFIG_NR_DRAM_BANKS	2  #define PHYS_SDRAM_1		CSD0_BASE_ADDR diff --git a/include/configs/mx6qarm2.h b/include/configs/mx6qarm2.h index a9c1b1545..6c1789527 100644 --- a/include/configs/mx6qarm2.h +++ b/include/configs/mx6qarm2.h @@ -140,7 +140,6 @@  #define CONFIG_SYS_HZ			1000  #define CONFIG_CMDLINE_EDITING -#define CONFIG_STACKSIZE		(128 * 1024)  /* Physical Memory Map */  #define CONFIG_NR_DRAM_BANKS		1 diff --git a/include/configs/mx6qsabrelite.h b/include/configs/mx6qsabrelite.h index 0d376ba5c..72d0154d2 100644 --- a/include/configs/mx6qsabrelite.h +++ b/include/configs/mx6qsabrelite.h @@ -31,6 +31,7 @@  #define CONFIG_MACH_TYPE	3769  #include <asm/arch/imx-regs.h> +#include <asm/imx-common/gpio.h>  #define CONFIG_CMDLINE_TAG  #define CONFIG_SETUP_MEMORY_TAGS @@ -53,7 +54,7 @@  #define CONFIG_SPI_FLASH_SST  #define CONFIG_MXC_SPI  #define CONFIG_SF_DEFAULT_BUS  0 -#define CONFIG_SF_DEFAULT_CS   (0|(GPIO_NUMBER(3, 19)<<8)) +#define CONFIG_SF_DEFAULT_CS   (0|(IMX_GPIO_NR(3, 19)<<8))  #define CONFIG_SF_DEFAULT_SPEED 25000000  #define CONFIG_SF_DEFAULT_MODE (SPI_MODE_0)  #endif @@ -117,6 +118,9 @@  #define CONFIG_MXC_USB_PORTSC	(PORT_PTS_UTMI | PORT_PTS_PTW)  #define CONFIG_MXC_USB_FLAGS	0 +/* Miscellaneous commands */ +#define CONFIG_CMD_BMODE +  /* allow to overwrite serial and ethaddr */  #define CONFIG_ENV_OVERWRITE  #define CONFIG_CONS_INDEX	       1 @@ -194,7 +198,6 @@  #define CONFIG_SYS_HZ		       1000  #define CONFIG_CMDLINE_EDITING -#define CONFIG_STACKSIZE	       (128 * 1024)  /* Physical Memory Map */  #define CONFIG_NR_DRAM_BANKS	       1 diff --git a/include/configs/nhk8815.h b/include/configs/nhk8815.h index 37a66aba1..d438efdae 100644 --- a/include/configs/nhk8815.h +++ b/include/configs/nhk8815.h @@ -85,12 +85,6 @@  #define CONFIG_SYS_TEXT_BASE    0x00000000  #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_TEXT_BASE + (1<<20)) -#define CONFIG_STACKSIZE	(128 * 1024)	/* regular stack */ -#ifdef CONFIG_USE_IRQ -#  define CONFIG_STACKSIZE_IRQ	(4 * 1024)	/* IRQ stack */ -#  define CONFIG_STACKSIZE_FIQ	(4 * 1024)	/* FIQ stack */ -#endif -  #define CONFIG_SYS_MEMTEST_START	0x00000000  #define CONFIG_SYS_MEMTEST_END		0x0FFFFFFF  #define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + 256 * 1024) diff --git a/include/configs/ns9750dev.h b/include/configs/ns9750dev.h index f465a5606..3f49c6f0b 100644 --- a/include/configs/ns9750dev.h +++ b/include/configs/ns9750dev.h @@ -42,7 +42,6 @@  #define AHB_CLK_FREQ		(CONFIG_SYS_CLK_FREQ/4)  #define BBUS_CLK_FREQ		(CONFIG_SYS_CLK_FREQ/8) -#undef CONFIG_USE_IRQ			/* we don't need IRQ/FIQ stuff */  /*@TODO #define CONFIG_STATUS_LED*/  #define CONFIG_USE_IRQ @@ -126,10 +125,7 @@  /*-----------------------------------------------------------------------   * Stack sizes - * - * The stack sizes are set up in start.S using the settings below   */ -#define CONFIG_STACKSIZE	(128*1024)	/* regular stack */  #ifdef CONFIG_USE_IRQ  #define CONFIG_STACKSIZE_IRQ	(4*1024)	/* IRQ stack */  #define CONFIG_STACKSIZE_FIQ	(4*1024)	/* FIQ stack */ diff --git a/include/configs/o2d.h b/include/configs/o2d.h new file mode 100644 index 000000000..c0b75eb39 --- /dev/null +++ b/include/configs/o2d.h @@ -0,0 +1,80 @@ +/* + * (C) Copyright 2012 + * DENX Software Engineering, Anatolij Gustschin <agust@denx.de> + * + * 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. + */ + +/* + * Valid values for CONFIG_SYS_TEXT_BASE are: + * 0xFC000000   boot low boot high (standard configuration) + * 0x00100000   boot from RAM (for testing only) + */ +#ifndef CONFIG_SYS_TEXT_BASE +#define CONFIG_SYS_TEXT_BASE	0xfc000000	/* Standard: boot low */ +#endif + +/* Board specific flash config */ +#define CONFIG_SYS_FLASH_BASE		0xfc000000 +#define CONFIG_SYS_FLASH_SIZE		0x04000000      /* maximum 64MB */ +/* max number of sectors on one chip */ +#define CONFIG_SYS_MAX_FLASH_SECT	512 + +/* + * Include common defines for all ifm boards + */ +#include "o2dnt-common.h" + +/* additional commands */ +#define CONFIG_CMD_ITEST + +/* + * GPIO configuration: + * CS1 SDRAM activate + no CAN + no PCI + */ +#define CONFIG_SYS_GPS_PORT_CONFIG	0x8000A004 + +/* Other board specific configs */ +#define CONFIG_SYS_BOOTCS_CFG		0x00057d01 +#define CONFIG_SYS_RESET_ADDRESS	0xfc000000 + +#define CONFIG_SYS_MEMTEST_START	0x00100000      /* memtest works on */ +#define CONFIG_SYS_MEMTEST_END		0x07f00000	/* 1 - 127 MB in DRAM */ + +#define CONFIG_BOARD_NAME		"o2d" +#define CONFIG_BOARD_BOOTCMD		"run dhcp_boot" +#define CONFIG_BOARD_MEM_LIMIT		xstr(126) +#define BOARD_POST_CRC32_END		xstr(0x01000000) + +#define CONFIG_EXTRA_ENV_SETTINGS					\ +	CONFIG_IFM_DEFAULT_ENV_SETTINGS					\ +	CONFIG_IFM_DEFAULT_ENV_OLD					\ +	CONFIG_IFM_DEFAULT_ENV_NEW					\ +	"linbot=fc060000\0"						\ +	"lintop=fc15ffff\0"						\ +	"rambot=fc160000\0"						\ +	"ramtop=fc55ffff\0"						\ +	"jffbot=fc560000\0"						\ +	"jfftop=fcffffff\0"						\ +	"ubobot=" xstr(CONFIG_SYS_FLASH_BASE) "\0"			\ +	"ubotop=fc03ffff\0"						\ +	"kernel_addr=0xfc060000\0"					\ +	"ramdisk_addr=0xfc160000\0"					\ +	"progCram=tftp ${fileaddr} ${cramfsname};"			\ +		"erase ${rambot} ${ramtop};"				\ +		"cp.b ${fileaddr} ${rambot} ${filesize}\0"		\ +	"flash_for_configs=22396\0"					\ +	"flash_mtd=run mtd_args addip addmem;"				\ +		"bootm ${kernel_addr}\0"				\ +	"mtd_args=setenv bootargs root=/dev/mtdblock3 "			\ +		"rw rootfstype=cramfs\0"				\ +	"master=mw f0000b00 0x8005A006;mw f0000b0c ${IOpin};"		\ +		"mw f0000b04 ${IOpin};mw f0000b10 0x20\0"		\ +	"dhcp_boot=run dhcpcmd;run flash_mtd\0"				\ +	"hostname=IFM_SENSOR\0"						\ +	"netretry=once\0"						\ +	"autoload=no\0"							\ +	"sensorType=O2D222AG\0" diff --git a/include/configs/o2d300.h b/include/configs/o2d300.h new file mode 100644 index 000000000..c74e622b8 --- /dev/null +++ b/include/configs/o2d300.h @@ -0,0 +1,84 @@ +/* + * (C) Copyright 2012 + * DENX Software Engineering, Anatolij Gustschin <agust@denx.de> + * + * 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. + */ + +/* + * Valid values for CONFIG_SYS_TEXT_BASE are: + * 0xFC000000   boot low boot high (standard configuration) + * 0x00100000   boot from RAM (for testing only) + */ +#ifndef CONFIG_SYS_TEXT_BASE +#define CONFIG_SYS_TEXT_BASE	0xfc000000	/* Standard: boot low */ +#endif + +/* Board specific flash config */ +#define CONFIG_SYS_FLASH_BASE		0xfc000000 +#define CONFIG_SYS_FLASH_SIZE		0x04000000      /* maximum 64MB */ +/* max number of sectors on one chip */ +#define CONFIG_SYS_MAX_FLASH_SECT	512 + +/* + * Include common defines for all ifm boards + */ +#include "o2dnt-common.h" + +/* + * GPIO configuration: + * CS1 SDRAM activate + no CAN + no PCI + */ +#define CONFIG_SYS_GPS_PORT_CONFIG      0x8000A004 + +/* Other board specific configs */ +#define CONFIG_SYS_BOOTCS_CFG		0x00057d01 +#define CONFIG_SYS_RESET_ADDRESS	0xfc000000 + +#define CONFIG_SYS_MEMTEST_START	0x00100000      /* memtest works on */ +#define CONFIG_SYS_MEMTEST_END		0x07f00000	/* 1 - 127 MB in DRAM */ + +/* Use redundant environment */ +#define CONFIG_ENV_ADDR_REDUND		(CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE) +#define CONFIG_ENV_SIZE_REDUND		(CONFIG_ENV_SIZE) + +#define CONFIG_BOARD_NAME		"o2d300" +#define CONFIG_BOARD_BOOTCMD		"run dhcp_boot" +#define CONFIG_BOARD_MEM_LIMIT		xstr(126) +#define BOARD_POST_CRC32_END		xstr(0x02000000) + +#define CONFIG_EXTRA_ENV_SETTINGS					\ +	CONFIG_IFM_DEFAULT_ENV_SETTINGS					\ +	CONFIG_IFM_DEFAULT_ENV_OLD					\ +	CONFIG_IFM_DEFAULT_ENV_NEW					\ +	"autoload=no\0"							\ +	"dhcp_boot=run dhcpcmd;run flash_mtd\0"				\ +	"flash_mtd=run mtd_args addip addmem;"				\ +		"bootm ${kernel_addr}\0"				\ +	"mtd_args=setenv bootargs root=/dev/mtdblock4 "			\ +		"rw rootfstype=cramfs\0"				\ +	"linbot=fc080000\0"						\ +	"lintop=fc17ffff\0"						\ +	"rambot=fc180000\0"						\ +	"ramtop=fc57ffff\0"						\ +	"jffbot=fc580000\0"						\ +	"jfftop=fd39ffff\0"						\ +	"ubobot=" xstr(CONFIG_SYS_FLASH_BASE) "\0"			\ +	"ubotop=fc03ffff\0"						\ +	"halname="CONFIG_BOARD_NAME"/"CONFIG_BOARD_NAME"_halcon\0"	\ +	"halbot=fd3a0000\0"						\ +	"haltop=fdf9ffff\0"						\ +	"progHal=tftp 200000 ${halname};erase ${halbot} ${haltop};"	\ +		"cp.b ${fileaddr} ${halbot} ${filesize}\0"		\ +	"kernel_addr=0xfc060000\0"					\ +	"ramdisk_addr=0xfc160000\0"					\ +	"master=mw f0000b00 0x8005A006;mw f0000b0c ${IOpin};"		\ +		"mw f0000b04 ${IOpin};mw f0000b10 0x20\0"		\ +	"netretry=once\0"						\ +	"protcmd=protect on ${linbot} ${lintop};"			\ +		"protect on ${rambot} ${ramtop}\0"			\ +	"o2derror=def_env\0"						\ +	"sensorType=O2D300AA\0" diff --git a/include/configs/o2dnt-common.h b/include/configs/o2dnt-common.h new file mode 100644 index 000000000..ca89066d2 --- /dev/null +++ b/include/configs/o2dnt-common.h @@ -0,0 +1,379 @@ +/* + *  Common configuration options for ifm camera boards + * + * (C) Copyright 2005 + * Sebastien Cazaux, ifm electronic gmbh + * + * (C) Copyright 2012 + * DENX Software Engineering, Anatolij Gustschin <agust@denx.de> + * + * 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 __O2D_CONFIG_H +#define __O2D_CONFIG_H + +/* + * High Level Configuration Options + */ +#define CONFIG_MPC5xxx		1	/* This is an MPC5xxx CPU */ +#define CONFIG_MPC5200 + +#define CONFIG_SYS_MPC5XXX_CLKIN	33000000 /* running at 33.000000MHz */ + +#define CONFIG_SYS_CACHELINE_SIZE	32	/* For MPC5xxx CPUs */ +#if defined(CONFIG_CMD_KGDB) +/* log base 2 of the above value */ +#define CONFIG_SYS_CACHELINE_SHIFT	5 +#endif + +/* +#define CONFIG_POST	(CONFIG_SYS_POST_MEMORY | \ +			 CONFIG_SYS_POST_I2C) +*/ + +#ifdef CONFIG_POST +/* preserve space for the post_word at end of on-chip SRAM */ +#define MPC5XXX_SRAM_POST_SIZE	(MPC5XXX_SRAM_SIZE - 4) +#endif + +/* + * Serial console configuration + */ +#define CONFIG_PSC_CONSOLE	5	/* console is on PSC5 */ +#define CONFIG_BAUDRATE		115200	/* ... at 115200 bps */ +#define CONFIG_SYS_BAUDRATE_TABLE \ +	{ 9600, 19200, 38400, 57600, 115200, 230400 } + +/* + * PCI Mapping: + * 0x40000000 - 0x4fffffff - PCI Memory + * 0x50000000 - 0x50ffffff - PCI IO Space + */ +#undef CONFIG_PCI +#define CONFIG_PCI_PNP		1 + +#define CONFIG_PCI_MEM_BUS	0x40000000 +#define CONFIG_PCI_MEM_PHYS	CONFIG_PCI_MEM_BUS +#define CONFIG_PCI_MEM_SIZE	0x10000000 + +#define CONFIG_PCI_IO_BUS	0x50000000 +#define CONFIG_PCI_IO_PHYS	CONFIG_PCI_IO_BUS +#define CONFIG_PCI_IO_SIZE	0x01000000 + +#define CONFIG_SYS_XLB_PIPELINING	1 + +/* Partitions */ +#define CONFIG_MAC_PARTITION +#define CONFIG_DOS_PARTITION +#define CONFIG_ISO_PARTITION + +#define CONFIG_TIMESTAMP	/* Print image info with timestamp */ + +#define CONFIG_SYS_ALT_MEMTEST	/* Much more complex memory test */ + +/* + * Supported commands + */ +#include <config_cmd_default.h> + +#define CONFIG_CMD_EEPROM +#define CONFIG_CMD_FAT +#define CONFIG_CMD_I2C +#define CONFIG_CMD_MII +#define CONFIG_CMD_PING +#define CONFIG_CMD_DHCP +#ifdef CONFIG_PCI +#define CONFIG_CMD_PCI +#endif +#ifdef CONFIG_POST +#define CONFIG_CMD_DIAG +#endif + +#if (CONFIG_SYS_TEXT_BASE == 0xFC000000) || (CONFIG_SYS_TEXT_BASE == 0xFF000000) +/* Boot low with 16 or 32 MB Flash */ +#define CONFIG_SYS_LOWBOOT	1 +#elif (CONFIG_SYS_TEXT_BASE != 0x00100000) +#error "CONFIG_SYS_TEXT_BASE value is invalid" +#endif + +/* + * Autobooting + * Be selective on what keys can delay or stop the autoboot process + * To stop use: "++++++++++" + */ +#define CONFIG_AUTOBOOT_KEYED +#define CONFIG_AUTOBOOT_PROMPT	"Autobooting in %d seconds, " \ +				"press password to stop\n", bootdelay +#define CONFIG_AUTOBOOT_STOP_STR	"++++++++++" +#undef CONFIG_AUTOBOOT_DELAY_STR +#define DEBUG_BOOTKEYS		0 + +#define CONFIG_BOOTDELAY	5	/* autoboot after 5 seconds */ + +#define CONFIG_PREBOOT	"run master" + +#undef	CONFIG_BOOTARGS + +#define xstr(s) str(s) +#define str(s)  #s + +#if !defined(CONFIG_CONSOLE_DEV) +#define CONFIG_CONSOLE_DEV	"ttyPSC1" +#endif + +/* + * Default environment for booting old and new kernel versions + */ +#define CONFIG_IFM_DEFAULT_ENV_OLD					\ +	"flash_self_old=run ramargs addip addmem;"			\ +		"bootm ${kernel_addr} ${ramdisk_addr}\0"		\ +	"flash_nfs_old=run nfsargs addip addmem;"			\ +		"bootm ${kernel_addr}\0"				\ +	"net_nfs_old=tftp ${kernel_addr_r} ${bootfile};"		\ +		"run nfsargs addip addmem;"				\ +		"bootm ${kernel_addr_r}\0" + +#define CONFIG_IFM_DEFAULT_ENV_NEW					\ +	"fdt_addr_r=900000\0"						\ +	"fdt_file="CONFIG_BOARD_NAME"/"CONFIG_BOARD_NAME".dtb\0"	\ +	"flash_self=run ramargs addip addtty addmisc;"			\ +		"bootm ${kernel_addr} ${ramdisk_addr} ${fdt_addr}\0"	\ +	"flash_nfs=run nfsargs addip addtty addmisc;"			\ +		"bootm ${kernel_addr} - ${fdt_addr}\0"			\ +	"net_nfs=tftp ${kernel_addr_r} ${bootfile}; "			\ +		"tftp ${fdt_addr_r} ${fdt_file}; "			\ +		"run nfsargs addip addtty addmisc;"			\ +		"bootm ${kernel_addr_r} - ${fdt_addr_r}\0"		\ + +#define	CONFIG_IFM_DEFAULT_ENV_SETTINGS					\ +	"IOpin=0x64\0"							\ +	"addip=setenv bootargs ${bootargs} "				\ +		"ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}"	\ +		":${hostname}:${netdev}:off panic=1\0"			\ +	"addmem=setenv bootargs ${bootargs} ${memlimit}\0"		\ +	"addmisc=sete bootargs ${bootargs} ${miscargs}\0"		\ +	"addtty=sete bootargs ${bootargs} console="			\ +		CONFIG_CONSOLE_DEV ",${baudrate}\0"			\ +	"bootfile="CONFIG_BOARD_NAME"/uImage_"CONFIG_BOARD_NAME"_act\0"	\ +	"kernel_addr_r=600000\0"					\ +	"initrd_high=0x03e00000\0"					\ +	"memlimit=mem="CONFIG_BOARD_MEM_LIMIT"M\0"			\ +	"memtest=mtest 0x00100000 "xstr(CONFIG_SYS_MEMTEST_END)" 0 1\0"	\ +	"netdev=eth0\0"							\ +	"nfsargs=setenv bootargs root=/dev/nfs rw "			\ +		"nfsroot=${serverip}:${rootpath}\0"			\ +	"ramargs=setenv bootargs root=/dev/ram rw\0"			\ +	"linuxname="CONFIG_BOARD_NAME"/uImage_"CONFIG_BOARD_NAME"_act\0"\ +	"progLinux=tftp 200000 ${linuxname};erase ${linbot} ${lintop};" \ +		"cp.b ${fileaddr} ${linbot} ${filesize}\0"		\ +	"ramname="CONFIG_BOARD_NAME"/uRamdisk_"CONFIG_BOARD_NAME"_act\0"\ +	"progRam=tftp 200000 ${ramname};erase ${rambot} ${ramtop};"	\ +		"cp.b ${fileaddr} ${rambot} ${filesize}\0"		\ +	"jffname="CONFIG_BOARD_NAME"/uJFFS2_"CONFIG_BOARD_NAME"_act\0"	\ +	"progJff=tftp 200000 ${jffname};erase ${jffbot} ${jfftop};"	\ +		"cp.b ${fileaddr} ${jffbot} ${filesize}\0"		\ +	"rootpath=/opt/eldk/ppc_6xx\0"					\ +	"uboname=" CONFIG_BOARD_NAME					\ +		"/u-boot.bin_" CONFIG_BOARD_NAME "_act\0"		\ +	"progubo=tftp 200000 ${uboname};"				\ +		"protect off ${ubobot} ${ubotop};"			\ +		"erase ${ubobot} ${ubotop};"				\ +		"cp.b ${fileaddr} ${ubobot} ${filesize}\0"		\ +	"unlock=yes\0"							\ +	"post=echo !!! "CONFIG_BOARD_NAME" POWER ON SELF TEST !!!;"	\ +		"setenv bootdelay 1;"					\ +		"crc32 "xstr(CONFIG_SYS_TEXT_BASE)" "			\ +			BOARD_POST_CRC32_END";"				\ +		"setenv bootcmd "CONFIG_BOARD_BOOTCMD";saveenv;reset\0" + +#define CONFIG_BOOTCOMMAND	"run post" + +/* + * IPB Bus clocking configuration. + */ +#define CONFIG_SYS_IPBCLK_EQUALS_XLBCLK		/* define for 133MHz speed */ + +#if defined(CONFIG_SYS_IPBCLK_EQUALS_XLBCLK) +/* + * PCI Bus clocking configuration + * + * Actually a PCI Clock of 66 MHz is only set (in cpu_init.c) if + * CONFIG_SYS_IPBCLK_EQUALS_XLBCLK is defined. This is because a PCI Clock + * of 66 MHz yet hasn't been tested with a IPB Bus Clock of 66 MHz. + */ +#define CONFIG_SYS_PCICLK_EQUALS_IPBCLK_DIV2	/* define for 66MHz speed */ +#endif + +/* + * I2C configuration + */ +#define CONFIG_HARD_I2C			1	/* I2C with hardware support */ +#define CONFIG_SYS_I2C_MODULE		1	/* Select I2C module #1 or #2 */ +#define CONFIG_SYS_I2C_SPEED		100000	/* 100 kHz */ +#define CONFIG_SYS_I2C_SLAVE		0x7F + +/* + * EEPROM configuration: + * + * O2DNT board is equiped with Ramtron FRAM device FM24CL16 + * 16 Kib Ferroelectric Nonvolatile serial RAM memory + * organized as 2048 x 8 bits and addressable as eight I2C devices + * 0x50 ... 0x57 each 256 bytes in size + * + */ +#define CONFIG_SYS_I2C_FRAM +#define CONFIG_SYS_I2C_EEPROM_ADDR		0x50	/* 1010000x */ +#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN		1 +#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS	3 +/* + * There is no write delay with FRAM, write operations are performed at bus + * speed. Thus, no status polling or write delay is needed. + */ + +/* + * Flash configuration + */ +#define CONFIG_SYS_FLASH_CFI		1 +#define CONFIG_FLASH_CFI_DRIVER		1 +#define CONFIG_FLASH_16BIT +#define CONFIG_SYS_FLASH_CFI_WIDTH	FLASH_CFI_16BIT +#define CONFIG_SYS_FLASH_CFI_AMD_RESET +#define CONFIG_SYS_FLASH_EMPTY_INFO + +#define CONFIG_SYS_MAX_FLASH_BANKS	1	/* max num of memory banks */ +#define CONFIG_SYS_FLASH_BANKS_LIST	{ CONFIG_SYS_FLASH_BASE } +#define CONFIG_SYS_FLASH_ERASE_TOUT	240000	/* Erase Timeout (in ms) */ +#define CONFIG_SYS_FLASH_WRITE_TOUT	500	/* Write Timeout (in ms) */ +/* Timeout for Flash Clear Lock Bits (in ms) */ +#define CONFIG_SYS_FLASH_UNLOCK_TOUT	10000 +/* "Real" (hardware) sectors protection */ +#define CONFIG_SYS_FLASH_PROTECTION + +/* + * Environment settings + */ +#define CONFIG_ENV_IS_IN_FLASH	1 +#define CONFIG_ENV_SIZE		0x20000 +#define CONFIG_ENV_SECT_SIZE	0x20000 +#define CONFIG_ENV_OVERWRITE	1 +#define CONFIG_ENV_ADDR		(CONFIG_SYS_FLASH_BASE + 0x00040000) + +/* + * Memory map + */ +#define CONFIG_SYS_MBAR		0xF0000000 +#define CONFIG_SYS_SDRAM_BASE	0x00000000 +#define CONFIG_SYS_DEFAULT_MBAR	0x80000000 + +/* Use SRAM until RAM will be available */ +#define CONFIG_SYS_INIT_RAM_ADDR	MPC5XXX_SRAM +#ifdef CONFIG_POST +/* preserve space for the post_word at end of on-chip SRAM */ +#define CONFIG_SYS_INIT_RAM_END		MPC5XXX_SRAM_POST_SIZE +#else +/* End of used area in DPRAM */ +#define CONFIG_SYS_INIT_RAM_END		MPC5XXX_SRAM_SIZE +#endif + +/* size in bytes reserved for initial data */ +#define CONFIG_SYS_GBL_DATA_SIZE	128 +#define CONFIG_SYS_GBL_DATA_OFFSET	(CONFIG_SYS_INIT_RAM_END - \ +					 CONFIG_SYS_GBL_DATA_SIZE) +#define CONFIG_SYS_INIT_SP_OFFSET	CONFIG_SYS_GBL_DATA_OFFSET + +#define CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_TEXT_BASE +#define CONFIG_SYS_MONITOR_LEN		(192 << 10) /* 192 kB for Monitor */ +#define CONFIG_SYS_MALLOC_LEN		(128 << 10) /* 128 kB for malloc() */ +#define CONFIG_SYS_BOOTMAPSZ		(8 << 20)   /* Initial map for Linux */ + +#if (CONFIG_SYS_MONITOR_BASE < CONFIG_SYS_FLASH_BASE) +#define CONFIG_SYS_RAMBOOT		1 +#endif + +/* + * Ethernet configuration + */ +#define CONFIG_MPC5xxx_FEC +#define CONFIG_MPC5xxx_FEC_MII100 +#define CONFIG_PHY_ADDR			0x00 +#define CONFIG_RESET_PHY_R + +/* + * GPIO configuration + */ +#define CONFIG_SYS_GPIO_DATADIR		0x00000064 /* PSC1_2, PSC2_1,2 output */ +#define CONFIG_SYS_GPIO_OPENDRAIN	0x00000000 /* No open drain */ +#define CONFIG_SYS_GPIO_DATAVALUE	0x00000000 /* PSC1_1 to 1, rest to 0 */ +#define CONFIG_SYS_GPIO_ENABLE		0x00000064 /* PSC1_2, PSC2_1,2 enable */ + +/* + * Miscellaneous configurable options + */ +#define CONFIG_SYS_LONGHELP			/* undef to save memory	    */ +#define CONFIG_SYS_PROMPT		"=> "	/* Monitor Command Prompt   */ +#define CONFIG_CMDLINE_EDITING +#define CONFIG_SYS_HUSH_PARSER + +#if defined(CONFIG_CMD_KGDB) +#define CONFIG_SYS_CBSIZE		1024	/* Console I/O Buffer Size  */ +#else +#define CONFIG_SYS_CBSIZE		256	/* Console I/O Buffer Size  */ +#endif +/* Print Buffer Size */ +#define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE + \ +					 sizeof(CONFIG_SYS_PROMPT) + 16) +/* max number of command args */ +#define CONFIG_SYS_MAXARGS		16 +/* Boot Argument Buffer Size */ +#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE + +/* default load address */ +#define CONFIG_SYS_LOAD_ADDR		0x100000 + +/* decrementer freq: 1 ms ticks */ +#define CONFIG_SYS_HZ			1000 + +/* + * Various low-level settings + */ +#define CONFIG_SYS_HID0_INIT		HID0_ICE | HID0_ICFI +#define CONFIG_SYS_HID0_FINAL		HID0_ICE + +#define CONFIG_SYS_BOOTCS_START		CONFIG_SYS_FLASH_BASE +#define CONFIG_SYS_BOOTCS_SIZE		CONFIG_SYS_FLASH_SIZE +#define CONFIG_SYS_CS0_START		CONFIG_SYS_FLASH_BASE +#define CONFIG_SYS_CS0_SIZE		CONFIG_SYS_FLASH_SIZE + +#define CONFIG_BOARD_EARLY_INIT_R + +#define CONFIG_SYS_CS_BURST		0x00000000 +#define CONFIG_SYS_CS_DEADCYCLE		0x33333333 + +/* + * DT support + */ +#define CONFIG_OF_LIBFDT	1 +#define CONFIG_OF_BOARD_SETUP	1 + +#define OF_CPU			"PowerPC,5200@0" +#define OF_SOC			"soc5200@f0000000" +#define OF_TBCLK		(bd->bi_busfreq / 4) + +#endif /* __O2D_CONFIG_H */ diff --git a/include/configs/o2dnt.h b/include/configs/o2dnt.h deleted file mode 100644 index 22eb0047f..000000000 --- a/include/configs/o2dnt.h +++ /dev/null @@ -1,297 +0,0 @@ -/* - * (C) Copyright 2005 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * 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 __CONFIG_H -#define __CONFIG_H - -/* - * High Level Configuration Options - * (easy to change) - */ -#define CONFIG_MPC5xxx		1	/* This is an MPC5xxx CPU */ -#define CONFIG_MPC5200 -#define CONFIG_O2DNT		1	/* ... on O2DNT board */ - -#define	CONFIG_SYS_TEXT_BASE	0xFF000000	/* boot low for 16 MiB boards */ - -#define CONFIG_SYS_MPC5XXX_CLKIN	33000000 /* ... running at 33.000000MHz */ - -#define CONFIG_HIGH_BATS	1	/* High BATs supported */ - -/* - * Serial console configuration - */ -#define CONFIG_PSC_CONSOLE	5	/* console is on PSC5 */ -#define CONFIG_BAUDRATE		115200	/* ... at 115200 bps */ -#define CONFIG_SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, 115200, 230400 } - -/* - * PCI Mapping: - * 0x40000000 - 0x4fffffff - PCI Memory - * 0x50000000 - 0x50ffffff - PCI IO Space - */ -#define CONFIG_PCI		1 -#define CONFIG_PCI_PNP		1 -/* #define CONFIG_PCI_SCAN_SHOW	1 */ -#define CONFIG_PCIAUTO_SKIP_HOST_BRIDGE	1 - -#define CONFIG_PCI_MEM_BUS	0x40000000 -#define CONFIG_PCI_MEM_PHYS	CONFIG_PCI_MEM_BUS -#define CONFIG_PCI_MEM_SIZE	0x10000000 - -#define CONFIG_PCI_IO_BUS	0x50000000 -#define CONFIG_PCI_IO_PHYS	CONFIG_PCI_IO_BUS -#define CONFIG_PCI_IO_SIZE	0x01000000 - -#define CONFIG_SYS_XLB_PIPELINING	1 - -#define CONFIG_EEPRO100 -#define CONFIG_SYS_RX_ETH_BUFFER	8  /* use 8 rx buffer on eepro100  */ -#define CONFIG_NS8382X		1 - -/* Partitions */ -#define CONFIG_MAC_PARTITION -#define CONFIG_DOS_PARTITION -#define CONFIG_ISO_PARTITION - -#define CONFIG_TIMESTAMP	/* Print image info with timestamp */ - - -/* - * BOOTP options - */ -#define CONFIG_BOOTP_BOOTFILESIZE -#define CONFIG_BOOTP_BOOTPATH -#define CONFIG_BOOTP_GATEWAY -#define CONFIG_BOOTP_HOSTNAME - - -/* - * Command line configuration. - */ -#include <config_cmd_default.h> - -#define CONFIG_CMD_EEPROM -#define CONFIG_CMD_FAT -#define CONFIG_CMD_I2C -#define CONFIG_CMD_NFS -#define CONFIG_CMD_MII -#define CONFIG_CMD_PING -#define CONFIG_CMD_PCI - - -#if (CONFIG_SYS_TEXT_BASE == 0xFF000000)		/* Boot low with 16 MB Flash */ -#   define CONFIG_SYS_LOWBOOT		1 -#else -#   error "CONFIG_SYS_TEXT_BASE must be 0xFF000000" -#endif - -/* - * Autobooting - */ -#define CONFIG_BOOTDELAY	5	/* autoboot after 5 seconds */ - -#define CONFIG_PREBOOT	"echo;"	\ -	"echo Type \\\"run flash_nfs\\\" to mount root filesystem over NFS;" \ -	"echo" - -#undef	CONFIG_BOOTARGS - -#define	CONFIG_EXTRA_ENV_SETTINGS					\ -	"netdev=eth0\0"							\ -	"nfsargs=setenv bootargs root=/dev/nfs rw "			\ -		"nfsroot=${serverip}:${rootpath}\0"			\ -	"ramargs=setenv bootargs root=/dev/ram rw\0"			\ -	"addip=setenv bootargs ${bootargs} "				\ -		"ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}"	\ -		":${hostname}:${netdev}:off panic=1\0"			\ -	"flash_nfs=run nfsargs addip;"					\ -		"bootm ${kernel_addr}\0"				\ -	"flash_self=run ramargs addip;"					\ -		"bootm ${kernel_addr} ${ramdisk_addr}\0"		\ -	"net_nfs=tftp 200000 ${bootfile};run nfsargs addip;bootm\0"	\ -	"rootpath=/opt/eldk/ppc_82xx\0"					\ -	"bootfile=/tftpboot/MPC5200/uImage\0"				\ -	"" - -#define CONFIG_BOOTCOMMAND	"run flash_self" - -/* - * IPB Bus clocking configuration. - */ -#define CONFIG_SYS_IPBCLK_EQUALS_XLBCLK		/* define for 133MHz speed */ - -#if defined(CONFIG_SYS_IPBCLK_EQUALS_XLBCLK) -/* - * PCI Bus clocking configuration - * - * Actually a PCI Clock of 66 MHz is only set (in cpu_init.c) if - * CONFIG_SYS_IPBCLK_EQUALS_XLBCLK is defined. This is because a PCI Clock - *  of 66 MHz yet hasn't been tested with a IPB Bus Clock of 66 MHz. - */ -#define CONFIG_SYS_PCICLK_EQUALS_IPBCLK_DIV2	/* define for 66MHz speed */ -#endif - -/* - * I2C configuration - */ -#define CONFIG_HARD_I2C		1	/* I2C with hardware support */ -#define CONFIG_SYS_I2C_MODULE		1	/* Select I2C module #1 or #2 */ - -#define CONFIG_SYS_I2C_SPEED		100000 /* 100 kHz */ -#define CONFIG_SYS_I2C_SLAVE		0x7F - -/* - * EEPROM configuration: - * - * O2DNT board is equiped with Ramtron FRAM device FM24CL16 - * 16 Kib Ferroelectric Nonvolatile serial RAM memory - * organized as 2048 x 8 bits and addressable as eight I2C devices - * 0x50 ... 0x57 each 256 bytes in size - * - */ -#define CONFIG_SYS_I2C_FRAM -#define CONFIG_SYS_I2C_EEPROM_ADDR		0x50	/* 1010000x */ -#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN		1 -#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS	3 -/* - * There is no write delay with FRAM, write operations are performed at bus - * speed. Thus, no status polling or write delay is needed. - */ -/*#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS	70*/ - - -/* - * Flash configuration - */ -#define CONFIG_SYS_FLASH_BASE		0xFF000000 -#define CONFIG_SYS_FLASH_SIZE		0x01000000 -#define CONFIG_ENV_ADDR		(CONFIG_SYS_FLASH_BASE + 0x00040000) - -#define CONFIG_SYS_MAX_FLASH_BANKS	1	/* max num of memory banks      */ -#define CONFIG_SYS_MAX_FLASH_SECT	128	/* max num of sects on one chip */ - -#define CONFIG_SYS_FLASH_ERASE_TOUT	240000	/* Flash Erase Timeout (in ms)  */ -#define CONFIG_SYS_FLASH_WRITE_TOUT	500	/* Flash Write Timeout (in ms)  */ -#define CONFIG_SYS_FLASH_UNLOCK_TOUT	10000	/* Timeout for Flash Clear Lock Bits (in ms) */ -#define CONFIG_SYS_FLASH_PROTECTION		/* "Real" (hardware) sectors protection */ - -/* - * Environment settings - */ -#define CONFIG_ENV_IS_IN_FLASH	1 -#define CONFIG_ENV_SIZE		0x20000 -#define CONFIG_ENV_SECT_SIZE	0x20000 -#define CONFIG_ENV_OVERWRITE	1 - -/* - * Memory map - */ -#define CONFIG_SYS_MBAR		0xF0000000 -#define CONFIG_SYS_SDRAM_BASE		0x00000000 -#define CONFIG_SYS_DEFAULT_MBAR	0x80000000 - -/* Use SRAM until RAM will be available */ -#define CONFIG_SYS_INIT_RAM_ADDR	MPC5XXX_SRAM -#define CONFIG_SYS_INIT_RAM_SIZE	MPC5XXX_SRAM_SIZE	/* Size of used area in DPRAM */ - - -#define CONFIG_SYS_GBL_DATA_OFFSET	(CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) -#define CONFIG_SYS_INIT_SP_OFFSET	CONFIG_SYS_GBL_DATA_OFFSET - -#define CONFIG_SYS_MONITOR_BASE	CONFIG_SYS_TEXT_BASE -#define CONFIG_SYS_MONITOR_LEN		(192 << 10)	/* Reserve 192 kB for Monitor	*/ -#define CONFIG_SYS_MALLOC_LEN		(128 << 10)	/* Reserve 128 kB for malloc()	*/ -#define CONFIG_SYS_BOOTMAPSZ		(8 << 20)	/* Initial Memory map for Linux */ - -/* - * Ethernet configuration - */ -#define CONFIG_MPC5xxx_FEC	1 -#define CONFIG_MPC5xxx_FEC_MII100 -/* - * Define CONFIG_MPC5xxx_FEC_MII10 to force FEC at 10Mb - */ -/* #define CONFIG_MPC5xxx_FEC_MII10 */ -#define CONFIG_PHY_ADDR		0x00 - -/* - * GPIO configuration - */ -/*#define CONFIG_SYS_GPS_PORT_CONFIG	0x10002004 */ -#define CONFIG_SYS_GPS_PORT_CONFIG	0x00002006	/* no CAN */ - -/* - * Miscellaneous configurable options - */ -#define CONFIG_SYS_LONGHELP			/* undef to save memory	    */ -#define CONFIG_SYS_PROMPT		"=> "	/* Monitor Command Prompt   */ - -#if defined(CONFIG_CMD_KGDB) -#define CONFIG_SYS_CBSIZE		1024	/* Console I/O Buffer Size  */ -#else -#define CONFIG_SYS_CBSIZE		256	/* Console I/O Buffer Size  */ -#endif -#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16)	/* Print Buffer Size */ -#define CONFIG_SYS_MAXARGS		16		/* max number of command args	*/ -#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE	/* Boot Argument Buffer Size	*/ - -#define CONFIG_SYS_MEMTEST_START	0x00100000	/* memtest works on */ -#define CONFIG_SYS_MEMTEST_END		0x00f00000	/* 1 ... 15 MB in DRAM	*/ - -#define CONFIG_SYS_LOAD_ADDR		0x100000	/* default load address */ - -#define CONFIG_SYS_HZ			1000	/* decrementer freq: 1 ms ticks */ - -#define CONFIG_SYS_CACHELINE_SIZE	32	/* For MPC5xxx CPUs */ -#if defined(CONFIG_CMD_KGDB) -#  define CONFIG_SYS_CACHELINE_SHIFT	5	/* log base 2 of the above value */ -#endif - -/* - * Various low-level settings - */ -#define CONFIG_SYS_HID0_INIT		HID0_ICE | HID0_ICFI -#define CONFIG_SYS_HID0_FINAL		HID0_ICE - -#define CONFIG_SYS_BOOTCS_START	CONFIG_SYS_FLASH_BASE -#define CONFIG_SYS_BOOTCS_SIZE		CONFIG_SYS_FLASH_SIZE - -#ifdef CONFIG_SYS_PCICLK_EQUALS_IPBCLK_DIV2 -/* - * For 66 MHz PCI clock additional Wait State is needed for CS0 (flash). - */ -#define CONFIG_SYS_BOOTCS_CFG		0x00057801 /* for pci_clk = 66 MHz */ -#else -#define CONFIG_SYS_BOOTCS_CFG		0x00047801 /* for pci_clk = 33 MHz */ -#endif - -#define CONFIG_SYS_CS0_START		CONFIG_SYS_FLASH_BASE -#define CONFIG_SYS_CS0_SIZE		CONFIG_SYS_FLASH_SIZE - -#define CONFIG_SYS_CS_BURST		0x00000000 -#define CONFIG_SYS_CS_DEADCYCLE	0x33333333 - -#define CONFIG_SYS_RESET_ADDRESS	0xff000000 - -#endif /* __CONFIG_H */ diff --git a/include/configs/o2dnt2.h b/include/configs/o2dnt2.h new file mode 100644 index 000000000..c766acf2f --- /dev/null +++ b/include/configs/o2dnt2.h @@ -0,0 +1,72 @@ +/* + * (C) Copyright 2012 + * DENX Software Engineering, Anatolij Gustschin <agust@denx.de> + * + * 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. + */ + +/* + * Valid values for CONFIG_SYS_TEXT_BASE are: + * 0xFC000000   boot low boot high (standard configuration) + * 0x00100000   boot from RAM (for testing only) + */ +#ifndef CONFIG_SYS_TEXT_BASE +#define CONFIG_SYS_TEXT_BASE	0xfc000000	/* Standard: boot low */ +#endif + +/* Board specific flash config */ +#define CONFIG_SYS_FLASH_BASE		0xfc000000 +#define CONFIG_SYS_FLASH_SIZE		0x04000000      /* maximum 64MB */ +/* max number of sectors on one chip */ +#define CONFIG_SYS_MAX_FLASH_SECT	512 + +/* + * Include common defines for all ifm boards + */ +#include "o2dnt-common.h" + +/* additional commands */ +#define CONFIG_CMD_ITEST + +/* + * GPIO configuration: + * CS1 SDRAM activate + no CAN + no PCI + */ +#define CONFIG_SYS_GPS_PORT_CONFIG	0x8000A004 + +/* Other board specific configs */ +#define CONFIG_SYS_BOOTCS_CFG		0x00057d01 +#define CONFIG_SYS_RESET_ADDRESS	0xfc000000 + +#define CONFIG_SYS_MEMTEST_START	0x00100000      /* memtest works on */ +#define CONFIG_SYS_MEMTEST_END		0x07f00000	/* 1 - 127 MB in DRAM */ + +#define CONFIG_BOARD_NAME		"o2dnt2" +#define CONFIG_BOARD_BOOTCMD		"run flash_self" +#define CONFIG_BOARD_MEM_LIMIT		xstr(126) +#define BOARD_POST_CRC32_END		xstr(0x01000000) + +#define CONFIG_EXTRA_ENV_SETTINGS					\ +	CONFIG_IFM_DEFAULT_ENV_SETTINGS					\ +	CONFIG_IFM_DEFAULT_ENV_OLD					\ +	CONFIG_IFM_DEFAULT_ENV_NEW					\ +	"linbot=fc060000\0"						\ +	"lintop=fc15ffff\0"						\ +	"rambot=fc160000\0"						\ +	"ramtop=fc55ffff\0"						\ +	"jffbot=fc560000\0"						\ +	"jfftop=fce5ffff\0"						\ +	"ubobot=" xstr(CONFIG_SYS_FLASH_BASE) "\0"			\ +	"ubotop=fc03ffff\0"						\ +	"calname="CONFIG_BOARD_NAME"/uCal_"CONFIG_BOARD_NAME"_act\0"	\ +	"calbot=fce60000\0"						\ +	"caltop=fcffffff\0"						\ +	"progCal=tftp 200000 ${calname};erase ${calbot} ${caltop};"	\ +		"cp.b ${fileaddr} ${calbot} ${filesize}\0"		\ +	"kernel_addr=0xfc060000\0"					\ +	"ramdisk_addr=0xfc160000\0"					\ +	"master=mw f0000b00 0x8005A006;mw f0000b0c ${IOpin};"		\ +		"mw f0000b04 ${IOpin};mw f0000b10 0x20\0" diff --git a/include/configs/o2i.h b/include/configs/o2i.h new file mode 100644 index 000000000..759478679 --- /dev/null +++ b/include/configs/o2i.h @@ -0,0 +1,69 @@ +/* + * (C) Copyright 2012 + * DENX Software Engineering, Anatolij Gustschin <agust@denx.de> + * + * 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. + */ + +/* + * Valid values for CONFIG_SYS_TEXT_BASE are: + * 0xFF000000   boot low boot high (standard configuration) + * 0x00100000   boot from RAM (for testing only) + */ +#ifndef CONFIG_SYS_TEXT_BASE +#define CONFIG_SYS_TEXT_BASE	0xff000000	/* Standard: boot low */ +#endif + +/* Board specific flash config */ +#define CONFIG_SYS_FLASH_BASE		0xff000000 +#define CONFIG_SYS_FLASH_SIZE		0x01000000      /* maximum 16MB */ +/* max number of sectors on one chip */ +#define CONFIG_SYS_MAX_FLASH_SECT	128 + +/* + * Include common defines for all ifm boards + */ +#include "o2dnt-common.h" + +/* GPIO configuration */ +#define CONFIG_SYS_GPS_PORT_CONFIG	0x00002006	/* no CAN */ + +/* Other board specific configs */ +#define CONFIG_SYS_BOOTCS_CFG		0x00087801 +#define CONFIG_SYS_RESET_ADDRESS	0xff000000 + +#define CONFIG_SYS_MEMTEST_START	0x00100000      /* memtest works on */ +#define CONFIG_SYS_MEMTEST_END		0x03f00000	/* 1 - 63 MB in DRAM  */ + +#define CONFIG_BOARD_NAME		"o2i" +#define CONFIG_BOARD_BOOTCMD		"run dhcp_boot" +#define CONFIG_BOARD_MEM_LIMIT		xstr(62) +#define BOARD_POST_CRC32_END		xstr(0x01000000) + +#define CONFIG_EXTRA_ENV_SETTINGS					\ +	CONFIG_IFM_DEFAULT_ENV_SETTINGS					\ +	CONFIG_IFM_DEFAULT_ENV_OLD					\ +	CONFIG_IFM_DEFAULT_ENV_NEW					\ +	"linbot=ff060000\0"						\ +	"lintop=ff15ffff\0"						\ +	"rambot=ff160000\0"						\ +	"ramtop=ff55ffff\0"						\ +	"jffbot=ff560000\0"						\ +	"jfftop=ffebffff\0"						\ +	"kernel_addr=0xff060000\0"					\ +	"ramdisk_addr=0xff160000\0"					\ +	"ubobot=" xstr(CONFIG_SYS_FLASH_BASE) "\0"			\ +	"ubotop=ff03ffff\0"						\ +	"autoload=no\0"							\ +	"dhcp_boot=run dhcpcmd; run flash_mtd\0"			\ +	"hostname=IFM_SENSOR\0"						\ +	"flash_mtd=run mtd_args addip addmem;bootm ${kernel_addr}\0"	\ +	"mtd_args=setenv bootargs root=/dev/mtdblock3 "			\ +		"rw rootfstype=cramfs\0"				\ +	"sensorType=O2I100AA\0"						\ +	"netretry=once\0"						\ +	"master=mw f0000b00 0x00052006;mw f0000b0c ${IOpin};"		\ +		"mw f0000b04 ${IOpin};mw f0000b10 0x20\0" diff --git a/include/configs/o2mnt.h b/include/configs/o2mnt.h new file mode 100644 index 000000000..0c319b1c5 --- /dev/null +++ b/include/configs/o2mnt.h @@ -0,0 +1,77 @@ +/* + * (C) Copyright 2012 + * DENX Software Engineering, Anatolij Gustschin <agust@denx.de> + * + * 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. + */ + +/* + * Valid values for CONFIG_SYS_TEXT_BASE are: + * 0xFF000000   boot low boot high (standard configuration) + * 0x00100000   boot from RAM (for testing only) + */ +#ifndef CONFIG_SYS_TEXT_BASE +#define CONFIG_SYS_TEXT_BASE	0xff000000	/* Standard: boot low */ +#endif + +/* Board specific flash config */ +#define CONFIG_SYS_FLASH_BASE		0xff000000 +#define CONFIG_SYS_FLASH_SIZE		0x01000000      /* maximum 16MB */ +/* max number of sectors on one chip */ +#define CONFIG_SYS_MAX_FLASH_SECT	128 + +/* + * Include common defines for all ifm boards + */ +#include "o2dnt-common.h" + +/* GPIO configuration */ +#define CONFIG_SYS_GPS_PORT_CONFIG	0x00002004	/* no CAN */ + +/* Other board specific configs */ +#define CONFIG_NETCONSOLE + +#define CONFIG_SYS_BOOTCS_CFG		0x00087801 +#define CONFIG_SYS_RESET_ADDRESS	0xff000000 + +#define CONFIG_SYS_MEMTEST_START	0x00100000      /* memtest works on */ +#define CONFIG_SYS_MEMTEST_END		0x03f00000	/* 1 - 63 MB in DRAM  */ + +#define CONFIG_BOARD_NAME		"o2mnt" +#define CONFIG_BOARD_BOOTCMD		"${newcmd}" +#define CONFIG_BOARD_MEM_LIMIT		xstr(62) +#define BOARD_POST_CRC32_END		xstr(0x01000000) + +#ifndef CONFIG_IFM_SENSOR_TYPE +#define CONFIG_IFM_SENSOR_TYPE		"O2M110" +#endif + +#define CONFIG_EXTRA_ENV_SETTINGS					\ +	CONFIG_IFM_DEFAULT_ENV_SETTINGS					\ +	CONFIG_IFM_DEFAULT_ENV_OLD					\ +	CONFIG_IFM_DEFAULT_ENV_NEW					\ +	"linbot=ff060000\0"						\ +	"lintop=ff25ffff\0"						\ +	"rambot=ff260000\0"						\ +	"ramtop=ffc5ffff\0"						\ +	"jffbot=ffc60000\0"						\ +	"jfftop=ffffffff\0"						\ +	"ubobot=" xstr(CONFIG_SYS_FLASH_BASE) "\0"			\ +	"ubotop=ff03ffff\0"						\ +	"kernel_addr=0xff060000\0"					\ +	"ramdisk_addr=0xff260000\0"					\ +	"newcmd=run scrprot;run flash_ext2\0"				\ +	"scrprot=protect on ${linbot} ${lintop};protect on ${rambot} "	\ +		"${ramtop}\0"						\ +	"flash_ext2=run ext2args addip addmem;bootm ${kernel_addr}\0"	\ +	"ext2args=setenv bootargs root=/dev/mtdblock3 ro "		\ +		"rootfstype=ext2\0"					\ +	"pwm=mw f0000674 0x10006;mw f0000678 0x30000;"			\ +		"mw f0000678 0x30001;mw f0000670 0x3\0"			\ +	"master=mw f0000b00 0x00052006;mw f0000b0c $(IOpin);"		\ +		"mw f0000b04 $(IOpin);mw f0000b10 0x24;run pwm\0"	\ +	"sensortyp="CONFIG_IFM_SENSOR_TYPE"\0"				\ +	"srelease=0.00\0" diff --git a/include/configs/o3dnt.h b/include/configs/o3dnt.h new file mode 100644 index 000000000..180d78ee8 --- /dev/null +++ b/include/configs/o3dnt.h @@ -0,0 +1,73 @@ +/* + * (C) Copyright 2012 + * DENX Software Engineering, Anatolij Gustschin <agust@denx.de> + * + * 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. + */ + +/* + * Valid values for CONFIG_SYS_TEXT_BASE are: + * 0xFC000000   boot low boot high (standard configuration) + * 0x00100000   boot from RAM (for testing only) + */ +#ifndef CONFIG_SYS_TEXT_BASE +#define CONFIG_SYS_TEXT_BASE	0xfc000000	/* Standard: boot low */ +#endif + +/* Board specific flash config */ +#define CONFIG_SYS_FLASH_BASE		0xfc000000 +#define CONFIG_SYS_FLASH_SIZE		0x04000000      /* maximum 64MB */ +/* max number of sectors on one chip */ +#define CONFIG_SYS_MAX_FLASH_SECT	512 + +/* + * Include common defines for all ifm boards + */ +#include "o2dnt-common.h" + +/* Additional commands */ +#define CONFIG_CMD_BSP +#define CONFIG_CMD_REGINFO + +/* + * GPIO configuration: + * no CAN + no PCI + */ +#define CONFIG_SYS_GPS_PORT_CONFIG	0x0000A000 + +/* Other board specific configs */ +#define CONFIG_SYS_BOOTCS_CFG		0x00057d01 +#define CONFIG_SYS_RESET_ADDRESS	0xfc000000 + +#define CONFIG_SYS_MEMTEST_START	0x00100000      /* memtest works on */ +#define CONFIG_SYS_MEMTEST_END		0x03f00000	/* 1 - 63 MB in DRAM */ + +#define CONFIG_BOARD_NAME		"o3dnt" +#define CONFIG_BOARD_BOOTCMD		"run flash_self" +#define CONFIG_BOARD_MEM_LIMIT		xstr(62) +#define BOARD_POST_CRC32_END		xstr(0x01000000) + +#define CONFIG_EXTRA_ENV_SETTINGS					\ +	CONFIG_IFM_DEFAULT_ENV_SETTINGS					\ +	CONFIG_IFM_DEFAULT_ENV_OLD					\ +	CONFIG_IFM_DEFAULT_ENV_NEW					\ +	"linbot=fc060000\0"						\ +	"lintop=fc15ffff\0"						\ +	"rambot=fc160000\0"						\ +	"ramtop=fc55ffff\0"						\ +	"jffbot=fc560000\0"						\ +	"jfftop=fce5ffff\0"						\ +	"ubobot=" xstr(CONFIG_SYS_FLASH_BASE) "\0"			\ +	"ubotop=fc03ffff\0"						\ +	"calname="CONFIG_BOARD_NAME"/uCal_"CONFIG_BOARD_NAME"_act\0"	\ +	"calbot=fce60000\0"						\ +	"caltop=fcffffff\0"						\ +	"progCal=tftp 200000 ${calname};erase ${calbot} ${caltop};"	\ +		"cp.b ${fileaddr} ${calbot} ${filesize}\0"		\ +	"kernel_addr=0xfc060000\0"					\ +	"ramdisk_addr=0xfc160000\0"					\ +	"master=mw f0000b00 0x0005A006;mw f0000b0c ${IOpin};"		\ +		"mw f0000b04 ${IOpin};mw f0000b10 0x20\0" diff --git a/include/configs/omap1510inn.h b/include/configs/omap1510inn.h index f591a86ab..7a7fa227c 100644 --- a/include/configs/omap1510inn.h +++ b/include/configs/omap1510inn.h @@ -38,8 +38,6 @@  /* input clock of PLL */  #define CONFIG_SYS_CLK_FREQ	12000000	/* the OMAP1510 Innovator has 12MHz input clock */ -#undef CONFIG_USE_IRQ			/* we don't need IRQ/FIQ stuff */ -  #define CONFIG_MISC_INIT_R  #define CONFIG_CMDLINE_TAG	 1	/* enable passing of ATAGs	*/ @@ -137,17 +135,6 @@  #define CONFIG_SYS_HZ		1000  /*----------------------------------------------------------------------- - * Stack sizes - * - * The stack sizes are set up in start.S using the settings below - */ -#define CONFIG_STACKSIZE	(128*1024)	/* regular stack */ -#ifdef CONFIG_USE_IRQ -#define CONFIG_STACKSIZE_IRQ	(4*1024)	/* IRQ stack */ -#define CONFIG_STACKSIZE_FIQ	(4*1024)	/* FIQ stack */ -#endif - -/*-----------------------------------------------------------------------   * Physical Memory Map   */  #define CONFIG_NR_DRAM_BANKS	1	   /* we have 1 bank of DRAM */ diff --git a/include/configs/omap2420h4.h b/include/configs/omap2420h4.h index 13762ccaf..1abf2590e 100644 --- a/include/configs/omap2420h4.h +++ b/include/configs/omap2420h4.h @@ -61,7 +61,6 @@  /* the OMAP2420 H4 has 12MHz, 13MHz, or 19.2Mhz crystal input */  #define CONFIG_SYS_CLK_FREQ      V_SCLK -#undef CONFIG_USE_IRQ                 /* no support for IRQs */  #define CONFIG_MISC_INIT_R  #define CONFIG_CMDLINE_TAG       1    /* enable passing of ATAGs */ @@ -193,17 +192,6 @@  #define CONFIG_SYS_HZ			((CONFIG_SYS_CLK_FREQ)/(2 << CONFIG_SYS_PTV))  /*----------------------------------------------------------------------- - * Stack sizes - * - * The stack sizes are set up in start.S using the settings below - */ -#define CONFIG_STACKSIZE         SZ_128K /* regular stack */ -#ifdef CONFIG_USE_IRQ -#define CONFIG_STACKSIZE_IRQ     SZ_4K   /* IRQ stack */ -#define CONFIG_STACKSIZE_FIQ     SZ_4K   /* FIQ stack */ -#endif - -/*-----------------------------------------------------------------------   * Physical Memory Map   */  #define CONFIG_NR_DRAM_BANKS     2                 /* CS1 may or may not be populated */ diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h index 657780edc..782a4c598 100644 --- a/include/configs/omap3_beagle.h +++ b/include/configs/omap3_beagle.h @@ -34,6 +34,7 @@  #define CONFIG_OMAP		1	/* in a TI OMAP core */  #define CONFIG_OMAP34XX		1	/* which is a 34XX */  #define CONFIG_OMAP3_BEAGLE	1	/* working with BEAGLE */ +#define CONFIG_OMAP_GPIO  #define CONFIG_SDRC	/* The chip has SDRC controller */ @@ -50,7 +51,6 @@  #define V_OSCK			26000000	/* Clock output from T2 */  #define V_SCLK			(V_OSCK >> 1) -#undef CONFIG_USE_IRQ				/* no support for IRQs */  #define CONFIG_MISC_INIT_R  #define CONFIG_OF_LIBFDT		1 @@ -224,7 +224,7 @@  	"bootfile=uImage.beagle\0" \  	"console=ttyO2,115200n8\0" \  	"mpurate=auto\0" \ -	"buddy=none "\ +	"buddy=none\0" \  	"optargs=\0" \  	"camera=none\0" \  	"vram=12M\0" \ @@ -344,13 +344,6 @@  #define CONFIG_SYS_HZ			1000  /*----------------------------------------------------------------------- - * Stack sizes - * - * The stack sizes are set up in start.S using the settings below - */ -#define CONFIG_STACKSIZE	(128 << 10)	/* regular stack 128 KiB */ - -/*-----------------------------------------------------------------------   * Physical Memory Map   */  #define CONFIG_NR_DRAM_BANKS	2	/* CS1 may or may not be populated */ @@ -420,6 +413,7 @@  #define CONFIG_SPL_FAT_SUPPORT  #define CONFIG_SPL_SERIAL_SUPPORT  #define CONFIG_SPL_NAND_SUPPORT +#define CONFIG_SPL_GPIO_SUPPORT  #define CONFIG_SPL_POWER_SUPPORT  #define CONFIG_SPL_OMAP3_ID_NAND  #define CONFIG_SPL_LDSCRIPT		"$(CPUDIR)/omap-common/u-boot-spl.lds" diff --git a/include/configs/omap3_evm_common.h b/include/configs/omap3_evm_common.h index 20192a90a..d9578f47b 100644 --- a/include/configs/omap3_evm_common.h +++ b/include/configs/omap3_evm_common.h @@ -22,14 +22,13 @@   */  #define CONFIG_OMAP			/* This is TI OMAP core */  #define CONFIG_OMAP34XX			/* belonging to 34XX family */ +#define CONFIG_OMAP_GPIO  #define CONFIG_SDRC			/* The chip has SDRC controller */  #define CONFIG_OMAP3_EVM		/* This is a OMAP3 EVM */  #define CONFIG_TWL4030_POWER		/* with TWL4030 PMIC */ -#undef CONFIG_USE_IRQ			/* no support for IRQs */ -  /*   * Clock related definitions   */ @@ -52,12 +51,6 @@  #define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + (128 << 10))  /* - * Stack sizes - * These values are used in start.S - */ -#define CONFIG_STACKSIZE	(128 << 10)	/* regular stack 128 KiB */ - -/*   * Physical Memory Map   * Note 1: CS1 may or may not be populated   * Note 2: SDRAM size is expected to be at least 32MB diff --git a/include/configs/omap3_logic.h b/include/configs/omap3_logic.h index 2e1e6b901..b975a6c9a 100644 --- a/include/configs/omap3_logic.h +++ b/include/configs/omap3_logic.h @@ -33,8 +33,7 @@  #define CONFIG_OMAP			/* in a TI OMAP core */  #define CONFIG_OMAP34XX			/* which is a 34XX */  #define CONFIG_OMAP3_LOGIC		/* working with Logic OMAP boards */ - -#undef CONFIG_USE_IRQ			/* no support for IRQs */ +#define CONFIG_OMAP_GPIO  #define CONFIG_SYS_TEXT_BASE	0x80400000 @@ -286,13 +285,6 @@  #define CONFIG_SYS_HZ			1000  /* - * Stack sizes - * - * The stack sizes are set up in start.S using the settings below - */ -#define CONFIG_STACKSIZE	(128 << 10)	/* regular stack 128 KiB */ - -/*   * Physical Memory Map   */  #define CONFIG_NR_DRAM_BANKS	2	/* CS1 may or may not be populated */ diff --git a/include/configs/omap3_mvblx.h b/include/configs/omap3_mvblx.h index 6a1304681..67af31465 100644 --- a/include/configs/omap3_mvblx.h +++ b/include/configs/omap3_mvblx.h @@ -39,6 +39,7 @@  #define CONFIG_OMAP34XX		1	/* which is a 34XX */  #define CONFIG_MVBLX		1	/* working with mvBlueLYNX-X */  #define CONFIG_MACH_TYPE	MACH_TYPE_MVBLX +#define CONFIG_OMAP_GPIO  #define CONFIG_SDRC	/* The chip has SDRC controller */ @@ -55,7 +56,6 @@  #define V_OSCK			26000000	/* Clock output from T2 */  #define V_SCLK			(V_OSCK >> 1) -#undef CONFIG_USE_IRQ				/* no support for IRQs */  #define CONFIG_MISC_INIT_R  #define CONFIG_OF_LIBFDT		1 @@ -247,13 +247,6 @@  #define CONFIG_SYS_HZ			1000  /*----------------------------------------------------------------------- - * Stack sizes - * - * The stack sizes are set up in start.S using the settings below - */ -#define CONFIG_STACKSIZE	(128 << 10)	/* regular stack 128 KiB */ - -/*-----------------------------------------------------------------------   * Physical Memory Map   */  #define CONFIG_NR_DRAM_BANKS	1 diff --git a/include/configs/omap3_overo.h b/include/configs/omap3_overo.h index d29b3266c..dd4b2c0e8 100644 --- a/include/configs/omap3_overo.h +++ b/include/configs/omap3_overo.h @@ -25,6 +25,7 @@  #define CONFIG_OMAP				/* in a TI OMAP core */  #define CONFIG_OMAP34XX				/* which is a 34XX */  #define CONFIG_OMAP3_OVERO			/* working with overo */ +#define CONFIG_OMAP_GPIO  #define CONFIG_SDRC				/* The chip has SDRC controller */ @@ -41,7 +42,6 @@  #define V_OSCK			26000000	/* Clock output from T2 */  #define V_SCLK			(V_OSCK >> 1) -#undef CONFIG_USE_IRQ				/* no support for IRQs */  #define CONFIG_MISC_INIT_R  #define CONFIG_CMDLINE_TAG			/* enable passing of ATAGs */ @@ -231,13 +231,6 @@  #define CONFIG_SYS_HZ			1000  /*----------------------------------------------------------------------- - * Stack sizes - * - * The stack sizes are set up in start.S using the settings below - */ -#define CONFIG_STACKSIZE	(128 << 10)	/* regular stack 128 KiB */ - -/*-----------------------------------------------------------------------   * Physical Memory Map   */  #define CONFIG_NR_DRAM_BANKS	2	/* CS1 may or may not be populated */ @@ -325,6 +318,7 @@  #define CONFIG_SPL_FAT_SUPPORT  #define CONFIG_SPL_SERIAL_SUPPORT  #define CONFIG_SPL_NAND_SUPPORT +#define CONFIG_SPL_GPIO_SUPPORT  #define CONFIG_SPL_POWER_SUPPORT  #define CONFIG_SPL_LDSCRIPT		"$(CPUDIR)/omap-common/u-boot-spl.lds" diff --git a/include/configs/omap3_pandora.h b/include/configs/omap3_pandora.h index 604b53d3c..8a8a5d1cc 100644 --- a/include/configs/omap3_pandora.h +++ b/include/configs/omap3_pandora.h @@ -29,6 +29,7 @@  #define CONFIG_OMAP		1	/* in a TI OMAP core */  #define CONFIG_OMAP34XX		1	/* which is a 34XX */  #define CONFIG_OMAP3_PANDORA	1	/* working with pandora */ +#define CONFIG_OMAP_GPIO  #define CONFIG_SDRC	/* The chip has SDRC controller */ @@ -45,7 +46,6 @@  #define V_OSCK			26000000	/* Clock output from T2 */  #define V_SCLK			(V_OSCK >> 1) -#undef CONFIG_USE_IRQ		/* no support for IRQs */  #define CONFIG_MISC_INIT_R  #define CONFIG_CMDLINE_TAG		1	/* enable passing of ATAGs */ @@ -217,13 +217,6 @@  #define CONFIG_SYS_HZ			1000  /*----------------------------------------------------------------------- - * Stack sizes - * - * The stack sizes are set up in start.S using the settings below - */ -#define CONFIG_STACKSIZE	(128 << 10)	/* regular stack 128 KiB */ - -/*-----------------------------------------------------------------------   * Physical Memory Map   */  #define CONFIG_NR_DRAM_BANKS	2	/* CS1 may or may not be populated */ diff --git a/include/configs/omap3_sdp3430.h b/include/configs/omap3_sdp3430.h index 1d8b0abf3..2a890c9c7 100644 --- a/include/configs/omap3_sdp3430.h +++ b/include/configs/omap3_sdp3430.h @@ -61,7 +61,6 @@  #define V_OSCK			26000000	/* Clock output from T2 */  #define V_SCLK			(V_OSCK >> 1) -#undef CONFIG_USE_IRQ			/* no support for IRQs */  #define CONFIG_MISC_INIT_R  #define CONFIG_CMDLINE_TAG		1	/* enable passing of ATAGs */ @@ -293,13 +292,6 @@  #define CONFIG_SYS_PTV			2	/* Divisor: 2^(PTV+1) => 8 */  #define CONFIG_SYS_HZ			1000 -/* - * Stack sizes - * - * The stack sizes are set up in start.S using the settings below - */ -#define CONFIG_STACKSIZE	(128 << 10) /* Regular stack */ -  #define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM_1  #define CONFIG_SYS_INIT_RAM_ADDR	0x4020f800  #define CONFIG_SYS_INIT_RAM_SIZE	0x800 diff --git a/include/configs/omap3_zoom1.h b/include/configs/omap3_zoom1.h index 0f72ebe8e..891e6f436 100644 --- a/include/configs/omap3_zoom1.h +++ b/include/configs/omap3_zoom1.h @@ -51,7 +51,6 @@  #define V_OSCK			26000000	/* Clock output from T2 */  #define V_SCLK			(V_OSCK >> 1) -#undef CONFIG_USE_IRQ				/* no support for IRQs */  #define CONFIG_MISC_INIT_R  #define CONFIG_CMDLINE_TAG		1	/* enable passing of ATAGs */ @@ -249,13 +248,6 @@  #define CONFIG_SYS_HZ			1000  /*----------------------------------------------------------------------- - * Stack sizes - * - * The stack sizes are set up in start.S using the settings below - */ -#define CONFIG_STACKSIZE	(128 << 10)	/* regular stack 128 KiB */ - -/*-----------------------------------------------------------------------   * Physical Memory Map   */  #define CONFIG_NR_DRAM_BANKS	2	/* CS1 may or may not be populated */ diff --git a/include/configs/omap3_zoom2.h b/include/configs/omap3_zoom2.h index b60ece3c5..4447dff00 100644 --- a/include/configs/omap3_zoom2.h +++ b/include/configs/omap3_zoom2.h @@ -36,6 +36,7 @@  #define CONFIG_OMAP		1	/* in a TI OMAP core */  #define CONFIG_OMAP34XX		1	/* which is a 34XX */  #define CONFIG_OMAP3_ZOOM2	1	/* working with Zoom II */ +#define CONFIG_OMAP_GPIO  #define CONFIG_SDRC	/* The chip has SDRC controller */ @@ -52,7 +53,6 @@  #define V_OSCK			26000000	/* Clock output from T2 */  #define V_SCLK			(V_OSCK >> 1) -#undef CONFIG_USE_IRQ		/* no support for IRQs */  #define CONFIG_MISC_INIT_R  #define CONFIG_CMDLINE_TAG		1	/* enable passing of ATAGs */ @@ -218,13 +218,6 @@  #define CONFIG_SYS_HZ			((V_SCLK) / (2 << CONFIG_SYS_PTV))  /*----------------------------------------------------------------------- - * Stack sizes - * - * The stack sizes are set up in start.S using these settings - */ -#define CONFIG_STACKSIZE	(128 << 10)	/* regular stack 128 KiB */ - -/*-----------------------------------------------------------------------   * Physical Memory Map   */  #define CONFIG_NR_DRAM_BANKS	2	/* CS1 may or may not be populated */ diff --git a/include/configs/omap4_common.h b/include/configs/omap4_common.h index 2192c2b89..ee0c4b9d9 100644 --- a/include/configs/omap4_common.h +++ b/include/configs/omap4_common.h @@ -35,6 +35,7 @@  #define CONFIG_OMAP		1	/* in a TI OMAP core */  #define CONFIG_OMAP44XX		1	/* which is a 44XX */  #define CONFIG_OMAP4430		1	/* which is in a 4430 */ +#define CONFIG_OMAP_GPIO  /* Get CPU defs */  #include <asm/arch/cpu.h> @@ -48,7 +49,6 @@  #define V_OSCK			38400000	/* Clock output from T2 */  #define V_SCLK                   V_OSCK -#undef CONFIG_USE_IRQ				/* no support for IRQs */  #define CONFIG_MISC_INIT_R  #define CONFIG_OF_LIBFDT		1 @@ -206,17 +206,6 @@  #define CONFIG_SYS_HZ			1000  /* - * Stack sizes - * - * The stack sizes are set up in start.S using the settings below - */ -#define CONFIG_STACKSIZE	(128 << 10)	/* Regular stack */ -#ifdef CONFIG_USE_IRQ -#define CONFIG_STACKSIZE_IRQ	(4 << 10)	/* IRQ stack */ -#define CONFIG_STACKSIZE_FIQ	(4 << 10)	/* FIQ stack */ -#endif - -/*   * SDRAM Memory Map   * Even though we use two CS all the memory   * is mapped to one contiguous block @@ -224,10 +213,7 @@  #define CONFIG_NR_DRAM_BANKS	1  #define CONFIG_SYS_SDRAM_BASE		0x80000000 -#define CONFIG_SYS_INIT_RAM_ADDR	0x4030D800 -#define CONFIG_SYS_INIT_RAM_SIZE	0x800 -#define CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_INIT_RAM_ADDR + \ -					 CONFIG_SYS_INIT_RAM_SIZE - \ +#define CONFIG_SYS_INIT_SP_ADDR         (NON_SECURE_SRAM_END - \  					 GENERATED_GBL_DATA_SIZE)  #ifndef CONFIG_SYS_L2CACHE_OFF @@ -248,7 +234,7 @@  #define CONFIG_SPL  #define CONFIG_SPL_TEXT_BASE		0x40304350  #define CONFIG_SPL_MAX_SIZE		(38 * 1024) -#define CONFIG_SPL_STACK		LOW_LEVEL_SRAM_STACK +#define CONFIG_SPL_STACK		CONFIG_SYS_INIT_SP_ADDR  /*   * 64 bytes before this address should be set aside for u-boot.img's @@ -278,6 +264,7 @@  #define CONFIG_SPL_FAT_SUPPORT  #define CONFIG_SPL_LIBGENERIC_SUPPORT  #define CONFIG_SPL_SERIAL_SUPPORT +#define CONFIG_SPL_GPIO_SUPPORT  #define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/omap-common/u-boot-spl.lds"  #define CONFIG_SYS_THUMB_BUILD diff --git a/include/configs/omap5912osk.h b/include/configs/omap5912osk.h index 639d4a377..40ca9bb98 100644 --- a/include/configs/omap5912osk.h +++ b/include/configs/omap5912osk.h @@ -42,8 +42,6 @@  /* the OMAP5912 OSK has 12MHz input clock */  #define CONFIG_SYS_CLK_FREQ	12000000 -#undef CONFIG_USE_IRQ	/* we don't need IRQ/FIQ stuff */ -  #define CONFIG_CMDLINE_TAG	1	/* enable passing of ATAGs  */  #define CONFIG_SETUP_MEMORY_TAGS	1  #define CONFIG_INITRD_TAG      1       /* Required for ramdisk support */ @@ -139,17 +137,6 @@  #define CONFIG_SYS_HZ		((CONFIG_SYS_CLK_FREQ)/(2 << CONFIG_SYS_PTV))  /*----------------------------------------------------------------------- - * Stack sizes - * - * The stack sizes are set up in start.S using the settings below - */ -#define CONFIG_STACKSIZE	(128*1024)	/* regular stack */ -#ifdef CONFIG_USE_IRQ -#define CONFIG_STACKSIZE_IRQ	(4*1024)	/* IRQ stack */ -#define CONFIG_STACKSIZE_FIQ	(4*1024)	/* FIQ stack */ -#endif - -/*-----------------------------------------------------------------------   * Physical Memory Map   */  #define CONFIG_NR_DRAM_BANKS	1	/* we have 1 bank of DRAM */ diff --git a/include/configs/omap5_evm.h b/include/configs/omap5_evm.h index c5874bbf6..4f0a6c135 100644 --- a/include/configs/omap5_evm.h +++ b/include/configs/omap5_evm.h @@ -38,6 +38,7 @@  #define CONFIG_OMAP54XX	/* which is a 54XX */  #define CONFIG_OMAP5430	/* which is in a 5430 */  #define CONFIG_5430EVM	/* working with EVM */ +#define CONFIG_OMAP_GPIO  /* Get CPU defs */  #include <asm/arch/cpu.h> @@ -51,7 +52,6 @@  #define V_OSCK			19200000	/* Clock output from T2 */  #define V_SCLK	V_OSCK -#undef CONFIG_USE_IRQ	/* no support for IRQs */  #define CONFIG_MISC_INIT_R  #define CONFIG_OF_LIBFDT @@ -209,17 +209,6 @@  #define CONFIG_SYS_HZ			1000  /* - * Stack sizes - * - * The stack sizes are set up in start.S using the settings below - */ -#define CONFIG_STACKSIZE	(128 << 10)	/* Regular stack */ -#ifdef CONFIG_USE_IRQ -#define CONFIG_STACKSIZE_IRQ	(4 << 10)	/* IRQ stack */ -#define CONFIG_STACKSIZE_FIQ	(4 << 10)	/* FIQ stack */ -#endif - -/*   * SDRAM Memory Map   * Even though we use two CS all the memory   * is mapped to one contiguous block @@ -227,10 +216,7 @@  #define CONFIG_NR_DRAM_BANKS	1  #define CONFIG_SYS_SDRAM_BASE		0x80000000 -#define CONFIG_SYS_INIT_RAM_ADDR	0x4030D800 -#define CONFIG_SYS_INIT_RAM_SIZE	0x800 -#define CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_INIT_RAM_ADDR + \ -					 CONFIG_SYS_INIT_RAM_SIZE - \ +#define CONFIG_SYS_INIT_SP_ADDR         (NON_SECURE_SRAM_END - \  					 GENERATED_GBL_DATA_SIZE)  #define CONFIG_SYS_EMIF_PRECALCULATED_TIMING_REGS @@ -245,7 +231,7 @@  #define CONFIG_SPL  #define CONFIG_SPL_TEXT_BASE		0x40300350  #define CONFIG_SPL_MAX_SIZE		0x19000	/* 100K */ -#define CONFIG_SPL_STACK		LOW_LEVEL_SRAM_STACK +#define CONFIG_SPL_STACK		CONFIG_SYS_INIT_SP_ADDR  #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR	0x300 /* address 0x60000 */  #define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS	0x200 /* 256 KB */ diff --git a/include/configs/omap730p2.h b/include/configs/omap730p2.h index f1cadb25f..f24b765ee 100644 --- a/include/configs/omap730p2.h +++ b/include/configs/omap730p2.h @@ -47,8 +47,6 @@  #define CONFIG_SYS_CLK_FREQ	   13000000 -#undef CONFIG_USE_IRQ			     /* we don't need IRQ/FIQ stuff */ -  #define CONFIG_CMDLINE_TAG	   1	     /* enable passing of ATAGs	 */  #define CONFIG_SETUP_MEMORY_TAGS   1 @@ -148,18 +146,6 @@  #define CONFIG_SYS_HZ			((CONFIG_SYS_CLK_FREQ)/(2 << CONFIG_SYS_PTV))  /*----------------------------------------------------------------------- - * Stack sizes - * - * The stack sizes are set up in start.S using the settings below - */ - -#define CONFIG_STACKSIZE	   (128*1024)	  /* regular stack */ -#ifdef CONFIG_USE_IRQ -#define CONFIG_STACKSIZE_IRQ	   (4*1024)	  /* IRQ stack */ -#define CONFIG_STACKSIZE_FIQ	   (4*1024)	  /* FIQ stack */ -#endif - -/*-----------------------------------------------------------------------   * Physical Memory Map   */ diff --git a/include/configs/origen.h b/include/configs/origen.h index 172bf1472..1ab983493 100644 --- a/include/configs/origen.h +++ b/include/configs/origen.h @@ -116,9 +116,6 @@  #define CONFIG_SYS_HZ			1000 -/* Stack sizes */ -#define CONFIG_STACKSIZE		(256 << 10)	/* 256KB */ -  /* ORIGEN has 4 bank of DRAM */  #define CONFIG_NR_DRAM_BANKS	4  #define SDRAM_BANK_SIZE		(256UL << 20UL)	/* 256 MB */ @@ -136,11 +133,6 @@  #undef CONFIG_CMD_IMLS  #define CONFIG_IDENT_STRING		" for ORIGEN" -#ifdef CONFIG_USE_IRQ -#define CONFIG_STACKSIZE_IRQ		(4*1024)	/* IRQ stack */ -#define CONFIG_STACKSIZE_FIQ		(4*1024)	/* FIQ stack */ -#endif -  #define CONFIG_CLK_1000_400_200  /* MIU (Memory Interleaving Unit) */ diff --git a/include/configs/otc570.h b/include/configs/otc570.h index 7abc42a4f..fe4f3c0fa 100644 --- a/include/configs/otc570.h +++ b/include/configs/otc570.h @@ -67,7 +67,6 @@  #define CONFIG_REVISION_TAG  #define CONFIG_CMDLINE_TAG			/* enable passing of ATAGs */  #define CONFIG_MISC_INIT_R			/* Call misc_init_r */ -#undef	CONFIG_USE_IRQ				/* don't need IRQ/FIQ stuff */  #define CONFIG_DISPLAY_BOARDINFO		/* call checkboard() */  #define CONFIG_DISPLAY_CPUINFO			/* display cpu info and speed */ @@ -274,10 +273,4 @@  #define CONFIG_SYS_MALLOC_LEN		ROUND(3 * CONFIG_ENV_SIZE + \  					128*1024, 0x1000) -#define CONFIG_STACKSIZE		(32 * 1024)	/* regular stack */ - -#ifdef CONFIG_USE_IRQ -# error CONFIG_USE_IRQ not supported -#endif -  #endif diff --git a/include/configs/palmld.h b/include/configs/palmld.h index 70b794db0..835121ed3 100644 --- a/include/configs/palmld.h +++ b/include/configs/palmld.h @@ -130,15 +130,6 @@  #define	CONFIG_SYS_CPUSPEED		0x210		/* 416MHz ; N=2,L=16 */  /* - * Stack sizes - */ -#define	CONFIG_STACKSIZE		(128*1024)	/* regular stack */ -#ifdef	CONFIG_USE_IRQ -#define	CONFIG_STACKSIZE_IRQ		(4*1024)	/* IRQ stack */ -#define	CONFIG_STACKSIZE_FIQ		(4*1024)	/* FIQ stack */ -#endif - -/*   * DRAM Map   */  #define	CONFIG_NR_DRAM_BANKS		1		/* 1 bank of DRAM */ diff --git a/include/configs/palmtc.h b/include/configs/palmtc.h index 7cf2c63bd..bc88354c4 100644 --- a/include/configs/palmtc.h +++ b/include/configs/palmtc.h @@ -131,15 +131,6 @@  #define	CONFIG_SYS_CPUSPEED		0x161		/* 400MHz;L=1 M=3 T=1 */  /* - * Stack sizes - */ -#define	CONFIG_STACKSIZE		(128*1024)	/* regular stack */ -#ifdef	CONFIG_USE_IRQ -#define	CONFIG_STACKSIZE_IRQ		(4*1024)	/* IRQ stack */ -#define	CONFIG_STACKSIZE_FIQ		(4*1024)	/* FIQ stack */ -#endif - -/*   * DRAM Map   */  #define	CONFIG_NR_DRAM_BANKS		1		/* 1 bank of DRAM */ diff --git a/include/configs/paz00.h b/include/configs/paz00.h index 0dd1e83a5..24cda4839 100644 --- a/include/configs/paz00.h +++ b/include/configs/paz00.h @@ -18,20 +18,20 @@  #define __CONFIG_H  #include <asm/sizes.h> -#include "tegra2-common.h" +#include "tegra20-common.h"  /* Enable fdt support for Paz00. Flash the image in u-boot-dtb.bin */ -#define CONFIG_DEFAULT_DEVICE_TREE	tegra2-paz00 +#define CONFIG_DEFAULT_DEVICE_TREE	tegra20-paz00  #define CONFIG_OF_CONTROL  #define CONFIG_OF_SEPARATE  /* High-level configuration options */ -#define V_PROMPT		"Tegra2 (Paz00) MOD # " -#define CONFIG_TEGRA2_BOARD_STRING	"Compal Paz00" +#define V_PROMPT		"Tegra20 (Paz00) MOD # " +#define CONFIG_TEGRA_BOARD_STRING	"Compal Paz00"  /* Board-specific serial config */  #define CONFIG_SERIAL_MULTI -#define CONFIG_TEGRA2_ENABLE_UARTA +#define CONFIG_TEGRA_ENABLE_UARTA  #define CONFIG_SYS_NS16550_COM1		NV_PA_APB_UARTA_BASE  #define CONFIG_MACH_TYPE		MACH_TYPE_PAZ00 @@ -51,8 +51,9 @@  /* Environment in eMMC, at the end of 2nd "boot sector" */  #define CONFIG_ENV_IS_IN_MMC -#define CONFIG_ENV_OFFSET ((2 * 1024 * 1024) - CONFIG_ENV_SIZE) +#define CONFIG_ENV_OFFSET ((1024 * 1024) - CONFIG_ENV_SIZE)  #define CONFIG_SYS_MMC_ENV_DEV 0 +#define CONFIG_SYS_MMC_ENV_PART 2  /* USB Host support */  #define CONFIG_USB_EHCI @@ -68,6 +69,6 @@  #define CONFIG_CMD_NET  #define CONFIG_CMD_DHCP -#include "tegra2-common-post.h" +#include "tegra-common-post.h"  #endif /* __CONFIG_H */ diff --git a/include/configs/pdnb3.h b/include/configs/pdnb3.h index 19b80d18e..1e073177e 100644 --- a/include/configs/pdnb3.h +++ b/include/configs/pdnb3.h @@ -118,17 +118,6 @@  #define CONFIG_IXP425_TIMER_CLK		66666666  #define CONFIG_SYS_HZ			1000		/* decrementer freq: 1 ms ticks */ -/* - * Stack sizes - * - * The stack sizes are set up in start.S using the settings below - */ -#define CONFIG_STACKSIZE        (128*1024)      /* regular stack */ -#ifdef CONFIG_USE_IRQ -#define CONFIG_STACKSIZE_IRQ    (4*1024)        /* IRQ stack */ -#define CONFIG_STACKSIZE_FIQ    (4*1024)        /* FIQ stack */ -#endif -  /***************************************************************   * Platform/Board specific defines start here.   ***************************************************************/ diff --git a/include/configs/plutux.h b/include/configs/plutux.h index 9870590bd..65b42edc2 100644 --- a/include/configs/plutux.h +++ b/include/configs/plutux.h @@ -26,20 +26,20 @@  #ifndef __CONFIG_H  #define __CONFIG_H -#include "tegra2-common.h" +#include "tegra20-common.h"  /* Enable fdt support for Plutux. Flash the image in u-boot-dtb.bin */ -#define CONFIG_DEFAULT_DEVICE_TREE	tegra2-plutux +#define CONFIG_DEFAULT_DEVICE_TREE	tegra20-plutux  #define CONFIG_OF_CONTROL  #define CONFIG_OF_SEPARATE  /* High-level configuration options */ -#define V_PROMPT			"Tegra2 (Plutux) # " -#define CONFIG_TEGRA2_BOARD_STRING	"Avionic Design Plutux" +#define V_PROMPT			"Tegra20 (Plutux) # " +#define CONFIG_TEGRA_BOARD_STRING	"Avionic Design Plutux"  /* Board-specific serial config */  #define CONFIG_SERIAL_MULTI -#define CONFIG_TEGRA2_ENABLE_UARTD	/* UARTD: debug UART */ +#define CONFIG_TEGRA_ENABLE_UARTD	/* UARTD: debug UART */  #define CONFIG_SYS_NS16550_COM1		NV_PA_APB_UARTD_BASE  #define CONFIG_BOARD_EARLY_INIT_F @@ -78,6 +78,6 @@  	"ext2load mmc 0 0x17000000 /boot/uImage;"	\  	"bootm" -#include "tegra2-common-post.h" +#include "tegra-common-post.h"  #endif /* __CONFIG_H */ diff --git a/include/configs/pm9261.h b/include/configs/pm9261.h index cdb3593c4..ecc72b72d 100644 --- a/include/configs/pm9261.h +++ b/include/configs/pm9261.h @@ -49,7 +49,6 @@  #define CONFIG_SYS_AT91_CPU_NAME	"AT91SAM9261"  #define CONFIG_PM9261		1	/* on a Ronetix PM9261 Board	*/  #define CONFIG_ARCH_CPU_INIT -#undef CONFIG_USE_IRQ			/* we don't need IRQ/FIQ stuff	*/  #define CONFIG_SYS_TEXT_BASE	0  #define MACH_TYPE_PM9261	1187 @@ -380,10 +379,4 @@  #define CONFIG_SYS_INIT_SP_ADDR	(CONFIG_SYS_SDRAM_BASE + 0x1000 - \  				GENERATED_GBL_DATA_SIZE) -#define CONFIG_STACKSIZE		(32 * 1024)	/* regular stack */ - -#ifdef CONFIG_USE_IRQ -#error CONFIG_USE_IRQ not supported -#endif -  #endif diff --git a/include/configs/pm9263.h b/include/configs/pm9263.h index d202d0ad2..b60a9ade1 100644 --- a/include/configs/pm9263.h +++ b/include/configs/pm9263.h @@ -49,7 +49,6 @@  #define CONFIG_SYS_AT91_CPU_NAME	"AT91SAM9263"  #define CONFIG_PM9263		1	/* on a Ronetix PM9263 Board	*/  #define CONFIG_ARCH_CPU_INIT -#undef CONFIG_USE_IRQ			/* we don't need IRQ/FIQ stuff	*/  #define CONFIG_SYS_TEXT_BASE	0  #define MACH_TYPE_PM9263	1475 @@ -412,10 +411,4 @@  #define CONFIG_SYS_INIT_SP_ADDR	(CONFIG_SYS_SDRAM_BASE + 0x1000 - \  				GENERATED_GBL_DATA_SIZE) -#define CONFIG_STACKSIZE		(32 * 1024)	/* regular stack */ - -#ifdef CONFIG_USE_IRQ -#error CONFIG_USE_IRQ not supported -#endif -  #endif diff --git a/include/configs/pm9g45.h b/include/configs/pm9g45.h index c766330bb..460933f79 100644 --- a/include/configs/pm9g45.h +++ b/include/configs/pm9g45.h @@ -188,10 +188,4 @@  #define CONFIG_SYS_INIT_SP_ADDR	(CONFIG_SYS_SDRAM_BASE + 0x1000 - \  				GENERATED_GBL_DATA_SIZE) -#define CONFIG_STACKSIZE		(32*1024)	/* regular stack */ - -#ifdef CONFIG_USE_IRQ -#error CONFIG_USE_IRQ not supported -#endif -  #endif diff --git a/include/configs/pxa255_idp.h b/include/configs/pxa255_idp.h index f143ed003..ce9e7d115 100644 --- a/include/configs/pxa255_idp.h +++ b/include/configs/pxa255_idp.h @@ -66,8 +66,6 @@  #define CONFIG_DOS_PARTITION	1  #define CONFIG_BOARD_LATE_INIT -#undef CONFIG_USE_IRQ			/* we don't need IRQ/FIQ stuff */ -  /* we will never enable dcache, because we have to setup MMU first */  #define CONFIG_SYS_DCACHE_OFF @@ -252,17 +250,6 @@  #endif  /* - * Stack sizes - * - * The stack sizes are set up in start.S using the settings below - */ -#define CONFIG_STACKSIZE	(128*1024)	/* regular stack */ -#ifdef CONFIG_USE_IRQ -#define CONFIG_STACKSIZE_IRQ	(4*1024)	/* IRQ stack */ -#define CONFIG_STACKSIZE_FIQ	(4*1024)	/* FIQ stack */ -#endif - -/*   * Physical Memory Map   */  #define CONFIG_NR_DRAM_BANKS	1	   /* we have 1 bank of DRAM */ diff --git a/include/configs/qemu-mips.h b/include/configs/qemu-mips.h index 306c17336..b8b970504 100644 --- a/include/configs/qemu-mips.h +++ b/include/configs/qemu-mips.h @@ -100,7 +100,12 @@   */  #define CONFIG_SYS_LONGHELP				/* undef to save memory */ -#define CONFIG_SYS_PROMPT		"qemu-mips # "	/* Monitor Command Prompt */ +/* Monitor Command Prompt */ +#if defined(CONFIG_SYS_LITTLE_ENDIAN) +#define CONFIG_SYS_PROMPT		"qemu-mipsel # " +#else +#define CONFIG_SYS_PROMPT		"qemu-mips # " +#endif  #define CONFIG_AUTO_COMPLETE  #define CONFIG_CMDLINE_EDITING diff --git a/include/configs/qi_lb60.h b/include/configs/qi_lb60.h index a3fc465e7..4bb5bbc69 100644 --- a/include/configs/qi_lb60.h +++ b/include/configs/qi_lb60.h @@ -11,6 +11,7 @@  #define __CONFIG_QI_LB60_H  #define CONFIG_MIPS32		/* MIPS32 CPU core */ +#define CONFIG_SYS_LITTLE_ENDIAN  #define CONFIG_JZSOC		/* Jz SoC */  #define CONFIG_JZ4740		/* Jz4740 SoC */  #define CONFIG_NAND_JZ4740 diff --git a/include/configs/qong.h b/include/configs/qong.h index e824e17ed..c2bd09729 100644 --- a/include/configs/qong.h +++ b/include/configs/qong.h @@ -28,8 +28,6 @@  #define CONFIG_ARM1136			/* This is an arm1136 CPU core */  #define CONFIG_MX31			/* in a mx31 */  #define CONFIG_QONG -#define CONFIG_MX31_HCLK_FREQ	26000000	/* 26MHz */ -#define CONFIG_MX31_CLK32	32768  #define CONFIG_DISPLAY_CPUINFO  #define CONFIG_DISPLAY_BOARDINFO @@ -212,12 +210,6 @@  #define CONFIG_SYS_HUSH_PARSER			/* Use the HUSH parser */  #define CONFIG_MISC_INIT_R -/*----------------------------------------------------------------------- - * Stack sizes - * - * The stack sizes are set up in start.S using the settings below - */ -#define CONFIG_STACKSIZE	(128 * 1024)	/* regular stack */  /*-----------------------------------------------------------------------   * Physical Memory Map diff --git a/include/configs/rpi_b.h b/include/configs/rpi_b.h new file mode 100644 index 000000000..cf62e45e8 --- /dev/null +++ b/include/configs/rpi_b.h @@ -0,0 +1,104 @@ +/* + * (C) Copyright 2012 Stephen Warren + * + * 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 + * version 2 as published by the Free Software Foundation. + * + * 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. + */ + +#ifndef __CONFIG_H +#define __CONFIG_H + +#include <asm/sizes.h> + +/* Architecture, CPU, etc.*/ +#define CONFIG_ARM1176 +#define CONFIG_BCM2835 +#define CONFIG_ARCH_CPU_INIT +/* + * 2835 is a SKU in a series for which the 2708 is the first or primary SoC, + * so 2708 has historically been used rather than a dedicated 2835 ID. + */ +#define CONFIG_MACH_TYPE		MACH_TYPE_BCM2708 + +/* Timer */ +#define CONFIG_SYS_HZ			1000000 + +/* Memory layout */ +#define CONFIG_NR_DRAM_BANKS		1 +#define CONFIG_SYS_SDRAM_BASE		0x00000000 +#define CONFIG_SYS_TEXT_BASE		0x00008000 +#define CONFIG_SYS_UBOOT_BASE		CONFIG_SYS_TEXT_BASE +/* + * The board really has 256M. However, the VC (VideoCore co-processor) shares + * the RAM, and uses a configurable portion at the top. We tell U-Boot that a + * smaller amount of RAM is present in order to avoid stomping on the area + * the VC uses. + */ +#define CONFIG_SYS_SDRAM_SIZE		SZ_128M +#define CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_SDRAM_BASE + \ +					 CONFIG_SYS_SDRAM_SIZE - \ +					 GENERATED_GBL_DATA_SIZE) +#define CONFIG_SYS_MALLOC_LEN		SZ_4M +#define CONFIG_SYS_MEMTEST_START	0x00100000 +#define CONFIG_SYS_MEMTEST_END		0x00200000 + +/* Flash */ +#define CONFIG_SYS_NO_FLASH + +/* Devices */ +/* GPIO */ +#define CONFIG_BCM2835_GPIO + +/* Console UART */ +#define CONFIG_PL011_SERIAL +#define CONFIG_PL011_CLOCK		3000000 +#define CONFIG_PL01x_PORTS		{ (void *)0x20201000 } +#define CONFIG_CONS_INDEX		0 +#define CONFIG_BAUDRATE			115200 + +/* Console configuration */ +#define CONFIG_SYS_CBSIZE		1024 +#define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE +		\ +					 sizeof(CONFIG_SYS_PROMPT) + 16) + +/* Environment */ +#define CONFIG_ENV_SIZE			SZ_16K +#define CONFIG_ENV_IS_NOWHERE +#define CONFIG_SYS_LOAD_ADDR		0x1000000 + +/* Shell */ +#define CONFIG_SYS_HUSH_PARSER +#define CONFIG_SYS_MAXARGS		8 +#define CONFIG_SYS_PROMPT		"U-Boot> " +#define CONFIG_SYS_LONGHELP +#define CONFIG_CMDLINE_EDITING +#define CONFIG_COMMAND_HISTORY +#define CONFIG_AUTO_COMPLETE + +/* Commands */ +#include <config_cmd_default.h> +#define CONFIG_CMD_BOOTZ +#define CONFIG_CMD_GPIO +/* Some things don't make sense on this HW or yet */ +#undef CONFIG_CMD_FPGA +#undef CONFIG_CMD_NET +#undef CONFIG_CMD_NFS +#undef CONFIG_CMD_SAVEENV + +/* Device tree support for bootm/bootz */ +#define CONFIG_OF_LIBFDT +/* ATAGs support for bootm/bootz */ +#define CONFIG_SETUP_MEMORY_TAGS +#define CONFIG_CMDLINE_TAG +#define CONFIG_INITRD_TAG + +#endif diff --git a/include/configs/s5p_goni.h b/include/configs/s5p_goni.h index 16be76457..36f1a5700 100644 --- a/include/configs/s5p_goni.h +++ b/include/configs/s5p_goni.h @@ -189,9 +189,6 @@  #define CONFIG_SYS_HZ			1000 -/* Stack sizes */ -#define CONFIG_STACKSIZE	(256 << 10)	/* 256 KiB */ -  /* Goni has 3 banks of DRAM, but swap the bank */  #define CONFIG_NR_DRAM_BANKS	3  #define PHYS_SDRAM_1		CONFIG_SYS_SDRAM_BASE	/* OneDRAM Bank #0 */ diff --git a/include/configs/s5pc210_universal.h b/include/configs/s5pc210_universal.h index 721301f95..7727624c6 100644 --- a/include/configs/s5pc210_universal.h +++ b/include/configs/s5pc210_universal.h @@ -214,9 +214,6 @@  #define CONFIG_SYS_HZ			1000 -/* Stack sizes */ -#define CONFIG_STACKSIZE	(256 << 10)	/* regular stack 256KB */ -  /* Universal has 2 banks of DRAM */  #define CONFIG_NR_DRAM_BANKS	2  #define PHYS_SDRAM_1		CONFIG_SYS_SDRAM_BASE	/* LDDDR2 DMC 0 */ diff --git a/include/configs/sbc35_a9g20.h b/include/configs/sbc35_a9g20.h index 316e3fb92..4a1d25276 100644 --- a/include/configs/sbc35_a9g20.h +++ b/include/configs/sbc35_a9g20.h @@ -45,7 +45,6 @@  #define CONFIG_SYS_HZ		        1000  #define CONFIG_ARCH_CPU_INIT -#undef CONFIG_USE_IRQ			/* we don't need IRQ/FIQ stuff	*/  #define CONFIG_CMDLINE_TAG              /* enable passing of ATAGs */  #define CONFIG_SETUP_MEMORY_TAGS @@ -182,10 +181,5 @@   * Size of malloc() pool   */  #define CONFIG_SYS_MALLOC_LEN	ROUND(3 * CONFIG_ENV_SIZE + 128 * 1024, 0x1000) -#define CONFIG_STACKSIZE		(32 * 1024)	/* regular stack */ - -#ifdef CONFIG_USE_IRQ -#error CONFIG_USE_IRQ not supported -#endif  #endif diff --git a/include/configs/sc_sps_1.h b/include/configs/sc_sps_1.h new file mode 100644 index 000000000..f5dc39302 --- /dev/null +++ b/include/configs/sc_sps_1.h @@ -0,0 +1,206 @@ +/* + * SchulerControl GmbH, SC_SPS_1 module config + * + * Copyright (C) 2012 Marek Vasut <marex@denx.de> + * on behalf of DENX Software Engineering GmbH + * + * 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 __SC_SPS_1_H__ +#define __SC_SPS_1_H__ + +/* + * SoC configurations + */ +#define CONFIG_MX28				/* i.MX28 SoC */ +#define CONFIG_MXS_GPIO				/* GPIO control */ +#define CONFIG_SYS_HZ		1000		/* Ticks per second */ + +/* + * Define SC_SPS_1 machine type by hand until it lands in mach-types + */ +#define MACH_TYPE_SC_SPS_1	4172 + +#define CONFIG_MACH_TYPE	MACH_TYPE_SC_SPS_1 + +#include <asm/arch/regs-base.h> + +#define CONFIG_SYS_NO_FLASH +#define CONFIG_BOARD_EARLY_INIT_F +#define CONFIG_ARCH_CPU_INIT +#define CONFIG_ARCH_MISC_INIT + +#define CONFIG_ENV_IS_IN_MMC + +#define CONFIG_OF_LIBFDT + +/* + * SPL + */ +#define CONFIG_SPL +#define CONFIG_SPL_NO_CPU_SUPPORT_CODE +#define CONFIG_SPL_START_S_PATH		"arch/arm/cpu/arm926ejs/mxs" +#define CONFIG_SPL_LDSCRIPT	"arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds" +#define CONFIG_SPL_LIBCOMMON_SUPPORT +#define CONFIG_SPL_LIBGENERIC_SUPPORT +#define CONFIG_SPL_GPIO_SUPPORT + +/* + * U-Boot Commands + */ +#include <config_cmd_default.h> +#define CONFIG_DISPLAY_CPUINFO +#define CONFIG_DOS_PARTITION + +#define CONFIG_CMD_CACHE +#define CONFIG_CMD_DHCP +#define CONFIG_CMD_EXT2 +#define CONFIG_CMD_FAT +#define CONFIG_CMD_GPIO +#define CONFIG_CMD_MII +#define CONFIG_CMD_MMC +#define CONFIG_CMD_NET +#define CONFIG_CMD_NFS +#define CONFIG_CMD_PING +#define CONFIG_CMD_SETEXPR +#define CONFIG_CMD_USB + +/* + * Memory configurations + */ +#define CONFIG_NR_DRAM_BANKS		1		/* 1 bank of DRAM */ +#define PHYS_SDRAM_1			0x40000000	/* Base address */ +#define PHYS_SDRAM_1_SIZE		0x40000000	/* Max 1 GB RAM */ +#define CONFIG_STACKSIZE		0x00010000	/* 128 KB stack */ +#define CONFIG_SYS_MALLOC_LEN		0x00400000	/* 4 MB for malloc */ +#define CONFIG_SYS_GBL_DATA_SIZE	128		/* Initial data */ +#define CONFIG_SYS_MEMTEST_START	0x40000000	/* Memtest start adr */ +#define CONFIG_SYS_MEMTEST_END		0x40400000	/* 4 MB RAM test */ +#define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM_1 + +/* Point initial SP in SRAM so SPL can use it too. */ +#define CONFIG_SYS_INIT_RAM_ADDR	0x00000000 +#define CONFIG_SYS_INIT_RAM_SIZE	(128 * 1024) + +#define CONFIG_SYS_INIT_SP_OFFSET \ +	(CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) +#define CONFIG_SYS_INIT_SP_ADDR \ +	(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) +/* + * We need to sacrifice first 4 bytes of RAM here to avoid triggering some + * strange BUG in ROM corrupting first 4 bytes of RAM when loading U-Boot + * binary. In case there was more of this mess, 0x100 bytes are skipped. + */ +#define CONFIG_SYS_TEXT_BASE		0x40000100 + +/* + * U-Boot general configurations + */ +#define CONFIG_SYS_LONGHELP +#define CONFIG_SYS_PROMPT	"=> " +#define CONFIG_SYS_CBSIZE	1024		/* Console I/O buffer size */ +#define CONFIG_SYS_PBSIZE	\ +	(CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16) +						/* Print buffer size */ +#define CONFIG_SYS_MAXARGS	32		/* Max number of command args */ +#define CONFIG_SYS_BARGSIZE	CONFIG_SYS_CBSIZE +						/* Boot argument buffer size */ +#define CONFIG_VERSION_VARIABLE			/* U-BOOT version */ +#define CONFIG_AUTO_COMPLETE			/* Command auto complete */ +#define CONFIG_CMDLINE_EDITING			/* Command history etc */ +#define CONFIG_SYS_HUSH_PARSER +#define CONFIG_SYS_PROMPT_HUSH_PS2	"> " + +/* + * Serial Driver + */ +#define CONFIG_PL011_SERIAL +#define CONFIG_PL011_CLOCK		24000000 +#define CONFIG_PL01x_PORTS		{ (void *)MXS_UARTDBG_BASE } +#define CONFIG_CONS_INDEX		0 +#define CONFIG_BAUDRATE			115200	/* Default baud rate */ +#define CONFIG_SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, 115200 } + +/* + * MMC Driver + */ +#ifdef CONFIG_CMD_MMC +#define CONFIG_APBH_DMA +#define CONFIG_MMC +#define CONFIG_MMC_BOUNCE_BUFFER +#define CONFIG_GENERIC_MMC +#define CONFIG_MXS_MMC +#endif +#define CONFIG_ENV_SIZE			(16 * 1024) +#ifdef CONFIG_ENV_IS_IN_MMC +#define CONFIG_ENV_OFFSET		(256 * 1024) +#define CONFIG_SYS_MMC_ENV_DEV		0 +#else +#define CONFIG_ENV_IS_NOWHERE +#endif + +/* + * Ethernet on SOC (FEC) + */ +#ifdef CONFIG_CMD_NET +#define CONFIG_ETHPRIME			"FEC0" +#define CONFIG_FEC_MXC +#define CONFIG_FEC_MXC_MULTI +#define CONFIG_MII +#define CONFIG_DISCOVER_PHY +#define CONFIG_FEC_XCV_TYPE		RMII +#define CONFIG_PHYLIB +#define CONFIG_PHY_SMSC +#endif + +/* + * USB + */ +#ifdef CONFIG_CMD_USB +#define CONFIG_USB_EHCI +#define CONFIG_USB_EHCI_MXS +#define CONFIG_EHCI_MXS_PORT		0 +#define CONFIG_EHCI_IS_TDI +#define CONFIG_USB_STORAGE +#endif + +/* + * Boot Linux + */ +#define CONFIG_CMDLINE_TAG +#define CONFIG_SETUP_MEMORY_TAGS +#define CONFIG_BOOTDELAY	3 +#define CONFIG_BOOTFILE		"uImage" +#define CONFIG_BOOTARGS		"console=ttyAMA0,115200" +#define CONFIG_BOOTCOMMAND	"bootm " +#define CONFIG_LOADADDR		0x42000000 +#define CONFIG_SYS_LOAD_ADDR	CONFIG_LOADADDR + +/* + * Extra Environments + */ +#define CONFIG_EXTRA_ENV_SETTINGS					\ +	"update_sd_firmware_filename=u-boot.sd\0"			\ +	"update_sd_firmware="		/* Update the SD firmware partition */ \ +		"if mmc rescan ; then "					\ +		"if tftp ${update_sd_firmware_filename} ; then "	\ +		"setexpr fw_sz ${filesize} / 0x200 ; "	/* SD block size */ \ +		"setexpr fw_sz ${fw_sz} + 1 ; "				\ +		"mmc write ${loadaddr} 0x800 ${fw_sz} ; "		\ +		"fi ; "							\ +		"fi\0" + +#endif /* __SC_SPS_1_H__ */ diff --git a/include/configs/scb9328.h b/include/configs/scb9328.h index 1494a2ecc..2336a8d4e 100644 --- a/include/configs/scb9328.h +++ b/include/configs/scb9328.h @@ -27,7 +27,6 @@  #define CONFIG_ARM920T		1     /* this is an ARM920T CPU	    */  #define CONFIG_IMX		1     /* in a Motorola MC9328MXL Chip */  #define CONFIG_SCB9328		1     /* on a scb9328tronix board */ -#undef	CONFIG_USE_IRQ		      /* don't need use IRQ/FIQ	   */  #define CONFIG_IMX_SERIAL  #define CONFIG_IMX_SERIAL1 @@ -100,13 +99,6 @@   */  #define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + (128<<10) ) -#define CONFIG_STACKSIZE	(120<<10)      /* stack size		     */ - -#ifdef CONFIG_USE_IRQ -#define CONFIG_STACKSIZE_IRQ	(4<<10)	       /* IRQ stack		     */ -#define CONFIG_STACKSIZE_FIQ	(4<<10)	       /* FIQ stack		     */ -#endif -  /* SDRAM Setup Values  0x910a8300 Precharge Command CAS 3  0x910a8200 Precharge Command CAS 2 diff --git a/include/configs/seaboard.h b/include/configs/seaboard.h index f661583fe..de19e38de 100644 --- a/include/configs/seaboard.h +++ b/include/configs/seaboard.h @@ -27,26 +27,26 @@  #include <asm/sizes.h>  /* LP0 suspend / resume */ -#define CONFIG_TEGRA2_LP0 +#define CONFIG_TEGRA_LP0  #define CONFIG_AES  #define CONFIG_TEGRA_PMU  #define CONFIG_TPS6586X_POWER  #define CONFIG_TEGRA_CLOCK_SCALING -#include "tegra2-common.h" +#include "tegra20-common.h"  /* Enable fdt support for Seaboard. Flash the image in u-boot-dtb.bin */ -#define CONFIG_DEFAULT_DEVICE_TREE	tegra2-seaboard +#define CONFIG_DEFAULT_DEVICE_TREE	tegra20-seaboard  #define CONFIG_OF_CONTROL  #define CONFIG_OF_SEPARATE  /* High-level configuration options */ -#define V_PROMPT		"Tegra2 (SeaBoard) # " -#define CONFIG_TEGRA2_BOARD_STRING	"NVIDIA Seaboard" +#define V_PROMPT		"Tegra20 (SeaBoard) # " +#define CONFIG_TEGRA_BOARD_STRING	"NVIDIA Seaboard"  /* Board-specific serial config */  #define CONFIG_SERIAL_MULTI -#define CONFIG_TEGRA2_ENABLE_UARTD +#define CONFIG_TEGRA_ENABLE_UARTD  #define CONFIG_SYS_NS16550_COM1		NV_PA_APB_UARTD_BASE  /* On Seaboard: GPIO_PI3 = Port I = 8, bit = 3 */ @@ -77,8 +77,9 @@  /* Environment in eMMC, at the end of 2nd "boot sector" */  #define CONFIG_ENV_IS_IN_MMC -#define CONFIG_ENV_OFFSET ((2 * 512 * 1024) - CONFIG_ENV_SIZE) +#define CONFIG_ENV_OFFSET ((512 * 1024) - CONFIG_ENV_SIZE)  #define CONFIG_SYS_MMC_ENV_DEV 0 +#define CONFIG_SYS_MMC_ENV_PART 2  /* USB Host support */  #define CONFIG_USB_EHCI @@ -95,14 +96,23 @@  #define CONFIG_CMD_DHCP  /* Enable keyboard */ -#define CONFIG_TEGRA2_KEYBOARD +#define CONFIG_TEGRA_KEYBOARD  #define CONFIG_KEYBOARD -#undef TEGRA2_DEVICE_SETTINGS -#define TEGRA2_DEVICE_SETTINGS	"stdin=serial,tegra-kbc\0" \ -					"stdout=serial\0" \ -					"stderr=serial\0" +#undef TEGRA_DEVICE_SETTINGS +#define TEGRA_DEVICE_SETTINGS	"stdin=serial,tegra-kbc\0" \ +				"stdout=serial\0" \ +				"stderr=serial\0" -#include "tegra2-common-post.h" +#include "tegra-common-post.h" +/* NAND support */ +#define CONFIG_CMD_NAND +#define CONFIG_TEGRA_NAND + +/* Max number of NAND devices */ +#define CONFIG_SYS_MAX_NAND_DEVICE	1 + +/* Somewhat oddly, the NAND base address must be a config option */ +#define CONFIG_SYS_NAND_BASE	NV_PA_NAND_BASE  #endif /* __CONFIG_H */ diff --git a/include/configs/smdk2410.h b/include/configs/smdk2410.h index 8792c857c..1c0978da8 100644 --- a/include/configs/smdk2410.h +++ b/include/configs/smdk2410.h @@ -45,8 +45,6 @@  /* input clock of PLL (the SMDK2410 has 12MHz input clock) */  #define CONFIG_SYS_CLK_FREQ	12000000 -#undef CONFIG_USE_IRQ		/* we don't need IRQ/FIQ stuff */ -  #define CONFIG_CMDLINE_TAG	/* enable passing of ATAGs */  #define CONFIG_SETUP_MEMORY_TAGS  #define CONFIG_INITRD_TAG @@ -149,17 +147,6 @@  #define CONFIG_LZMA  /*----------------------------------------------------------------------- - * Stack sizes - * - * The stack sizes are set up in start.S using the settings below - */ -#define CONFIG_STACKSIZE	(128*1024)	/* regular stack */ -#ifdef CONFIG_USE_IRQ -#define CONFIG_STACKSIZE_IRQ	(4*1024)	/* IRQ stack */ -#define CONFIG_STACKSIZE_FIQ	(4*1024)	/* FIQ stack */ -#endif - -/*-----------------------------------------------------------------------   * Physical Memory Map   */  #define CONFIG_NR_DRAM_BANKS	1          /* we have 1 bank of DRAM */ diff --git a/include/configs/smdk5250.h b/include/configs/smdk5250.h index eb1466c52..47369aa93 100644 --- a/include/configs/smdk5250.h +++ b/include/configs/smdk5250.h @@ -69,7 +69,7 @@  /* select serial console configuration */  #define CONFIG_SERIAL_MULTI -#define CONFIG_SERIAL1			/* use SERIAL 1 */ +#define CONFIG_SERIAL3			/* use SERIAL 3 */  #define CONFIG_BAUDRATE			115200  #define EXYNOS5_DEFAULT_UART_OFFSET	0x010000 @@ -112,6 +112,11 @@  #define CONFIG_SPL  #define COPY_BL2_FNPTR_ADDR	0x02020030 +/* specific .lds file */ +#define CONFIG_SPL_LDSCRIPT	"board/samsung/smdk5250/smdk5250-uboot-spl.lds" +#define CONFIG_SPL_TEXT_BASE	0x02023400 +#define CONFIG_SPL_MAX_SIZE	(14 * 1024) +  #define CONFIG_BOOTCOMMAND	"mmc read 40007000 451 2000; bootm 40007000"  /* Miscellaneous configurable options */ @@ -133,9 +138,6 @@  #define CONFIG_RD_LVL -/* Stack sizes */ -#define CONFIG_STACKSIZE		(256 << 10)	/* 256KB */ -  #define CONFIG_NR_DRAM_BANKS	8  #define SDRAM_BANK_SIZE		(256UL << 20UL)	/* 256 MB */  #define PHYS_SDRAM_1		CONFIG_SYS_SDRAM_BASE diff --git a/include/configs/smdk6400.h b/include/configs/smdk6400.h index 04caeef96..d4dc8ef82 100644 --- a/include/configs/smdk6400.h +++ b/include/configs/smdk6400.h @@ -141,13 +141,6 @@  #define CONFIG_SYS_HZ			1000 -/*----------------------------------------------------------------------- - * Stack sizes - * - * The stack sizes are set up in start.S using the settings below - */ -#define CONFIG_STACKSIZE	0x40000		/* regular stack 256KB */ -  /**********************************   Support Clock Settings   ********************************** diff --git a/include/configs/smdkc100.h b/include/configs/smdkc100.h index fd9f96d46..22de3448e 100644 --- a/include/configs/smdkc100.h +++ b/include/configs/smdkc100.h @@ -182,13 +182,6 @@  #define CONFIG_SYS_HZ			1000 -/*----------------------------------------------------------------------- - * Stack sizes - * - * The stack sizes are set up in start.S using the settings below - */ -#define CONFIG_STACKSIZE	(256 << 10)	/* 256 KiB */ -  /* SMDKC100 has 1 banks of DRAM, we use only one in U-Boot */  #define CONFIG_NR_DRAM_BANKS	1  #define PHYS_SDRAM_1		CONFIG_SYS_SDRAM_BASE	/* SDRAM Bank #1 */ diff --git a/include/configs/smdkv310.h b/include/configs/smdkv310.h index 41d7780a0..602337f4d 100644 --- a/include/configs/smdkv310.h +++ b/include/configs/smdkv310.h @@ -115,9 +115,6 @@  #define CONFIG_SYS_HZ			1000 -/* Stack sizes */ -#define CONFIG_STACKSIZE		(256 << 10)	/* 256KB */ -  /* SMDKV310 has 4 bank of DRAM */  #define CONFIG_NR_DRAM_BANKS	4  #define SDRAM_BANK_SIZE		(512UL << 20UL)	/* 512 MB */ @@ -135,11 +132,6 @@  #undef	CONFIG_CMD_IMLS  #define CONFIG_IDENT_STRING		" for SMDKC210/V310" -#ifdef CONFIG_USE_IRQ -#define CONFIG_STACKSIZE_IRQ		(4*1024)	/* IRQ stack */ -#define CONFIG_STACKSIZE_FIQ		(4*1024)	/* FIQ stack */ -#endif -  #define CONFIG_CLK_1000_400_200  /* MIU (Memory Interleaving Unit) */ diff --git a/include/configs/snapper9260.h b/include/configs/snapper9260.h index 8af3c02f3..218ca546b 100644 --- a/include/configs/snapper9260.h +++ b/include/configs/snapper9260.h @@ -40,7 +40,6 @@  /* CPU */  #define CONFIG_ARCH_CPU_INIT -#undef CONFIG_USE_IRQ  #define CONFIG_CMDLINE_TAG		/* enable passing of ATAGs	*/  #define CONFIG_SETUP_MEMORY_TAGS @@ -162,7 +161,6 @@  /* U-Boot memory settings */  #define CONFIG_SYS_MALLOC_LEN		(1 << 20) -#define CONFIG_STACKSIZE		(256 << 10)  /* Command line configuration */  #include <config_cmd_default.h> diff --git a/include/configs/snowball.h b/include/configs/snowball.h new file mode 100644 index 000000000..30f4a4eb5 --- /dev/null +++ b/include/configs/snowball.h @@ -0,0 +1,266 @@ +/* + * Copyright (C) ST-Ericsson SA 2009 + * + * 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 __CONFIG_H +#define __CONFIG_H + +/* + * #define DEBUG 1 + */ + +#define CONFIG_SKIP_LOWLEVEL_INIT +#define CONFIG_SNOWBALL +#define CONFIG_SYS_ICACHE_OFF +#define CONFIG_SYS_DCACHE_OFF +#define CONFIG_ARCH_CPU_INIT +#define CONFIG_BOARD_LATE_INIT + +/* + * High Level Configuration Options + * (easy to change) + */ +#define CONFIG_U8500 +#define CONFIG_L2_OFF + +#define CONFIG_SYS_MEMTEST_START	0x00000000 +#define CONFIG_SYS_MEMTEST_END	0x1FFFFFFF +#define CONFIG_SYS_HZ		1000		/* must be 1000 */ + +/*----------------------------------------------------------------------- + * Size of environment and malloc() pool + */ +/* + * If you use U-Boot as crash kernel, make sure that it does not overwrite + * information saved by kexec during panic. Kexec expects the start + * address of the executable 32K above "crashkernel" address. + */ +/* + * Size of malloc() pool + */ +#define CONFIG_ENV_SIZE		(8*1024) +#define CONFIG_SYS_MALLOC_LEN	(CONFIG_ENV_SIZE + 256*1024) + +#define CONFIG_SYS_GBL_DATA_SIZE	128	/* for initial data */ + +#define CONFIG_ENV_IS_IN_MMC +#define CONFIG_CMD_ENV +#define CONFIG_CMD_SAVEENV +#define CONFIG_ENV_OFFSET		0x0118000 +#define CONFIG_SYS_MMC_ENV_DEV          0              /* SLOT2: eMMC */ + +/* + * PL011 Configuration + */ +#define CONFIG_PL011_SERIAL +#define CONFIG_PL011_SERIAL_RLCR +#define CONFIG_PL011_SERIAL_FLUSH_ON_INIT + +/* + * U8500 UART registers base for 3 serial devices + */ +#define CFG_UART0_BASE		0x80120000 +#define CFG_UART1_BASE		0x80121000 +#define CFG_UART2_BASE		0x80007000 +#define CFG_SERIAL0		CFG_UART0_BASE +#define CFG_SERIAL1		CFG_UART1_BASE +#define CFG_SERIAL2		CFG_UART2_BASE +#define CONFIG_PL011_CLOCK	38400000 +#define CONFIG_PL01x_PORTS	{ (void *)CFG_SERIAL0, (void *)CFG_SERIAL1, \ +				  (void *)CFG_SERIAL2 } +#define CONFIG_CONS_INDEX	2 +#define CONFIG_BAUDRATE		115200 + +/* + * Devices and file systems + */ +#define CONFIG_MMC +#define CONFIG_GENERIC_MMC +#define CONFIG_DOS_PARTITION + +/* + * Commands + */ +#define CONFIG_CMD_MEMORY +#define CONFIG_CMD_BOOTD +#define CONFIG_CMD_BDI +#define CONFIG_CMD_IMI +#define CONFIG_CMD_MISC +#define CONFIG_CMD_RUN +#define CONFIG_CMD_ECHO +#define CONFIG_CMD_CONSOLE +#define CONFIG_CMD_LOADS +#define CONFIG_CMD_LOADB +#define CONFIG_CMD_MMC +#define CONFIG_CMD_FAT +#define CONFIG_CMD_EXT2 +#define CONFIG_CMD_SOURCE + +#ifndef CONFIG_BOOTDELAY +#define CONFIG_BOOTDELAY	1 +#endif +#define CONFIG_ZERO_BOOTDELAY_CHECK	/* check for keypress on bootdelay==0 */ + +#undef CONFIG_BOOTARGS +#define CONFIG_BOOTCOMMAND \ +"mmc dev 1; "								\ +	"if run loadbootscript; "					\ +		"then run bootscript; "					\ +	"else "								\ +		"if run mmcload; "					\ +			"then run mmcboot; "				\ +		"else "							\ +			"mmc dev 0; "					\ +			"if run emmcloadbootscript; "			\ +				"then run bootscript; "			\ +			"else "						\ +				"if run emmcload; "			\ +					"then run emmcboot; "		\ +				"else "					\ +					"echo No media to boot from; "	\ +				"fi; "					\ +			"fi; "						\ +		"fi; "							\ +	"fi; " + +#define CONFIG_EXTRA_ENV_SETTINGS \ +	"verify=n\0"							\ +	"loadaddr=0x00100000\0"						\ +	"console=ttyAMA2,115200n8\0"					\ +	"loadbootscript=fatload mmc 1:1 ${loadaddr} boot.scr\0"		\ +	"emmcloadbootscript=fatload mmc 0:2 ${loadaddr} boot.scr\0"	\ +	"bootscript=echo Running bootscript "				\ +		"from mmc ...; source ${loadaddr}\0"			\ +	"memargs256=mem=96M@0 mem_modem=32M@96M mem=32M@128M "		\ +		"hwmem=22M@160M pmem_hwb=42M@182M mem_mali=32@224M\0"	\ +	"memargs512=mem=96M@0 mem_modem=32M@96M hwmem=32M@128M "	\ +		"mem=64M@160M mem_mali=32M@224M "			\ +		"pmem_hwb=128M@256M mem=128M@384M\0"			\ +	"memargs1024=mem=128M@0 mali.mali_mem=32M@128M "		\ +		"hwmem=168M@M160M mem=48M@328M "			\ +		"mem_issw=1M@383M mem=640M@384M\0"			\ +	"memargs=setenv bootargs ${bootargs} ${memargs1024}\0"		\ +	"emmcload=fatload mmc 0:2 ${loadaddr} uImage\0"			\ +	"mmcload=fatload mmc 1:1 ${loadaddr} uImage\0"			\ +	"commonargs=setenv bootargs console=${console} "		\ +	"vmalloc=300M\0"						\ +	"emmcargs=setenv bootargs ${bootargs} "				\ +		"root=/dev/mmcblk0p3 "					\ +		"rootwait\0"						\ +	"addcons=setenv bootargs ${bootargs} "				\ +		"console=${console}\0"					\ +	"emmcboot=echo Booting from eMMC ...; "				\ +		"run commonargs emmcargs memargs; "			\ +		"bootm ${loadaddr}\0"					\ +	"mmcargs=setenv bootargs ${bootargs} "				\ +		"root=/dev/mmcblk1p2 "					\ +		"rootwait earlyprintk\0"				\ +	"mmcboot=echo Booting from external MMC ...; "			\ +		"run commonargs mmcargs memargs; "			\ +		"bootm ${loadaddr}\0"					\ +	"fdt_high=0x2BC00000\0"						\ +	"stdout=serial,usbtty\0"					\ +	"stdin=serial,usbtty\0"						\ +	"stderr=serial,usbtty\0" + +/*----------------------------------------------------------------------- + * Miscellaneous configurable options + */ + +#define CONFIG_SYS_LONGHELP			/* undef to save memory     */ +#define CONFIG_SYS_PROMPT	"U8500 $ "	/* Monitor Command Prompt   */ +#define CONFIG_SYS_CBSIZE	1024		/* Console I/O Buffer Size  */ + +/* Print Buffer Size */ +#define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE \ +					+ sizeof(CONFIG_SYS_PROMPT) + 16) +#define CONFIG_SYS_MAXARGS	32	/* max number of command args */ +#define CONFIG_SYS_BARGSIZE	CONFIG_SYS_CBSIZE /* Boot Arg Buffer Size */ + +#undef	CONFIG_SYS_CLKS_IN_HZ		/* everything, incl board info, in Hz */ +#define CONFIG_SYS_LOAD_ADDR		0x00100000 /* default load address */ +#define CONFIG_SYS_LOADS_BAUD_CHANGE	1 + +#define CONFIG_SYS_HUSH_PARSER		1 +#define CONFIG_CMDLINE_EDITING + +#define CONFIG_SETUP_MEMORY_TAGS	2 +#define CONFIG_INITRD_TAG		1 +#define CONFIG_CMDLINE_TAG		1	/* enable passing of ATAGs  */ + +/* + * Physical Memory Map + */ +#define CONFIG_NR_DRAM_BANKS		1 +#define PHYS_SDRAM_1			0x00000000	/* DDR-SDRAM Bank #1 */ + +/* + * additions for new relocation code + */ +#define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM_1 +#define CONFIG_SYS_MAX_RAM_SIZE	0x40000000 +#define CONFIG_SYS_INIT_RAM_SIZE	0x100000 +#define CONFIG_SYS_GBL_DATA_OFFSET	(CONFIG_SYS_SDRAM_BASE + \ +					 CONFIG_SYS_INIT_RAM_SIZE - \ +					 GENERATED_GBL_DATA_SIZE) +#define CONFIG_SYS_INIT_SP_ADDR		CONFIG_SYS_GBL_DATA_OFFSET + +/* landing address before relocation */ +#ifndef CONFIG_SYS_TEXT_BASE +#define CONFIG_SYS_TEXT_BASE            0x0 +#endif + +/* + * MMC related configs + */ +#define CONFIG_ARM_PL180_MMCI +#define MMC_BLOCK_SIZE			512 +#define CFG_EMMC_BASE                   0x80114000 +#define CFG_MMC_BASE                    0x80126000 + +/* + * FLASH and environment organization + */ +#define CONFIG_SYS_NO_FLASH + +/* + * base register values for U8500 + */ +#define CFG_PRCMU_BASE		0x80157000	/* Power, reset and clock */ + + +/* + * U8500 GPIO register base for 9 banks + */ +#define CONFIG_DB8500_GPIO +#define CFG_GPIO_0_BASE			0x8012E000 +#define CFG_GPIO_1_BASE			0x8012E080 +#define CFG_GPIO_2_BASE			0x8000E000 +#define CFG_GPIO_3_BASE			0x8000E080 +#define CFG_GPIO_4_BASE			0x8000E100 +#define CFG_GPIO_5_BASE			0x8000E180 +#define CFG_GPIO_6_BASE			0x8011E000 +#define CFG_GPIO_7_BASE			0x8011E080 +#define CFG_GPIO_8_BASE			0xA03FE000 + +#define CFG_FSMC_BASE		0x80000000	/* FSMC Controller */ + +#endif	/* __CONFIG_H */ diff --git a/include/configs/spear-common.h b/include/configs/spear-common.h index a6d1cfbcb..192cda143 100644 --- a/include/configs/spear-common.h +++ b/include/configs/spear-common.h @@ -233,14 +233,6 @@  #define CONFIG_SYS_FLASH_EMPTY_INFO -/* Stack sizes */ -#define CONFIG_STACKSIZE			(128*1024) - -#ifdef CONFIG_USE_IRQ -#define CONFIG_STACKSIZE_IRQ			(4*1024) -#define CONFIG_STACKSIZE_FIQ			(4*1024) -#endif -  /* Physical Memory Map */  #define CONFIG_NR_DRAM_BANKS			1  #define PHYS_SDRAM_1				0x00000000 diff --git a/include/configs/stamp9g20.h b/include/configs/stamp9g20.h new file mode 100644 index 000000000..a881eef30 --- /dev/null +++ b/include/configs/stamp9g20.h @@ -0,0 +1,267 @@ +/* + * (C) Copyright 2007-2008 + * Stelian Pop <stelian@popies.net> + * Lead Tech Design <www.leadtechdesign.com> + * + * (C) Copyright 2010 + * Achim Ehrlich <aehrlich@taskit.de> + * taskit GmbH <www.taskit.de> + * + * (C) Copyright 2012 + * Markus Hubig <mhubig@imko.de> + * IMKO GmbH <www.imko.de> + * + * Configuation settings for the stamp9g20 CPU module. + * + * 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 __CONFIG_H +#define __CONFIG_H + +/* + * SoC must be defined first, before hardware.h is included. + * In this case SoC is defined in boards.cfg. + */ +#include <asm/hardware.h> + +/* + * Warning: changing CONFIG_SYS_TEXT_BASE requires adapting the initial boot + * program. Since the linker has to swallow that define, we must use a pure + * hex number here! + */ +#define CONFIG_SYS_TEXT_BASE		0x23f00000 + +/* ARM asynchronous clock */ +#define CONFIG_SYS_AT91_SLOW_CLOCK	32768		/* slow clock xtal */ +#define CONFIG_SYS_AT91_MAIN_CLOCK	18432000	/* 18.432MHz crystal */ +#define CONFIG_SYS_HZ			1000		/* 1ms resolution */ + +/* misc settings */ +#define CONFIG_CMDLINE_TAG		/* pass commandline to Kernel */ +#define CONFIG_SETUP_MEMORY_TAGS	/* pass memory defs to kernel */ +#define CONFIG_INITRD_TAG		/* pass initrd param to kernel */ +#define CONFIG_SKIP_LOWLEVEL_INIT	/* U-Boot is loaded by a bootloader */ +#define CONFIG_BOARD_EARLY_INIT_f	/* call board_early_init_f() */ +#define CONFIG_BOARD_POSTCLK_INIT	/* call board_postclk_init() */ +#define CONFIG_DISPLAY_CPUINFO		/* display CPU Info at startup */ + +/* setting board specific options */ +#ifdef CONFIG_PORTUXG20 +# define CONFIG_MACH_TYPE		MACH_TYPE_PORTUXG20 +# define CONFIG_MACB +#else +# define CONFIG_MACH_TYPE		MACH_TYPE_STAMP9G20 +#endif + +/* + * SDRAM: 1 bank, 64 MB, base address 0x20000000 + * Already initialized before u-boot gets started. + */ +#define CONFIG_NR_DRAM_BANKS		1 +#define CONFIG_SYS_SDRAM_BASE		ATMEL_BASE_CS1 +#define CONFIG_SYS_SDRAM_SIZE		(64 << 20) + +/* + * Perform a SDRAM Memtest from the start of SDRAM + * till the beginning of the U-Boot position in RAM. + */ +#define CONFIG_SYS_MEMTEST_START	CONFIG_SYS_SDRAM_BASE +#define CONFIG_SYS_MEMTEST_END		(CONFIG_SYS_TEXT_BASE - 0x100000) + +/* Size of malloc() pool */ +#define CONFIG_SYS_MALLOC_LEN \ +	ROUND(3 * CONFIG_ENV_SIZE + (128 << 10), 0x1000) + +/* + * Initial stack pointer: 4k - GENERATED_GBL_DATA_SIZE in internal SRAM, + * leaving the correct space for initial global data structure above that + * address while providing maximum stack area below. + */ +#define CONFIG_SYS_INIT_SP_ADDR \ +	(ATMEL_BASE_SRAM1 + 0x1000 - GENERATED_GBL_DATA_SIZE) + +/* NAND flash settings */ +#define CONFIG_NAND_ATMEL +#define CONFIG_SYS_NO_FLASH +#define CONFIG_SYS_MAX_NAND_DEVICE	1 +#define CONFIG_SYS_NAND_BASE		ATMEL_BASE_CS3 +#define CONFIG_SYS_NAND_DBW_8 +#define CONFIG_SYS_NAND_MASK_ALE	(1 << 21) +#define CONFIG_SYS_NAND_MASK_CLE	(1 << 22) +#define CONFIG_SYS_NAND_ENABLE_PIN	AT91_PIN_PC14 +#define CONFIG_SYS_NAND_READY_PIN	AT91_PIN_PC13 + +/* general purpose I/O */ +#define CONFIG_ATMEL_LEGACY		/* required until (g)pio is fixed */ +#define CONFIG_AT91_GPIO		/* enable the GPIO features */ +#define CONFIG_AT91_GPIO_PULLUP	1	/* keep pullups on peripheral pins */ + +/* serial console */ +#define CONFIG_ATMEL_USART +#define CONFIG_USART_BASE		ATMEL_BASE_DBGU +#define CONFIG_USART_ID			ATMEL_ID_SYS +#define CONFIG_BAUDRATE			115200 + +/* LED configuration */ +#define CONFIG_STATUS_LED +#define CONFIG_BOARD_SPECIFIC_LED + +/* The LED PINs */ +#define CONFIG_RED_LED			AT91_PIN_PC5 +#define CONFIG_GREEN_LED		AT91_PIN_PC4 +#define CONFIG_YELLOW_LED		AT91_PIN_PC10 + +#define STATUS_LED_RED			0 +#define STATUS_LED_GREEN		1 +#define STATUS_LED_YELLOW		2 + +/* Red LED */ +#define STATUS_LED_BIT			STATUS_LED_RED +#define STATUS_LED_STATE		STATUS_LED_OFF +#define STATUS_LED_PERIOD		(CONFIG_SYS_HZ / 2) + +/* Green LED */ +#define STATUS_LED_BIT1			STATUS_LED_GREEN +#define STATUS_LED_STATE1		STATUS_LED_ON +#define STATUS_LED_PERIOD1		(CONFIG_SYS_HZ / 2) + +/* Yellow LED */ +#define STATUS_LED_BIT2			STATUS_LED_YELLOW +#define STATUS_LED_STATE2		STATUS_LED_OFF +#define STATUS_LED_PERIOD2		(CONFIG_SYS_HZ / 2) + +/* Boot status LED */ +#define STATUS_LED_BOOT			STATUS_LED_GREEN + +/* + * Ethernet configuration + * + * PortuxG20 has always ethernet but for Stamp9G20 you + * can enable it here if your baseboard features ethernet. + */ + +/* #define CONFIG_MACB */ + +#ifdef CONFIG_MACB +# define CONFIG_RMII			/* use reduced MII inteface */ +# define CONFIG_NET_RETRY_COUNT	20      /* # of DHCP/BOOTP retries */ + +/* BOOTP and DHCP options */ +# define CONFIG_BOOTP_BOOTFILESIZE +# define CONFIG_BOOTP_BOOTPATH +# define CONFIG_BOOTP_GATEWAY +# define CONFIG_BOOTP_HOSTNAME +# define CONFIG_NFSBOOTCOMMAND						\ +	"setenv autoload yes; setenv autoboot yes; "			\ +	"setenv bootargs ${basicargs} ${mtdparts} "			\ +	"root=/dev/nfs ip=dhcp nfsroot=${serverip}:/srv/nfs/rootfs; "	\ +	"dhcp" +#endif /* CONFIG_MACB */ + +/* Enable the watchdog */ +#define CONFIG_AT91SAM9_WATCHDOG +#define CONFIG_HW_WATCHDOG + +/* USB configuration */ +#define CONFIG_USB_ATMEL +#define CONFIG_USB_OHCI_NEW +#define CONFIG_USB_STORAGE +#define CONFIG_DOS_PARTITION +#define CONFIG_SYS_USB_OHCI_CPU_INIT +#define CONFIG_SYS_USB_OHCI_REGS_BASE	ATMEL_UHP_BASE +#define CONFIG_SYS_USB_OHCI_SLOT_NAME	"at91sam9260" +#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS	2 + +/* General Boot Parameter */ +#define CONFIG_BOOTDELAY		3 +#define CONFIG_BOOTCOMMAND		"run flashboot" +#define CONFIG_SYS_PROMPT		"U-Boot> " +#define CONFIG_SYS_CBSIZE		256 +#define CONFIG_SYS_MAXARGS		16 +#define CONFIG_SYS_PBSIZE \ +	(CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16) +#define CONFIG_SYS_LONGHELP +#define CONFIG_CMDLINE_EDITING + +/* + * RAM Memory address where to put the + * Linux Kernel befor starting. + */ +#define CONFIG_SYS_LOAD_ADDR		0x22000000 + +/* + * The NAND Flash partitions: + * ========================================== + * 0x0000000-0x001ffff -> 128k, bootstrap + * 0x0020000-0x005ffff -> 256k, u-boot + * 0x0060000-0x007ffff -> 128k, env1 + * 0x0080000-0x009ffff -> 128k, env2 (backup) + * 0x0100000-0x06fffff ->   6M, kernel + * 0x0700000-0x8000000 -> 121M, RootFS + */ +#define CONFIG_ENV_IS_IN_NAND +#define CONFIG_ENV_OFFSET		((128 + 256) << 10) +#define CONFIG_ENV_OFFSET_REDUND	((128 + 256 + 128) << 10) +#define CONFIG_ENV_SIZE			(128 << 10) + +/* + * Predefined environment variables. + * Usefull to define some easy to use boot commands. + */ +#define	CONFIG_EXTRA_ENV_SETTINGS					\ +									\ +	"basicargs=console=ttyS0,115200\0"				\ +									\ +	"mtdparts=mtdparts=atmel_nand:128k(bootstrap)ro,"		\ +		"256k(uboot)ro,128k(env1)ro,"				\ +		"128k(env2)ro,6M(linux),-(root)rw\0"			\ +									\ +	"flashboot=setenv bootargs ${basicargs} ${mtdparts} "		\ +		"root=/dev/mtdblock5 rootfstype=jffs2; "		\ +		"nand read 0x22000000 0x100000 0x600000; "		\ +		"bootm 22000000\0"					\ +									\ +	"sdboot=setenv bootargs ${basicargs} ${mtdparts} "		\ +		"root=/dev/mmcblk0p1 rootwait; "			\ +		"nand read 0x22000000 0x100000 0x600000; "		\ +		"bootm 22000000" + +/* Command line & features configuration */ +#include <config_cmd_default.h> +#undef CONFIG_CMD_FPGA +#undef CONFIG_CMD_IMI +#undef CONFIG_CMD_IMLS +#undef CONFIG_CMD_LOADS + +#define CONFIG_CMD_NAND +#define CONFIG_CMD_USB +#define CONFIG_CMD_FAT +#define CONFIG_CMD_LED + +#ifdef CONFIG_MACB +# define CONFIG_CMD_PING +# define CONFIG_CMD_DHCP +#else +# undef CONFIG_CMD_BOOTD +# undef CONFIG_CMD_NET +# undef CONFIG_CMD_NFS +#endif /* CONFIG_MACB */ + +#endif /* __CONFIG_H */ diff --git a/include/configs/tam3517-common.h b/include/configs/tam3517-common.h index 777f77cfc..a13fd9376 100644 --- a/include/configs/tam3517-common.h +++ b/include/configs/tam3517-common.h @@ -27,6 +27,7 @@   */  #define CONFIG_OMAP		/* in a TI OMAP core */  #define CONFIG_OMAP34XX		/* which is a 34XX */ +#define CONFIG_OMAP_GPIO  #define CONFIG_SYS_TEXT_BASE 0x80008000 @@ -47,7 +48,6 @@  #define V_OSCK			26000000	/* Clock output from T2 */  #define V_SCLK			(V_OSCK >> 1) -#undef CONFIG_USE_IRQ				/* no support for IRQs */  #define CONFIG_MISC_INIT_R  #define CONFIG_CMDLINE_TAG			/* enable passing of ATAGs */ @@ -124,6 +124,7 @@  #define CONFIG_CMD_NAND		/* NAND support			*/  #define CONFIG_CMD_PING  #define CONFIG_CMD_USB +#define CONFIG_CMD_EEPROM  #undef CONFIG_CMD_FLASH		/* only NAND on the SOM */  #undef CONFIG_CMD_IMLS @@ -134,6 +135,9 @@  #define CONFIG_SYS_I2C_SLAVE		1  #define CONFIG_SYS_I2C_BUS		0  #define CONFIG_SYS_I2C_BUS_SELECT	1 +#define CONFIG_SYS_I2C_EEPROM_ADDR	0x50		/* base address */ +#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN	1		/* bytes of address */ +#define CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW	0x07  #define CONFIG_DRIVER_OMAP34XX_I2C @@ -183,12 +187,6 @@  #define CONFIG_SYS_HZ			1000  /* - * Stack sizes - * The stack sizes are set up in start.S using the settings below - */ -#define CONFIG_STACKSIZE	(128 << 10)	/* regular stack 128 KiB */ - -/*   * Physical Memory Map   */  #define CONFIG_NR_DRAM_BANKS	2	/* CS1 may or may not be populated */ @@ -251,6 +249,7 @@  #define CONFIG_SPL_I2C_SUPPORT  #define CONFIG_SPL_LIBGENERIC_SUPPORT  #define CONFIG_SPL_SERIAL_SUPPORT +#define CONFIG_SPL_GPIO_SUPPORT  #define CONFIG_SPL_POWER_SUPPORT  #define CONFIG_SPL_NAND_SUPPORT  #define CONFIG_SPL_LDSCRIPT		"$(CPUDIR)/omap-common/u-boot-spl.lds" @@ -352,4 +351,66 @@  		"fi;"							\  		"else echo U-Boot not downloaded..exiting;fi\0"		\ + +/* + * this is common code for all TAM3517 boards. + * MAC address is stored from manufacturer in + * I2C EEPROM + */ +#if !(defined(__KERNEL_STRICT_NAMES) || defined(__ASSEMBLY__)) + +/* + * The I2C EEPROM on the TAM3517 contains + * mac address and production data + */ +struct tam3517_module_info { +	char customer[48]; +	char product[48]; + +	/* +	 * bit 0~47  : sequence number +	 * bit 48~55 : week of year, from 0. +	 * bit 56~63 : year +	 */ +	unsigned long long sequence_number; + +	/* +	 * bit 0~7   : revision fixed +	 * bit 8~15  : revision major +	 * bit 16~31 : TNxxx +	 */ +	unsigned int revision; +	unsigned char eth_addr[4][8]; +	unsigned char _rev[100]; +}; + +#define TAM3517_READ_MAC_FROM_EEPROM	\ +do {					\ +	struct tam3517_module_info info;\ +	char buf[80], ethname[20];	\ +	int i;				\ +	i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);	\ +	if (eeprom_read(CONFIG_SYS_I2C_EEPROM_ADDR, 0,		\ +			(void *)&info, sizeof(info)))		\ +		break;						\ +	memset(buf, 0, sizeof(buf));				\ +	for (i = 0 ; i < ARRAY_SIZE(info.eth_addr); i++) {	\ +		sprintf(buf, "%02X:%02X:%02X:%02X:%02X:%02X",	\ +			info.eth_addr[i][5],			\ +			info.eth_addr[i][4],			\ +			info.eth_addr[i][3],			\ +			info.eth_addr[i][2],			\ +			info.eth_addr[i][1],			\ +			info.eth_addr[i][0]);			\ +								\ +		if (i)						\ +			sprintf(ethname, "eth%daddr", i);	\ +		else						\ +			sprintf(ethname, "ethaddr");		\ +		printf("Setting %s from EEPROM with %s\n", ethname, buf);\ +		setenv(ethname, buf);				\ +	}							\ +} while (0) +#endif +  #endif /* __TAM3517_H */ diff --git a/include/configs/tec.h b/include/configs/tec.h index 3d0a78825..d5da3c7a8 100644 --- a/include/configs/tec.h +++ b/include/configs/tec.h @@ -26,33 +26,41 @@  #ifndef __CONFIG_H  #define __CONFIG_H -#include "tegra2-common.h" +#include "tegra20-common.h"  /* Enable fdt support for TEC. Flash the image in u-boot-dtb.bin */ -#define CONFIG_DEFAULT_DEVICE_TREE	tegra2-tec +#define CONFIG_DEFAULT_DEVICE_TREE	tegra20-tec  #define CONFIG_OF_CONTROL  #define CONFIG_OF_SEPARATE  /* High-level configuration options */ -#define V_PROMPT			"Tegra2 (TEC) # " -#define CONFIG_TEGRA2_BOARD_STRING	"Avionic Design Tamonten Evaluation Carrier" +#define V_PROMPT			"Tegra20 (TEC) # " +#define CONFIG_TEGRA_BOARD_STRING	"Avionic Design Tamonten Evaluation Carrier"  #define CONFIG_SYS_BOARD_ODMDATA	0x2b0d8011  /* Board-specific serial config */  #define CONFIG_SERIAL_MULTI -#define CONFIG_TEGRA2_ENABLE_UARTD	/* UARTD: debug UART */ +#define CONFIG_TEGRA_ENABLE_UARTD	/* UARTD: debug UART */  #define CONFIG_SYS_NS16550_COM1		NV_PA_APB_UARTD_BASE  #define CONFIG_BOARD_EARLY_INIT_F -#define CONFIG_ENV_IS_NOWHERE -  /* SD/MMC */  #define CONFIG_MMC  #define CONFIG_GENERIC_MMC  #define CONFIG_TEGRA_MMC  #define CONFIG_CMD_MMC +/* NAND support */ +#define CONFIG_CMD_NAND +#define CONFIG_TEGRA_NAND +#define CONFIG_SYS_MAX_NAND_DEVICE	1 +#define CONFIG_SYS_NAND_BASE		NV_PA_NAND_BASE + +/* Environment in NAND, aligned to start of last sector */ +#define CONFIG_ENV_IS_IN_NAND +#define CONFIG_ENV_OFFSET		(SZ_512M - SZ_128K) /* 128K sectors */ +  /* USB host support */  #define CONFIG_USB_EHCI  #define CONFIG_USB_EHCI_TEGRA @@ -79,4 +87,6 @@  	"ext2load mmc 0 0x17000000 /boot/uImage;"	\  	"bootm" +#include "tegra-common-post.h" +  #endif /* __CONFIG_H */ diff --git a/include/configs/tegra2-common-post.h b/include/configs/tegra-common-post.h index c21fc28df..168b64be5 100644 --- a/include/configs/tegra2-common-post.h +++ b/include/configs/tegra-common-post.h @@ -21,8 +21,8 @@   * MA 02111-1307 USA   */ -#ifndef __TEGRA2_COMMON_POST_H -#define __TEGRA2_COMMON_POST_H +#ifndef __TEGRA_COMMON_POST_H +#define __TEGRA_COMMON_POST_H  #ifdef CONFIG_BOOTCOMMAND @@ -141,9 +141,74 @@  #endif  #define CONFIG_EXTRA_ENV_SETTINGS \ -	TEGRA2_DEVICE_SETTINGS \ +	TEGRA_DEVICE_SETTINGS \  	"fdt_load=0x01000000\0" \  	"fdt_high=01100000\0" \  	BOOTCMDS_COMMON -#endif /* __TEGRA2_COMMON_POST_H */ +/* overrides for SPL build here */ +#ifdef CONFIG_SPL_BUILD + +/* remove devicetree support */ +#ifdef CONFIG_OF_CONTROL +#undef CONFIG_OF_CONTROL +#endif + +/* remove SERIAL_MULTI */ +#ifdef CONFIG_SERIAL_MULTI +#undef CONFIG_SERIAL_MULTI +#endif + +/* remove I2C support */ +#ifdef CONFIG_TEGRA_I2C +#undef CONFIG_TEGRA_I2C +#endif +#ifdef CONFIG_CMD_I2C +#undef CONFIG_CMD_I2C +#endif + +/* remove MMC support */ +#ifdef CONFIG_MMC +#undef CONFIG_MMC +#endif +#ifdef CONFIG_GENERIC_MMC +#undef CONFIG_GENERIC_MMC +#endif +#ifdef CONFIG_TEGRA_MMC +#undef CONFIG_TEGRA_MMC +#endif +#ifdef CONFIG_CMD_MMC +#undef CONFIG_CMD_MMC +#endif + +/* remove partitions/filesystems */ +#ifdef CONFIG_DOS_PARTITION +#undef CONFIG_DOS_PARTITION +#endif +#ifdef CONFIG_EFI_PARTITION +#undef CONFIG_EFI_PARTITION +#endif +#ifdef CONFIG_CMD_EXT2 +#undef CONFIG_CMD_EXT2 +#endif +#ifdef CONFIG_CMD_FAT +#undef CONFIG_CMD_FAT +#endif + +/* remove USB */ +#ifdef CONFIG_USB_EHCI +#undef CONFIG_USB_EHCI +#endif +#ifdef CONFIG_USB_EHCI_TEGRA +#undef CONFIG_USB_EHCI_TEGRA +#endif +#ifdef CONFIG_USB_STORAGE +#undef CONFIG_USB_STORAGE +#endif +#ifdef CONFIG_CMD_USB +#undef CONFIG_CMD_USB +#endif + +#endif /* CONFIG_SPL_BUILD */ + +#endif /* __TEGRA_COMMON_POST_H */ diff --git a/include/configs/tegra2-common.h b/include/configs/tegra20-common.h index 680776270..098cdb446 100644 --- a/include/configs/tegra2-common.h +++ b/include/configs/tegra20-common.h @@ -21,8 +21,8 @@   * MA 02111-1307 USA   */ -#ifndef __TEGRA2_COMMON_H -#define __TEGRA2_COMMON_H +#ifndef __TEGRA20_COMMON_H +#define __TEGRA20_COMMON_H  #include <asm/sizes.h>  /* @@ -37,15 +37,13 @@   * High Level Configuration Options   */  #define CONFIG_ARMCORTEXA9		/* This is an ARM V7 CPU core */ -#define CONFIG_TEGRA2			/* in a NVidia Tegra2 core */ -#define CONFIG_MACH_TEGRA_GENERIC	/* which is a Tegra generic machine */ +#define CONFIG_TEGRA20			/* in a NVidia Tegra20 core */ +#define CONFIG_TEGRA			/* which is a Tegra generic machine */  #define CONFIG_SYS_L2CACHE_OFF		/* No L2 cache */  #define CONFIG_SYS_CACHELINE_SIZE	32 -#define CONFIG_ARCH_CPU_INIT		/* Fire up the A9 core */ - -#include <asm/arch/tegra2.h>		/* get chip and board defs */ +#include <asm/arch/tegra20.h>		/* get chip and board defs */  /*   * Display CPU and Board information @@ -53,12 +51,10 @@  #define CONFIG_DISPLAY_CPUINFO  #define CONFIG_DISPLAY_BOARDINFO -#define CONFIG_SKIP_LOWLEVEL_INIT -  #define CONFIG_CMDLINE_TAG		/* enable passing of ATAGs */  #define CONFIG_OF_LIBFDT		/* enable passing of devicetree */ -#ifdef CONFIG_TEGRA2_LP0 +#ifdef CONFIG_TEGRA_LP0  #define TEGRA_LP0_ADDR			0x1C406000  #define TEGRA_LP0_SIZE			0x2000  #define TEGRA_LP0_VEC \ @@ -112,7 +108,7 @@  #define CONFIG_EHCI_IS_TDI  #define CONFIG_EHCI_DCACHE -/* Total I2C ports on Tegra2 */ +/* Total I2C ports on Tegra20 */  #define TEGRA_I2C_NUM_CONTROLLERS	4  /* include default commands */ @@ -136,9 +132,9 @@  /* Environment information, boards can override if required */  #define CONFIG_CONSOLE_MUX  #define CONFIG_SYS_CONSOLE_IS_IN_ENV -#define TEGRA2_DEVICE_SETTINGS	"stdin=serial\0" \ -					"stdout=serial\0" \ -					"stderr=serial\0" +#define TEGRA_DEVICE_SETTINGS	"stdin=serial\0" \ +				"stdout=serial\0" \ +				"stderr=serial\0"  #define CONFIG_LOADADDR		0x408000	/* def. location for kernel */  #define CONFIG_BOOTDELAY	2		/* -1 to disable auto boot */ @@ -161,28 +157,22 @@  /* Boot Argument Buffer Size */  #define CONFIG_SYS_BARGSIZE		(CONFIG_SYS_CBSIZE) -#define CONFIG_SYS_MEMTEST_START	(TEGRA2_SDRC_CS0 + 0x600000) +#define CONFIG_SYS_MEMTEST_START	(NV_PA_SDRC_CS0 + 0x600000)  #define CONFIG_SYS_MEMTEST_END		(CONFIG_SYS_MEMTEST_START + 0x100000)  #define CONFIG_SYS_LOAD_ADDR		(0xA00800)	/* default */  #define CONFIG_SYS_HZ			1000 -/*----------------------------------------------------------------------- - * Stack sizes - * - * The stack sizes are set up in start.S using the settings below - */  #define CONFIG_STACKBASE	0x2800000	/* 40MB */ -#define CONFIG_STACKSIZE	0x20000		/* 128K regular stack*/  /*-----------------------------------------------------------------------   * Physical Memory Map   */  #define CONFIG_NR_DRAM_BANKS	1 -#define PHYS_SDRAM_1		TEGRA2_SDRC_CS0 +#define PHYS_SDRAM_1		NV_PA_SDRC_CS0  #define PHYS_SDRAM_1_SIZE	0x20000000	/* 512M */ -#define CONFIG_SYS_TEXT_BASE	0x00108000 +#define CONFIG_SYS_TEXT_BASE	0x0010c000  #define CONFIG_SYS_SDRAM_BASE	PHYS_SDRAM_1  #define CONFIG_SYS_INIT_RAM_ADDR	CONFIG_STACKBASE @@ -195,4 +185,22 @@  #define CONFIG_CMD_GPIO  #define CONFIG_CMD_ENTERRCM  #define CONFIG_CMD_BOOTZ -#endif /* __TEGRA2_COMMON_H */ + +/* Defines for SPL */ +#define CONFIG_SPL +#define CONFIG_SPL_NAND_SIMPLE +#define CONFIG_SPL_TEXT_BASE		0x00108000 +#define CONFIG_SPL_MAX_SIZE		0x00004000 +#define CONFIG_SYS_SPL_MALLOC_START	0x00090000 +#define CONFIG_SYS_SPL_MALLOC_SIZE	0x00010000 +#define CONFIG_SPL_STACK		0x000ffffc + +#define CONFIG_SPL_LIBCOMMON_SUPPORT +#define CONFIG_SPL_LIBGENERIC_SUPPORT +#define CONFIG_SPL_SERIAL_SUPPORT +#define CONFIG_SPL_GPIO_SUPPORT +#define CONFIG_SPL_LDSCRIPT		"$(CPUDIR)/tegra20/u-boot-spl.lds" + +#define CONFIG_SYS_NAND_SELF_INIT + +#endif /* __TEGRA20_COMMON_H */ diff --git a/include/configs/tnetv107x_evm.h b/include/configs/tnetv107x_evm.h index 2272ad27c..23cab88de 100644 --- a/include/configs/tnetv107x_evm.h +++ b/include/configs/tnetv107x_evm.h @@ -55,7 +55,6 @@  #define CONFIG_SYS_MEMTEST_START	PHYS_SDRAM_1  #define CONFIG_SYS_MEMTEST_END		(PHYS_SDRAM_1 + 16*1024*1024)  #define CONFIG_NR_DRAM_BANKS		1 -#define CONFIG_STACKSIZE		(256*1024)  #define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM_1  #define CONFIG_SYS_INIT_RAM_SIZE	0x1000 diff --git a/include/configs/tny_a9260.h b/include/configs/tny_a9260.h index def530601..bc04a0094 100644 --- a/include/configs/tny_a9260.h +++ b/include/configs/tny_a9260.h @@ -59,7 +59,6 @@  #define CONFIG_SYS_HZ		        1000  #define CONFIG_ARCH_CPU_INIT -#undef CONFIG_USE_IRQ			/* we don't need IRQ/FIQ stuff	*/  #define CONFIG_CMDLINE_TAG	        /* enable passing of ATAGs	*/  #define CONFIG_SETUP_MEMORY_TAGS  #define CONFIG_INITRD_TAG @@ -166,10 +165,4 @@   */  #define CONFIG_SYS_MALLOC_LEN	ROUND(3 * CONFIG_ENV_SIZE + 128 * 1024, 0x1000) -#define CONFIG_STACKSIZE	(32 * 1024)	/* regular stack */ - -#ifdef CONFIG_USE_IRQ -#error CONFIG_USE_IRQ not supported -#endif -  #endif diff --git a/include/configs/top9000.h b/include/configs/top9000.h index 1a5f68068..7cc65773b 100644 --- a/include/configs/top9000.h +++ b/include/configs/top9000.h @@ -71,7 +71,6 @@  /* Misc CPU related */  #define CONFIG_ARCH_CPU_INIT -#undef	CONFIG_USE_IRQ			/* we don't need IRQ/FIQ stuff	*/  #define CONFIG_CMDLINE_TAG		/* enable passing of ATAGs */  #define CONFIG_SETUP_MEMORY_TAGS  #define CONFIG_INITRD_TAG @@ -303,9 +302,5 @@ extern void read_factory_r(void);  /* Size of malloc() pool */  #define CONFIG_SYS_MALLOC_LEN \  	ROUND(3 * CONFIG_ENV_SIZE + 128*1024, 0x1000) -#define CONFIG_STACKSIZE		(32*1024) -#ifdef CONFIG_USE_IRQ -#error CONFIG_USE_IRQ not supported -#endif  #endif diff --git a/include/configs/trats.h b/include/configs/trats.h index d2dfc9ff2..b3b5a3d5e 100644 --- a/include/configs/trats.h +++ b/include/configs/trats.h @@ -42,8 +42,10 @@  #define CONFIG_DISPLAY_CPUINFO  #define CONFIG_DISPLAY_BOARDINFO -/* Keep L2 Cache Disabled */ -#define CONFIG_SYS_L2CACHE_OFF +#ifndef CONFIG_SYS_L2CACHE_OFF +#define CONFIG_SYS_L2_PL310 +#define CONFIG_SYS_PL310_BASE	0x10502000 +#endif  #define CONFIG_SYS_SDRAM_BASE		0x40000000  #define CONFIG_SYS_TEXT_BASE		0x63300000 @@ -76,6 +78,7 @@  #define CONFIG_MMC  #define CONFIG_S5P_SDHCI  #define CONFIG_SDHCI +#define CONFIG_MMC_SDMA  /* PWM */  #define CONFIG_PWM @@ -95,6 +98,21 @@  #undef CONFIG_CMD_ONENAND  #undef CONFIG_CMD_MTDPARTS  #define CONFIG_CMD_MMC +#define CONFIG_CMD_DFU + +/* FAT */ +#define CONFIG_CMD_FAT +#define CONFIG_FAT_WRITE + +/* USB Composite download gadget - g_dnl */ +#define CONFIG_USBDOWNLOAD_GADGET +#define CONFIG_DFU_FUNCTION +#define CONFIG_DFU_MMC + +/* USB Samsung's IDs */ +#define CONFIG_G_DNL_VENDOR_NUM 0x04E8 +#define CONFIG_G_DNL_PRODUCT_NUM 0x6601 +#define CONFIG_G_DNL_MANUFACTURER "Samsung"  #define CONFIG_BOOTDELAY		1  #define CONFIG_ZERO_BOOTDELAY_CHECK @@ -105,6 +123,11 @@  #define CONFIG_BOOTBLOCK		"10"  #define CONFIG_ENV_COMMON_BOOT		"${console} ${meminfo}" +#define CONFIG_DFU_ALT \ +	"dfu_alt_info=" \ +	"u-boot mmc 80 400;" \ +	"uImage fat 0 2\0" \ +  #define CONFIG_ENV_OVERWRITE  #define CONFIG_SYS_CONSOLE_INFO_QUIET  #define CONFIG_SYS_CONSOLE_IS_IN_ENV @@ -144,10 +167,12 @@  	"meminfo=crashkernel=32M@0x50000000\0" \  	"nfsroot=/nfsroot/arm\0" \  	"bootblock=" CONFIG_BOOTBLOCK "\0" \ +	"loaduimage=fatload mmc ${mmcdev}:${mmcbootpart} 0x40007FC0 uImage\0" \  	"mmcdev=0\0" \  	"mmcbootpart=2\0" \  	"mmcrootpart=3\0" \ -	"opts=always_resume=1" +	"opts=always_resume=1\0" \ +	CONFIG_DFU_ALT  /* Miscellaneous configurable options */  #define CONFIG_SYS_LONGHELP		/* undef to save memory */ @@ -165,9 +190,6 @@  #define CONFIG_SYS_HZ			1000 -/* Stack sizes */ -#define CONFIG_STACKSIZE		(256 << 10) /* regular stack 256KB */ -  /* TRATS has 2 banks of DRAM */  #define CONFIG_NR_DRAM_BANKS	2  #define PHYS_SDRAM_1		CONFIG_SYS_SDRAM_BASE	/* LDDDR2 DMC 0 */ @@ -190,18 +212,28 @@  #define CONFIG_SYS_INIT_SP_ADDR	(CONFIG_SYS_LOAD_ADDR - GENERATED_GBL_DATA_SIZE)  #define CONFIG_SYS_CACHELINE_SIZE       32 -#include <asm/arch/gpio.h> -/* - * I2C Settings - */ -#define CONFIG_SOFT_I2C_GPIO_SCL exynos4_gpio_part1_get_nr(b, 7) -#define CONFIG_SOFT_I2C_GPIO_SDA exynos4_gpio_part1_get_nr(b, 6)  #define CONFIG_SOFT_I2C  #define CONFIG_SOFT_I2C_READ_REPEATED_START +#define CONFIG_SYS_I2C_INIT_BOARD  #define CONFIG_SYS_I2C_SPEED	50000  #define CONFIG_I2C_MULTI_BUS -#define CONFIG_SYS_MAX_I2C_BUS	7 +#define CONFIG_SOFT_I2C_MULTI_BUS +#define CONFIG_SYS_MAX_I2C_BUS	15 + +#include <asm/arch/gpio.h> + +/* I2C PMIC */ +#define CONFIG_SOFT_I2C_I2C5_SCL exynos4_gpio_part1_get_nr(b, 7) +#define CONFIG_SOFT_I2C_I2C5_SDA exynos4_gpio_part1_get_nr(b, 6) + +/* I2C FG */ +#define CONFIG_SOFT_I2C_I2C9_SCL exynos4_gpio_part2_get_nr(y4, 1) +#define CONFIG_SOFT_I2C_I2C9_SDA exynos4_gpio_part2_get_nr(y4, 0) + +#define CONFIG_SOFT_I2C_GPIO_SCL get_multi_scl_pin() +#define CONFIG_SOFT_I2C_GPIO_SDA get_multi_sda_pin() +#define I2C_INIT multi_i2c_init()  #define CONFIG_PMIC  #define CONFIG_PMIC_I2C @@ -210,6 +242,7 @@  #define CONFIG_USB_GADGET  #define CONFIG_USB_GADGET_S3C_UDC_OTG  #define CONFIG_USB_GADGET_DUALSPEED +#define CONFIG_USB_GADGET_VBUS_DRAW	2  /* LCD */  #define CONFIG_EXYNOS_FB diff --git a/include/configs/tricorder.h b/include/configs/tricorder.h index 56336ae19..63c98dc72 100644 --- a/include/configs/tricorder.h +++ b/include/configs/tricorder.h @@ -58,7 +58,6 @@  #define V_OSCK				26000000 /* Clock output from T2 */  #define V_SCLK				(V_OSCK >> 1) -#undef CONFIG_USE_IRQ			/* no support for IRQs */  #define CONFIG_MISC_INIT_R  #define CONFIG_CMDLINE_TAG		/* enable passing of ATAGs */ @@ -245,9 +244,6 @@  #define CONFIG_SYS_PTV			2 /* Divisor: 2^(PTV+1) => 8 */  #define CONFIG_SYS_HZ			1000 -/* The stack sizes are set up in start.S using the settings below */ -#define CONFIG_STACKSIZE		(128 << 10) /* regular stack 128 KiB */ -  /*  Physical Memory Map  */  #define CONFIG_NR_DRAM_BANKS		2 /* CS1 may or may not be populated */  #define PHYS_SDRAM_1			OMAP34XX_SDRC_CS0 diff --git a/include/configs/trimslice.h b/include/configs/trimslice.h index 34be8a98a..a46890c09 100644 --- a/include/configs/trimslice.h +++ b/include/configs/trimslice.h @@ -25,21 +25,21 @@  #define __CONFIG_H  #include <asm/sizes.h> -#include "tegra2-common.h" +#include "tegra20-common.h"  /* Enable fdt support for TrimSlice. Flash the image in u-boot-dtb.bin */ -#define CONFIG_DEFAULT_DEVICE_TREE	tegra2-trimslice +#define CONFIG_DEFAULT_DEVICE_TREE	tegra20-trimslice  #define CONFIG_OF_CONTROL  #define CONFIG_OF_SEPARATE  /* High-level configuration options */ -#define V_PROMPT		"Tegra2 (TrimSlice) # " -#define CONFIG_TEGRA2_BOARD_STRING	"Compulab Trimslice" +#define V_PROMPT		"Tegra20 (TrimSlice) # " +#define CONFIG_TEGRA_BOARD_STRING	"Compulab Trimslice"  /* Board-specific serial config */  #define CONFIG_SERIAL_MULTI -#define CONFIG_TEGRA2_ENABLE_UARTA -#define CONFIG_TEGRA2_UARTA_GPU +#define CONFIG_TEGRA_ENABLE_UARTA +#define CONFIG_TEGRA_UARTA_GPU  #define CONFIG_SYS_NS16550_COM1		NV_PA_APB_UARTA_BASE  #define CONFIG_MACH_TYPE		MACH_TYPE_TRIMSLICE @@ -94,6 +94,6 @@  #define CONFIG_CMD_NET  #define CONFIG_CMD_DHCP -#include "tegra2-common-post.h" +#include "tegra-common-post.h"  #endif /* __CONFIG_H */ diff --git a/include/configs/trizepsiv.h b/include/configs/trizepsiv.h index b4ec8f0c3..151059a93 100644 --- a/include/configs/trizepsiv.h +++ b/include/configs/trizepsiv.h @@ -46,8 +46,6 @@  #define CONFIG_BOARD_LATE_INIT  #define	CONFIG_SYS_TEXT_BASE	0x0 -#undef CONFIG_USE_IRQ			/* we don't need IRQ/FIQ stuff */ -  /* we will never enable dcache, because we have to setup MMU first */  #define CONFIG_SYS_DCACHE_OFF @@ -178,17 +176,6 @@  #endif  /* - * Stack sizes - * - * The stack sizes are set up in start.S using the settings below - */ -#define CONFIG_STACKSIZE	(128*1024)	/* regular stack */ -#ifdef CONFIG_USE_IRQ -#define CONFIG_STACKSIZE_IRQ	(4*1024)	/* IRQ stack */ -#define CONFIG_STACKSIZE_FIQ	(4*1024)	/* FIQ stack */ -#endif - -/*   * Physical Memory Map   */  #define CONFIG_NR_DRAM_BANKS	4	   /* we have 2 banks of DRAM */ diff --git a/include/configs/tt01.h b/include/configs/tt01.h index 2b2e7fd8c..f46efa55f 100644 --- a/include/configs/tt01.h +++ b/include/configs/tt01.h @@ -31,8 +31,6 @@  /* High Level Configuration Options */  #define CONFIG_ARM1136  #define CONFIG_MX31 -#define CONFIG_MX31_HCLK_FREQ	26000000 -#define CONFIG_MX31_CLK32	32768  #define CONFIG_DISPLAY_CPUINFO  #define CONFIG_DISPLAY_BOARDINFO @@ -86,9 +84,6 @@  /* default load address, 1MB up the road */  #define CONFIG_SYS_LOAD_ADDR		(PHYS_SDRAM_1+0x100000) -/* The stack sizes are set up in start.S using the settings below */ -#define CONFIG_STACKSIZE	(128 * 1024)	/* regular stack */ -  /* Size of malloc() pool, make sure possible frame buffer fits */  #define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + 10*1024*1024) diff --git a/include/configs/tx25.h b/include/configs/tx25.h index 682152897..71b1d326d 100644 --- a/include/configs/tx25.h +++ b/include/configs/tx25.h @@ -84,7 +84,6 @@  /* 8MB DRAM test */  #define CONFIG_SYS_MEMTEST_START	PHYS_SDRAM_1  #define CONFIG_SYS_MEMTEST_END		(PHYS_SDRAM_1+0x0800000) -#define CONFIG_STACKSIZE	(256 * 1024)	/* regular stack */  /*   * Serial Info @@ -108,7 +107,6 @@  /* NAND */  #define CONFIG_NAND_MXC -#define CONFIG_NAND_MXC_V1_1  #define CONFIG_MXC_NAND_REGS_BASE	(0xBB000000)  #define CONFIG_SYS_MAX_NAND_DEVICE	1  #define CONFIG_SYS_NAND_BASE		(0xBB000000) diff --git a/include/configs/u8500_href.h b/include/configs/u8500_href.h index b26efec57..1bb612826 100644 --- a/include/configs/u8500_href.h +++ b/include/configs/u8500_href.h @@ -178,16 +178,6 @@  #define CONFIG_SYS_I2C_GPIOE_ADDR	0x42	/* GPIO expander chip addr */  #define CONFIG_TC35892_GPIO -/* - * Stack sizes - * - * The stack sizes are set up in start.S using the settings below - */ - -#ifdef CONFIG_USE_IRQ -#define CONFIG_STACKSIZE_IRQ		(4*1024)	/* IRQ stack */ -#define CONFIG_STACKSIZE_FIQ		(4*1024)	/* FIQ stack */ -#endif  /*   * Physical Memory Map diff --git a/include/configs/vct.h b/include/configs/vct.h index 0a5ce6459..b4b094952 100644 --- a/include/configs/vct.h +++ b/include/configs/vct.h @@ -47,7 +47,6 @@  #define CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_TEXT_BASE  #define CONFIG_SYS_MONITOR_LEN		(256 << 10) -#define CONFIG_STACKSIZE		(256 << 10)  #define CONFIG_SYS_MALLOC_LEN		(1 << 20)  #define CONFIG_SYS_BOOTPARAMS_LEN	(128 << 10)  #define CONFIG_SYS_INIT_SP_OFFSET	0x400000 diff --git a/include/configs/ventana.h b/include/configs/ventana.h index 5e4d53861..7d3a54f74 100644 --- a/include/configs/ventana.h +++ b/include/configs/ventana.h @@ -25,20 +25,20 @@  #define __CONFIG_H  #include <asm/sizes.h> -#include "tegra2-common.h" +#include "tegra20-common.h"  /* Enable fdt support for Ventana. Flash the image in u-boot-dtb.bin */ -#define CONFIG_DEFAULT_DEVICE_TREE	tegra2-ventana +#define CONFIG_DEFAULT_DEVICE_TREE	tegra20-ventana  #define CONFIG_OF_CONTROL  #define CONFIG_OF_SEPARATE  /* High-level configuration options */ -#define V_PROMPT		"Tegra2 (Ventana) # " -#define CONFIG_TEGRA2_BOARD_STRING	"NVIDIA Ventana" +#define V_PROMPT		"Tegra20 (Ventana) # " +#define CONFIG_TEGRA_BOARD_STRING	"NVIDIA Ventana"  /* Board-specific serial config */  #define CONFIG_SERIAL_MULTI -#define CONFIG_TEGRA2_ENABLE_UARTD +#define CONFIG_TEGRA_ENABLE_UARTD  #define CONFIG_SYS_NS16550_COM1		NV_PA_APB_UARTD_BASE  #define CONFIG_MACH_TYPE		MACH_TYPE_VENTANA @@ -58,8 +58,9 @@  /* Environment in eMMC, at the end of 2nd "boot sector" */  #define CONFIG_ENV_IS_IN_MMC -#define CONFIG_ENV_OFFSET ((2 * 1024 * 1024) - CONFIG_ENV_SIZE) +#define CONFIG_ENV_OFFSET ((1024 * 1024) - CONFIG_ENV_SIZE)  #define CONFIG_SYS_MMC_ENV_DEV 0 +#define CONFIG_SYS_MMC_ENV_PART 2  /* USB Host support */  #define CONFIG_USB_EHCI @@ -75,6 +76,6 @@  #define CONFIG_CMD_NET  #define CONFIG_CMD_DHCP -#include "tegra2-common-post.h" +#include "tegra-common-post.h"  #endif /* __CONFIG_H */ diff --git a/include/configs/versatile.h b/include/configs/versatile.h index ff23a92d9..38f5302e7 100644 --- a/include/configs/versatile.h +++ b/include/configs/versatile.h @@ -145,17 +145,6 @@  #define CONFIG_SYS_LOAD_ADDR	0x7fc0	/* default load address */  /*----------------------------------------------------------------------- - * Stack sizes - * - * The stack sizes are set up in start.S using the settings below - */ -#define CONFIG_STACKSIZE	(128 * 1024)	/* regular stack */ -#ifdef CONFIG_USE_IRQ -#define CONFIG_STACKSIZE_IRQ	(4 * 1024)	/* IRQ stack */ -#define CONFIG_STACKSIZE_FIQ	(4 * 1024)	/* FIQ stack */ -#endif - -/*-----------------------------------------------------------------------   * Physical Memory Map   */  #define CONFIG_NR_DRAM_BANKS	1	/* we have 1 bank of DRAM */ diff --git a/include/configs/vision2.h b/include/configs/vision2.h index ed004a659..fba897c1e 100644 --- a/include/configs/vision2.h +++ b/include/configs/vision2.h @@ -177,11 +177,6 @@  #define CONFIG_SYS_HUSH_PARSER  /* - * Stack sizes - */ -#define CONFIG_STACKSIZE		(128 * 1024)	/* regular stack */ - -/*   * Physical Memory Map   */  #define CONFIG_NR_DRAM_BANKS		2 @@ -214,6 +209,8 @@  #define CONFIG_VIDEO_IPUV3  #define CONFIG_CFB_CONSOLE  #define CONFIG_VGA_AS_SINGLE_DEVICE +#define CONFIG_SYS_CONSOLE_IS_IN_ENV +#define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE  #define CONFIG_VIDEO_BMP_RLE8  #define CONFIG_SPLASH_SCREEN  #define CONFIG_CMD_BMP diff --git a/include/configs/vl_ma2sc.h b/include/configs/vl_ma2sc.h index 24f89c98e..e2cf4f005 100644 --- a/include/configs/vl_ma2sc.h +++ b/include/configs/vl_ma2sc.h @@ -29,7 +29,6 @@  /*--------------------------------------------------------------------------*/ -#undef CONFIG_USE_IRQ			/* we don't need IRQ/FIQ stuff	*/  #define CONFIG_ARM926EJS		/* This is an ARM926EJS Core	*/  #define CONFIG_AT91FAMILY  #define CONFIG_AT91SAM9263		/* It's an Atmel AT91SAM9263 SoC*/ @@ -379,8 +378,6 @@  	ROUND(3 * CONFIG_ENV_SIZE + 128 * 1024, 0x1000)  #define CONFIG_SYS_GBL_DATA_SIZE	128	/* 128 bytes for initial data */ -#define CONFIG_STACKSIZE	(32*1024)	/* regular stack */ -  #ifndef CONFIG_RAMLOAD  #define CONFIG_BOOTCOMMAND		"run nfsboot"  #endif @@ -454,10 +451,4 @@  		"erase 10060000 1007FFFF;reset\0"			\  	" " -/*--------------------------------------------------------------------------*/ - -#ifdef CONFIG_USE_IRQ -#error CONFIG_USE_IRQ not supported -#endif -  #endif diff --git a/include/configs/vpac270.h b/include/configs/vpac270.h index 01f0b6ce5..424a90245 100644 --- a/include/configs/vpac270.h +++ b/include/configs/vpac270.h @@ -165,14 +165,6 @@  #define	CONFIG_SYS_HZ			1000		/* Timer @ 3250000 Hz */  #define	CONFIG_SYS_CPUSPEED		0x190		/* 312MHz */ -/* - * Stack sizes - */ -#define	CONFIG_STACKSIZE		(128*1024)	/* regular stack */ -#ifdef	CONFIG_USE_IRQ -#define	CONFIG_STACKSIZE_IRQ		(4*1024)	/* IRQ stack */ -#define	CONFIG_STACKSIZE_FIQ		(4*1024)	/* FIQ stack */ -#endif  /*   * DRAM Map diff --git a/include/configs/whistler.h b/include/configs/whistler.h index f2952d5f4..6c565bae1 100644 --- a/include/configs/whistler.h +++ b/include/configs/whistler.h @@ -25,21 +25,21 @@  #define __CONFIG_H  #include <asm/sizes.h> -#include "tegra2-common.h" +#include "tegra20-common.h"  /* Enable fdt support for Whistler. Flash the image in u-boot-dtb.bin */ -#define CONFIG_DEFAULT_DEVICE_TREE	tegra2-whistler +#define CONFIG_DEFAULT_DEVICE_TREE	tegra20-whistler  #define CONFIG_OF_CONTROL  #define CONFIG_OF_SEPARATE  /* High-level configuration options */ -#define V_PROMPT		"Tegra2 (Whistler) # " -#define CONFIG_TEGRA2_BOARD_STRING	"NVIDIA Whistler" +#define V_PROMPT		"Tegra20 (Whistler) # " +#define CONFIG_TEGRA_BOARD_STRING	"NVIDIA Whistler"  /* Board-specific serial config */  #define CONFIG_SERIAL_MULTI -#define CONFIG_TEGRA2_ENABLE_UARTA -#define CONFIG_TEGRA2_UARTA_UAA_UAB +#define CONFIG_TEGRA_ENABLE_UARTA +#define CONFIG_TEGRA_UARTA_UAA_UAB  #define CONFIG_SYS_NS16550_COM1		NV_PA_APB_UARTA_BASE  #define CONFIG_MACH_TYPE		MACH_TYPE_WHISTLER @@ -72,8 +72,9 @@   * particular card is standard practice as far as I know.   */  #define CONFIG_ENV_IS_IN_MMC -#define CONFIG_ENV_OFFSET ((2 * 512 * 1024) - CONFIG_ENV_SIZE) +#define CONFIG_ENV_OFFSET ((512 * 1024) - CONFIG_ENV_SIZE)  #define CONFIG_SYS_MMC_ENV_DEV 0 +#define CONFIG_SYS_MMC_ENV_PART 2  /* USB Host support */  #define CONFIG_USB_EHCI @@ -89,6 +90,6 @@  #define CONFIG_CMD_NET  #define CONFIG_CMD_DHCP -#include "tegra2-common-post.h" +#include "tegra-common-post.h"  #endif /* __CONFIG_H */ diff --git a/include/configs/xaeniax.h b/include/configs/xaeniax.h index 0ed3bf4a8..e399e9501 100644 --- a/include/configs/xaeniax.h +++ b/include/configs/xaeniax.h @@ -44,12 +44,8 @@  #define CONFIG_XAENIAX		1	/* on a xaeniax board	    */  #define	CONFIG_SYS_TEXT_BASE	0x0 -  #define CONFIG_BOARD_LATE_INIT - -#undef CONFIG_USE_IRQ			/* we don't need IRQ/FIQ stuff */ -  /* we will never enable dcache, because we have to setup MMU first */  #define CONFIG_SYS_DCACHE_OFF @@ -182,17 +178,6 @@  #define CONFIG_ENV_SIZE		0x40000			/* Total Size of Environment Sector	*/  /* - * Stack sizes - * - * The stack sizes are set up in start.S using the settings below - */ -#define CONFIG_STACKSIZE	(128*1024)	/* regular stack */ -#ifdef CONFIG_USE_IRQ -#define CONFIG_STACKSIZE_IRQ	(4*1024)	/* IRQ stack */ -#define CONFIG_STACKSIZE_FIQ	(4*1024)	/* FIQ stack */ -#endif - -/*   * SMSC91C111 Network Card   */  #define CONFIG_SMC91111		1 diff --git a/include/configs/zipitz2.h b/include/configs/zipitz2.h index 8e6377019..8b7e05b9e 100644 --- a/include/configs/zipitz2.h +++ b/include/configs/zipitz2.h @@ -30,7 +30,6 @@  #define	CONFIG_SYS_TEXT_BASE	0x0  #undef	CONFIG_BOARD_LATE_INIT -#undef	CONFIG_USE_IRQ  #undef	CONFIG_SKIP_LOWLEVEL_INIT  #define	CONFIG_PREBOOT @@ -154,15 +153,6 @@ unsigned char zipitz2_spi_read(void);  #define CONFIG_SYS_CPUSPEED		0x190		/* standard setting for 312MHz; L=16, N=1.5, A=0, SDCLK!=SystemBus */  /* - * Stack sizes - */ -#define	CONFIG_STACKSIZE		(128*1024)	/* regular stack */ -#ifdef	CONFIG_USE_IRQ -#define	CONFIG_STACKSIZE_IRQ		(4*1024)	/* IRQ stack */ -#define	CONFIG_STACKSIZE_FIQ		(4*1024)	/* FIQ stack */ -#endif - -/*   * SRAM Map   */  #define	PHYS_SRAM			0x5c000000	/* SRAM Bank #1 */ diff --git a/include/configs/zmx25.h b/include/configs/zmx25.h index c9f737d42..447683a49 100644 --- a/include/configs/zmx25.h +++ b/include/configs/zmx25.h @@ -28,7 +28,6 @@  #define CONFIG_ARM926EJS			/* arm926ejs CPU core */  #define CONFIG_MX25 -#define CONFIG_MX25_CLK32		32768	/* OSC32K frequency */  #define CONFIG_SYS_HZ			1000  #define CONFIG_SYS_TEXT_BASE		0xA0000000 @@ -171,6 +170,5 @@   * Size of malloc() pool   */  #define CONFIG_SYS_MALLOC_LEN		(0x400000 - 0x8000) -#define CONFIG_STACKSIZE		(32*1024)	/* regular stack */  #endif	/* __CONFIG_H */ diff --git a/include/cpsw.h b/include/cpsw.h new file mode 100644 index 000000000..296b0e557 --- /dev/null +++ b/include/cpsw.h @@ -0,0 +1,51 @@ +/* + * CPSW Ethernet Switch Driver + * + * Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/ + * + * 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 version 2. + * + * This program is distributed "as is" WITHOUT ANY WARRANTY of any + * kind, whether express or implied; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#ifndef _CPSW_H_ +#define _CPSW_H_ + +struct cpsw_slave_data { +	u32		slave_reg_ofs; +	u32		sliver_reg_ofs; +	int		phy_id; +	int		phy_if; +}; + +enum { +	CPSW_CTRL_VERSION_1 = 0, +	CPSW_CTRL_VERSION_2	/* am33xx like devices */ +}; + +struct cpsw_platform_data { +	u32	mdio_base; +	u32	cpsw_base; +	int	mdio_div; +	int	channels;	/* number of cpdma channels (symmetric)	*/ +	u32	cpdma_reg_ofs;	/* cpdma register offset		*/ +	int	slaves;		/* number of slave cpgmac ports		*/ +	u32	ale_reg_ofs;	/* address lookup engine reg offset	*/ +	int	ale_entries;	/* ale table size			*/ +	u32	host_port_reg_ofs;	/* cpdma host port registers	*/ +	u32	hw_stats_reg_ofs;	/* cpsw hw stats counters	*/ +	u32	mac_control; +	struct cpsw_slave_data	*slave_data; +	void	(*control)(int enabled); +	u32	host_port_num; +	u8	version; +}; + +int cpsw_register(struct cpsw_platform_data *data); + +#endif /* _CPSW_H_  */ diff --git a/include/dfu.h b/include/dfu.h new file mode 100644 index 000000000..5350d7945 --- /dev/null +++ b/include/dfu.h @@ -0,0 +1,103 @@ +/* + * dfu.h - DFU flashable area description + * + * Copyright (C) 2012 Samsung Electronics + * authors: Andrzej Pietrasiewicz <andrzej.p@samsung.com> + *	    Lukasz Majewski <l.majewski@samsung.com> + * + * 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 __DFU_ENTITY_H_ +#define __DFU_ENTITY_H_ + +#include <common.h> +#include <linux/list.h> +#include <mmc.h> + +enum dfu_device_type { +	DFU_DEV_MMC = 1, +	DFU_DEV_ONENAND, +	DFU_DEV_NAND, +}; + +enum dfu_layout { +	DFU_RAW_ADDR = 1, +	DFU_FS_FAT, +	DFU_FS_EXT2, +	DFU_FS_EXT3, +	DFU_FS_EXT4, +}; + +struct mmc_internal_data { +	/* RAW programming */ +	unsigned int lba_start; +	unsigned int lba_size; +	unsigned int lba_blk_size; + +	/* FAT/EXT */ +	unsigned int dev; +	unsigned int part; +}; + +static inline unsigned int get_mmc_blk_size(int dev) +{ +	return find_mmc_device(dev)->read_bl_len; +} + +#define DFU_NAME_SIZE 32 +#define DFU_CMD_BUF_SIZE 128 +#define DFU_DATA_BUF_SIZE (1024*1024*4) /* 4 MiB */ + +struct dfu_entity { +	char			name[DFU_NAME_SIZE]; +	int                     alt; +	void                    *dev_private; +	int                     dev_num; +	enum dfu_device_type    dev_type; +	enum dfu_layout         layout; + +	union { +		struct mmc_internal_data mmc; +	} data; + +	int (*read_medium)(struct dfu_entity *dfu, void *buf, long *len); +	int (*write_medium)(struct dfu_entity *dfu, void *buf, long *len); + +	struct list_head list; +}; + +int dfu_config_entities(char *s, char *interface, int num); +void dfu_free_entities(void); +void dfu_show_entities(void); +int dfu_get_alt_number(void); +const char *dfu_get_dev_type(enum dfu_device_type t); +const char *dfu_get_layout(enum dfu_layout l); +struct dfu_entity *dfu_get_entity(int alt); +char *dfu_extract_token(char** e, int *n); + +int dfu_read(struct dfu_entity *de, void *buf, int size, int blk_seq_num); +int dfu_write(struct dfu_entity *de, void *buf, int size, int blk_seq_num); +/* Device specific */ +#ifdef CONFIG_DFU_MMC +extern int dfu_fill_entity_mmc(struct dfu_entity *dfu, char *s); +#else +static inline int dfu_fill_entity_mmc(struct dfu_entity *dfu, char *s) +{ +	puts("MMC support not available!\n"); +	return -1; +} +#endif +#endif /* __DFU_ENTITY_H_ */ diff --git a/include/environment.h b/include/environment.h index ae3f7b6ae..e8ab7033b 100644 --- a/include/environment.h +++ b/include/environment.h @@ -181,9 +181,21 @@ void env_crc_update(void);  /* [re]set to the default environment */  void set_default_env(const char *s); +/* [re]set individual variables to their value in the default environment */ +int set_default_vars(int nvars, char * const vars[]); +  /* Import from binary representation into hash table */  int env_import(const char *buf, int check); +/* + * Check if variable "name" can be changed from oldval to newval, + * and if so, apply the changes (e.g. baudrate). + * When (flag & H_FORCE) is set, it does not print out any error + * message and forces overwriting of write-once variables. + */ +int env_check_apply(const char *name, const char *oldval, +			const char *newval, int flag); +  #endif /* DO_DEPS_ONLY */  #endif /* _ENVIRONMENT_H_ */ diff --git a/include/ext2fs.h b/include/ext2fs.h deleted file mode 100644 index 163a9bbc0..000000000 --- a/include/ext2fs.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - *  GRUB  --  GRand Unified Bootloader - *  Copyright (C) 2000, 2001  Free Software Foundation, Inc. - * - *  (C) Copyright 2003 Sysgo Real-Time Solutions, AG <www.elinos.com> - *  Pavel Bartusek <pba@sysgo.de> - * - *  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., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -/* An implementation for the Ext2FS filesystem ported from GRUB. - * Some parts of this code (mainly the structures and defines) are - * from the original ext2 fs code, as found in the linux kernel. - */ - - -#define SECTOR_SIZE		0x200 -#define SECTOR_BITS		9 - -/* Error codes */ -typedef enum -{ -  ERR_NONE = 0, -  ERR_BAD_FILENAME, -  ERR_BAD_FILETYPE, -  ERR_BAD_GZIP_DATA, -  ERR_BAD_GZIP_HEADER, -  ERR_BAD_PART_TABLE, -  ERR_BAD_VERSION, -  ERR_BELOW_1MB, -  ERR_BOOT_COMMAND, -  ERR_BOOT_FAILURE, -  ERR_BOOT_FEATURES, -  ERR_DEV_FORMAT, -  ERR_DEV_VALUES, -  ERR_EXEC_FORMAT, -  ERR_FILELENGTH, -  ERR_FILE_NOT_FOUND, -  ERR_FSYS_CORRUPT, -  ERR_FSYS_MOUNT, -  ERR_GEOM, -  ERR_NEED_LX_KERNEL, -  ERR_NEED_MB_KERNEL, -  ERR_NO_DISK, -  ERR_NO_PART, -  ERR_NUMBER_PARSING, -  ERR_OUTSIDE_PART, -  ERR_READ, -  ERR_SYMLINK_LOOP, -  ERR_UNRECOGNIZED, -  ERR_WONT_FIT, -  ERR_WRITE, -  ERR_BAD_ARGUMENT, -  ERR_UNALIGNED, -  ERR_PRIVILEGED, -  ERR_DEV_NEED_INIT, -  ERR_NO_DISK_SPACE, -  ERR_NUMBER_OVERFLOW, - -  MAX_ERR_NUM -} ext2fs_error_t; - - -extern int ext2fs_set_blk_dev(block_dev_desc_t *rbdd, int part); -extern int ext2fs_ls (const char *dirname); -extern int ext2fs_open (const char *filename); -extern int ext2fs_read (char *buf, unsigned len); -extern int ext2fs_mount (unsigned part_length); -extern int ext2fs_close(void); diff --git a/include/ext4fs.h b/include/ext4fs.h new file mode 100644 index 000000000..ab2983ceb --- /dev/null +++ b/include/ext4fs.h @@ -0,0 +1,144 @@ +/* + * (C) Copyright 2011 - 2012 Samsung Electronics + * EXT4 filesystem implementation in Uboot by + * Uma Shankar <uma.shankar@samsung.com> + * Manjunatha C Achar <a.manjunatha@samsung.com> + * + * Ext4 Extent data structures are taken from  original ext4 fs code + * as found in the linux kernel. + * + * Copyright (c) 2003-2006, Cluster File Systems, Inc, info@clusterfs.com + * Written by Alex Tomas <alex@clusterfs.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef __EXT4__ +#define __EXT4__ +#include <ext_common.h> + +#define EXT4_EXTENTS_FL		0x00080000 /* Inode uses extents */ +#define EXT4_EXT_MAGIC			0xf30a +#define EXT4_FEATURE_RO_COMPAT_GDT_CSUM	0x0010 +#define EXT4_FEATURE_INCOMPAT_EXTENTS	0x0040 +#define EXT4_INDIRECT_BLOCKS		12 + +#define EXT4_BG_INODE_UNINIT		0x0001 +#define EXT4_BG_BLOCK_UNINIT		0x0002 +#define EXT4_BG_INODE_ZEROED		0x0004 + +/* + * ext4_inode has i_block array (60 bytes total). + * The first 12 bytes store ext4_extent_header; + * the remainder stores an array of ext4_extent. + */ + +/* + * This is the extent on-disk structure. + * It's used at the bottom of the tree. + */ +struct ext4_extent { +	__le32	ee_block;	/* first logical block extent covers */ +	__le16	ee_len;		/* number of blocks covered by extent */ +	__le16	ee_start_hi;	/* high 16 bits of physical block */ +	__le32	ee_start_lo;	/* low 32 bits of physical block */ +}; + +/* + * This is index on-disk structure. + * It's used at all the levels except the bottom. + */ +struct ext4_extent_idx { +	__le32	ei_block;	/* index covers logical blocks from 'block' */ +	__le32	ei_leaf_lo;	/* pointer to the physical block of the next * +				 * level. leaf or next index could be there */ +	__le16	ei_leaf_hi;	/* high 16 bits of physical block */ +	__u16	ei_unused; +}; + +/* Each block (leaves and indexes), even inode-stored has header. */ +struct ext4_extent_header { +	__le16	eh_magic;	/* probably will support different formats */ +	__le16	eh_entries;	/* number of valid entries */ +	__le16	eh_max;		/* capacity of store in entries */ +	__le16	eh_depth;	/* has tree real underlying blocks? */ +	__le32	eh_generation;	/* generation of the tree */ +}; + +struct ext_filesystem { +	/* Total Sector of partition */ +	uint64_t total_sect; +	/* Block size  of partition */ +	uint32_t blksz; +	/* Inode size of partition */ +	uint32_t inodesz; +	/* Sectors per Block */ +	uint32_t sect_perblk; +	/* Group Descriptor Block Number */ +	uint32_t gdtable_blkno; +	/* Total block groups of partition */ +	uint32_t no_blkgrp; +	/* No of blocks required for bgdtable */ +	uint32_t no_blk_pergdt; +	/* Superblock */ +	struct ext2_sblock *sb; +	/* Block group descritpor table */ +	struct ext2_block_group *gd; +	char *gdtable; + +	/* Block Bitmap Related */ +	unsigned char **blk_bmaps; +	long int curr_blkno; +	uint16_t first_pass_bbmap; + +	/* Inode Bitmap Related */ +	unsigned char **inode_bmaps; +	int curr_inode_no; +	uint16_t first_pass_ibmap; + +	/* Journal Related */ + +	/* Block Device Descriptor */ +	block_dev_desc_t *dev_desc; +}; + +extern block_dev_desc_t *ext4_dev_desc; +extern struct ext2_data *ext4fs_root; +extern struct ext2fs_node *ext4fs_file; + +#if defined(CONFIG_CMD_EXT4_WRITE) +extern struct ext2_inode *g_parent_inode; +extern int gd_index; +extern int gindex; + +int ext4fs_init(void); +void ext4fs_deinit(void); +int ext4fs_filename_check(char *filename); +int ext4fs_write(const char *fname, unsigned char *buffer, +				unsigned long sizebytes); +#endif + +struct ext_filesystem *get_fs(void); +int init_fs(block_dev_desc_t *dev_desc); +void deinit_fs(block_dev_desc_t *dev_desc); +int ext4fs_open(const char *filename); +int ext4fs_read(char *buf, unsigned len); +int ext4fs_mount(unsigned part_length); +void ext4fs_close(void); +int ext4fs_ls(const char *dirname); +void ext4fs_free_node(struct ext2fs_node *node, struct ext2fs_node *currroot); +int ext4fs_devread(int sector, int byte_offset, int byte_len, char *buf); +int ext4fs_set_blk_dev(block_dev_desc_t *rbdd, int part); +long int read_allocated_block(struct ext2_inode *inode, int fileblock); +#endif diff --git a/include/ext_common.h b/include/ext_common.h new file mode 100644 index 000000000..9b97522c8 --- /dev/null +++ b/include/ext_common.h @@ -0,0 +1,199 @@ +/* + * (C) Copyright 2011 - 2012 Samsung Electronics + * EXT4 filesystem implementation in Uboot by + * Uma Shankar <uma.shankar@samsung.com> + * Manjunatha C Achar <a.manjunatha@samsung.com> + * + * Data structures and headers for ext4 support have been taken from + * ext2 ls load support in Uboot + * + * (C) Copyright 2004 + * esd gmbh <www.esd-electronics.com> + * Reinhard Arlt <reinhard.arlt@esd-electronics.com> + * + * based on code from grub2 fs/ext2.c and fs/fshelp.c by + * GRUB  --  GRand Unified Bootloader + * Copyright (C) 2003, 2004  Free Software Foundation, Inc. + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef __EXT_COMMON__ +#define __EXT_COMMON__ +#include <command.h> +#define SECTOR_SIZE		0x200 +#define SECTOR_BITS		9 + +/* Magic value used to identify an ext2 filesystem.  */ +#define	EXT2_MAGIC			0xEF53 +/* Amount of indirect blocks in an inode.  */ +#define INDIRECT_BLOCKS			12 +/* Maximum lenght of a pathname.  */ +#define EXT2_PATH_MAX				4096 +/* Maximum nesting of symlinks, used to prevent a loop.  */ +#define	EXT2_MAX_SYMLINKCNT		8 + +/* Filetype used in directory entry.  */ +#define	FILETYPE_UNKNOWN		0 +#define	FILETYPE_REG			1 +#define	FILETYPE_DIRECTORY		2 +#define	FILETYPE_SYMLINK		7 + +/* Filetype information as used in inodes.  */ +#define FILETYPE_INO_MASK		0170000 +#define FILETYPE_INO_REG		0100000 +#define FILETYPE_INO_DIRECTORY		0040000 +#define FILETYPE_INO_SYMLINK		0120000 +#define EXT2_ROOT_INO			2 /* Root inode */ + +/* Bits used as offset in sector */ +#define DISK_SECTOR_BITS		9 +/* The size of an ext2 block in bytes.  */ +#define EXT2_BLOCK_SIZE(data)	   (1 << LOG2_BLOCK_SIZE(data)) + +/* Log2 size of ext2 block in 512 blocks.  */ +#define LOG2_EXT2_BLOCK_SIZE(data) (__le32_to_cpu \ +				(data->sblock.log2_block_size) + 1) + +/* Log2 size of ext2 block in bytes.  */ +#define LOG2_BLOCK_SIZE(data)	   (__le32_to_cpu \ +		(data->sblock.log2_block_size) + 10) +#define INODE_SIZE_FILESYSTEM(data)	(__le32_to_cpu \ +			(data->sblock.inode_size)) + +#define EXT2_FT_DIR	2 +#define SUCCESS	1 + +/* Macro-instructions used to manage several block sizes  */ +#define EXT2_MIN_BLOCK_LOG_SIZE	10 /* 1024 */ +#define EXT2_MAX_BLOCK_LOG_SIZE	16 /* 65536 */ +#define EXT2_MIN_BLOCK_SIZE		(1 << EXT2_MIN_BLOCK_LOG_SIZE) +#define EXT2_MAX_BLOCK_SIZE		(1 << EXT2_MAX_BLOCK_LOG_SIZE) + +/* The ext2 superblock.  */ +struct ext2_sblock { +	uint32_t total_inodes; +	uint32_t total_blocks; +	uint32_t reserved_blocks; +	uint32_t free_blocks; +	uint32_t free_inodes; +	uint32_t first_data_block; +	uint32_t log2_block_size; +	uint32_t log2_fragment_size; +	uint32_t blocks_per_group; +	uint32_t fragments_per_group; +	uint32_t inodes_per_group; +	uint32_t mtime; +	uint32_t utime; +	uint16_t mnt_count; +	uint16_t max_mnt_count; +	uint16_t magic; +	uint16_t fs_state; +	uint16_t error_handling; +	uint16_t minor_revision_level; +	uint32_t lastcheck; +	uint32_t checkinterval; +	uint32_t creator_os; +	uint32_t revision_level; +	uint16_t uid_reserved; +	uint16_t gid_reserved; +	uint32_t first_inode; +	uint16_t inode_size; +	uint16_t block_group_number; +	uint32_t feature_compatibility; +	uint32_t feature_incompat; +	uint32_t feature_ro_compat; +	uint32_t unique_id[4]; +	char volume_name[16]; +	char last_mounted_on[64]; +	uint32_t compression_info; +}; + +struct ext2_block_group { +	__u32 block_id;	/* Blocks bitmap block */ +	__u32 inode_id;	/* Inodes bitmap block */ +	__u32 inode_table_id;	/* Inodes table block */ +	__u16 free_blocks;	/* Free blocks count */ +	__u16 free_inodes;	/* Free inodes count */ +	__u16 used_dir_cnt;	/* Directories count */ +	__u16 bg_flags; +	__u32 bg_reserved[2]; +	__u16 bg_itable_unused; /* Unused inodes count */ +	__u16 bg_checksum;	/* crc16(s_uuid+grouo_num+group_desc)*/ +}; + +/* The ext2 inode. */ +struct ext2_inode { +	uint16_t mode; +	uint16_t uid; +	uint32_t size; +	uint32_t atime; +	uint32_t ctime; +	uint32_t mtime; +	uint32_t dtime; +	uint16_t gid; +	uint16_t nlinks; +	uint32_t blockcnt;	/* Blocks of 512 bytes!! */ +	uint32_t flags; +	uint32_t osd1; +	union { +		struct datablocks { +			uint32_t dir_blocks[INDIRECT_BLOCKS]; +			uint32_t indir_block; +			uint32_t double_indir_block; +			uint32_t triple_indir_block; +		} blocks; +		char symlink[60]; +	} b; +	uint32_t version; +	uint32_t acl; +	uint32_t dir_acl; +	uint32_t fragment_addr; +	uint32_t osd2[3]; +}; + +/* The header of an ext2 directory entry. */ +struct ext2_dirent { +	uint32_t inode; +	uint16_t direntlen; +	uint8_t namelen; +	uint8_t filetype; +}; + +struct ext2fs_node { +	struct ext2_data *data; +	struct ext2_inode inode; +	int ino; +	int inode_read; +}; + +/* Information about a "mounted" ext2 filesystem. */ +struct ext2_data { +	struct ext2_sblock sblock; +	struct ext2_inode *inode; +	struct ext2fs_node diropen; +}; + +int do_ext2ls(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); +int do_ext2load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); +int do_ext4_load(cmd_tbl_t *cmdtp, int flag, int argc, +					char *const argv[]); +int do_ext4_ls(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]); +int do_ext4_write(cmd_tbl_t *cmdtp, int flag, int argc, +				char *const argv[]); +int do_ext_load(cmd_tbl_t *cmdtp, int flag, int argc, +					char *const argv[]); +int do_ext_ls(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]); +#endif diff --git a/include/fdtdec.h b/include/fdtdec.h index fab577ed3..0b140752f 100644 --- a/include/fdtdec.h +++ b/include/fdtdec.h @@ -19,6 +19,8 @@   * MA 02111-1307 USA   */ +#ifndef __fdtdec_h +#define __fdtdec_h  /*   * This file contains convenience functions for decoding useful and @@ -57,12 +59,13 @@ struct fdt_memory {   */  enum fdt_compat_id {  	COMPAT_UNKNOWN, -	COMPAT_NVIDIA_TEGRA20_USB,	/* Tegra2 USB port */ -	COMPAT_NVIDIA_TEGRA20_I2C,	/* Tegra2 i2c */ -	COMPAT_NVIDIA_TEGRA20_DVC,	/* Tegra2 dvc (really just i2c) */ -	COMPAT_NVIDIA_TEGRA20_EMC,	/* Tegra2 memory controller */ -	COMPAT_NVIDIA_TEGRA20_EMC_TABLE, /* Tegra2 memory timing table */ -	COMPAT_NVIDIA_TEGRA20_KBC,	/* Tegra2 Keyboard */ +	COMPAT_NVIDIA_TEGRA20_USB,	/* Tegra20 USB port */ +	COMPAT_NVIDIA_TEGRA20_I2C,	/* Tegra20 i2c */ +	COMPAT_NVIDIA_TEGRA20_DVC,	/* Tegra20 dvc (really just i2c) */ +	COMPAT_NVIDIA_TEGRA20_EMC,	/* Tegra20 memory controller */ +	COMPAT_NVIDIA_TEGRA20_EMC_TABLE, /* Tegra20 memory timing table */ +	COMPAT_NVIDIA_TEGRA20_KBC,	/* Tegra20 Keyboard */ +	COMPAT_NVIDIA_TEGRA20_NAND,	/* Tegra2 NAND controller */  	COMPAT_COUNT,  }; @@ -382,3 +385,4 @@ int fdtdec_get_byte_array(const void *blob, int node, const char *prop_name,   */  const u8 *fdtdec_locate_byte_array(const void *blob, int node,  			     const char *prop_name, int count); +#endif diff --git a/include/flash.h b/include/flash.h index e614d07df..6d70bdd81 100644 --- a/include/flash.h +++ b/include/flash.h @@ -141,6 +141,7 @@ extern flash_info_t *flash_get_info(ulong base);  #define ERR_UNKNOWN_FLASH_VENDOR	32  #define ERR_UNKNOWN_FLASH_TYPE		64  #define ERR_PROG_ERROR			128 +#define ERR_ABORTED			256  /*-----------------------------------------------------------------------   * Protection Flags for flash_protect(): diff --git a/include/fsl_esdhc.h b/include/fsl_esdhc.h index 0e265584b..4e321e762 100644 --- a/include/fsl_esdhc.h +++ b/include/fsl_esdhc.h @@ -167,7 +167,6 @@  struct fsl_esdhc_cfg {  	u32	esdhc_base; -	u32	no_snoop;  };  /* Select the correct accessors depending on endianess */ diff --git a/include/fsl_nfc.h b/include/fsl_nfc.h index 279aaa55d..ff537b49a 100644 --- a/include/fsl_nfc.h +++ b/include/fsl_nfc.h @@ -24,49 +24,48 @@  #define __FSL_NFC_H  /* - * TODO: Use same register defs for nand_spl mxc nand driver - * and mtd mxc nand driver. + * Register map and bit definitions for the Freescale NAND Flash Controller + * present in various i.MX devices.   * - * Register map and bit definitions for the Freescale NAND Flash - * Controller present in various i.MX devices. + * MX31 and MX27 have version 1, which has: + *	4 512-byte main buffers and + *	4 16-byte spare buffers + *	to support up to 2K byte pagesize nand. + *	Reading or writing a 2K page requires 4 FDI/FDO cycles.   * - * MX31 and MX27 have version 1 which has - * 	4 512 byte main buffers and - * 	4 16 byte spare buffers - * 	to support up to 2K byte pagesize nand. - * 	Reading or writing a 2K page requires 4 FDI/FDO cycles. - * - * MX25 has version 1.1 which has - * 	8 512 byte main buffers and - * 	8 64 byte spare buffers - * 	to support up to 4K byte pagesize nand. - * 	Reading or writing a 2K or 4K page requires only 1 FDI/FDO cycle. - *      Also some of registers are moved and/or changed meaning as seen below. + * MX25 and MX35 have version 2.1, which has: + *	8 512-byte main buffers and + *	8 64-byte spare buffers + *	to support up to 4K byte pagesize nand. + *	Reading or writing a 2K or 4K page requires only 1 FDI/FDO cycle. + *	Also some of registers are moved and/or changed meaning as seen below.   */ -#if defined(CONFIG_MX31) || defined(CONFIG_MX27) +#if defined(CONFIG_MX27) || defined(CONFIG_MX31)  #define MXC_NFC_V1 -#elif defined(CONFIG_MX25) -#define MXC_NFC_V1_1 +#define is_mxc_nfc_1()		1 +#define is_mxc_nfc_21()		0 +#elif defined(CONFIG_MX25) || defined(CONFIG_MX35) +#define MXC_NFC_V2_1 +#define is_mxc_nfc_1()		0 +#define is_mxc_nfc_21()		1  #else -#warning "MXC NFC version not defined" +#error "MXC NFC implementation not supported"  #endif  #if defined(MXC_NFC_V1)  #define NAND_MXC_NR_BUFS		4  #define NAND_MXC_SPARE_BUF_SIZE		16  #define NAND_MXC_REG_OFFSET		0xe00 -#define NAND_MXC_2K_MULTI_CYCLE		1 -#elif defined(MXC_NFC_V1_1) +#define NAND_MXC_2K_MULTI_CYCLE +#elif defined(MXC_NFC_V2_1)  #define NAND_MXC_NR_BUFS		8  #define NAND_MXC_SPARE_BUF_SIZE		64  #define NAND_MXC_REG_OFFSET		0x1e00 -#else -#error "define CONFIG_NAND_MXC_VXXX to use the mxc spl_nand driver"  #endif  struct fsl_nfc_regs { -	u32 main_area[NAND_MXC_NR_BUFS][512/4]; -	u32 spare_area[NAND_MXC_NR_BUFS][NAND_MXC_SPARE_BUF_SIZE/4]; +	u8 main_area[NAND_MXC_NR_BUFS][0x200]; +	u8 spare_area[NAND_MXC_NR_BUFS][NAND_MXC_SPARE_BUF_SIZE];  	/*  	 * reserved size is offset of nfc registers  	 * minus total main and spare sizes @@ -74,44 +73,43 @@ struct fsl_nfc_regs {  	u8 reserved1[NAND_MXC_REG_OFFSET  		- NAND_MXC_NR_BUFS * (512 + NAND_MXC_SPARE_BUF_SIZE)];  #if defined(MXC_NFC_V1) -	u16 bufsiz; +	u16 buf_size;  	u16 reserved2; -	u16 buffer_address; -	u16 flash_add; +	u16 buf_addr; +	u16 flash_addr;  	u16 flash_cmd; -	u16 configuration; +	u16 config;  	u16 ecc_status_result; -	u16 ecc_rslt_main_area; -	u16 ecc_rslt_spare_area; -	u16 nf_wr_prot; -	u16 unlock_start_blk_add; -	u16 unlock_end_blk_add; -	u16 nand_flash_wr_pr_st; -	u16 nand_flash_config1; -	u16 nand_flash_config2; -#elif defined(MXC_NFC_V1_1) +	u16 rsltmain_area; +	u16 rsltspare_area; +	u16 wrprot; +	u16 unlockstart_blkaddr; +	u16 unlockend_blkaddr; +	u16 nf_wrprst; +	u16 config1; +	u16 config2; +#elif defined(MXC_NFC_V2_1)  	u16 reserved2[2]; -	u16 buffer_address; -	u16 flash_add; +	u16 buf_addr; +	u16 flash_addr;  	u16 flash_cmd; -	u16 configuration; -	u16 ecc_status_result; -	u16 ecc_status_result2; +	u16 config; +	u32 ecc_status_result;  	u16 spare_area_size; -	u16 nf_wr_prot; +	u16 wrprot;  	u16 reserved3[2]; -	u16 nand_flash_wr_pr_st; -	u16 nand_flash_config1; -	u16 nand_flash_config2; +	u16 nf_wrprst; +	u16 config1; +	u16 config2;  	u16 reserved4; -	u16 unlock_start_blk_add0; -	u16 unlock_end_blk_add0; -	u16 unlock_start_blk_add1; -	u16 unlock_end_blk_add1; -	u16 unlock_start_blk_add2; -	u16 unlock_end_blk_add2; -	u16 unlock_start_blk_add3; -	u16 unlock_end_blk_add3; +	u16 unlockstart_blkaddr; +	u16 unlockend_blkaddr; +	u16 unlockstart_blkaddr1; +	u16 unlockend_blkaddr1; +	u16 unlockstart_blkaddr2; +	u16 unlockend_blkaddr2; +	u16 unlockstart_blkaddr3; +	u16 unlockend_blkaddr3;  #endif  }; @@ -157,7 +155,7 @@ struct fsl_nfc_regs {   */  #define NFC_INT		0x8000 -#ifdef MXC_NFC_V1_1 +#ifdef MXC_NFC_V2_1  #define NFC_4_8N_ECC	(1 << 0)  #endif  #define NFC_SP_EN	(1 << 2) @@ -167,5 +165,6 @@ struct fsl_nfc_regs {  #define NFC_RST		(1 << 6)  #define NFC_CE		(1 << 7)  #define NFC_ONE_CYCLE	(1 << 8) +#define NFC_FP_INT	(1 << 11)  #endif /* __FSL_NFC_H */ diff --git a/include/g_dnl.h b/include/g_dnl.h new file mode 100644 index 000000000..0ec744030 --- /dev/null +++ b/include/g_dnl.h @@ -0,0 +1,33 @@ +/* + *  Copyright (C) 2012 Samsung Electronics + *  Lukasz Majewski <l.majewski@samsung.com> + * + * 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 __G_DOWNLOAD_H_ +#define __G_DOWNLOAD_H_ + +#include <linux/usb/ch9.h> +#include <usbdescriptors.h> +#include <linux/usb/gadget.h> + +int g_dnl_register(const char *s); +void g_dnl_unregister(void); + +/* USB initialization declaration - board specific */ +void board_usb_init(void); +#endif /* __G_DOWNLOAD_H_ */ diff --git a/include/i2c.h b/include/i2c.h index 1f35acf67..16f099d2e 100644 --- a/include/i2c.h +++ b/include/i2c.h @@ -250,4 +250,16 @@ static inline void I2C_SET_BUS(unsigned int bus)  		i2c_set_bus_num(bus);  } +/* Multi I2C definitions */ +enum { +	I2C_0, I2C_1, I2C_2, I2C_3, I2C_4, I2C_5, I2C_6, I2C_7, +	I2C_8, I2C_9, I2C_10, +}; + +/* Multi I2C busses handling */ +#ifdef CONFIG_SOFT_I2C_MULTI_BUS +extern int get_multi_scl_pin(void); +extern int get_multi_sda_pin(void); +extern int multi_i2c_init(void); +#endif  #endif	/* _I2C_H_ */ diff --git a/include/lcd.h b/include/lcd.h index 6e0a2a391..42070d763 100644 --- a/include/lcd.h +++ b/include/lcd.h @@ -240,6 +240,7 @@ typedef struct vidinfo {  	unsigned int reset_delay;  	unsigned int interface_mode;  	unsigned int mipi_enabled; +	unsigned int dp_enabled;  	unsigned int cs_setup;  	unsigned int wr_setup;  	unsigned int wr_act; diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index 82704de08..f63e04b63 100644 --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h @@ -85,8 +85,10 @@ extern void nand_wait_ready(struct mtd_info *mtd);  #define NAND_CMD_RESET		0xff  #define NAND_CMD_LOCK		0x2a +#define NAND_CMD_LOCK_TIGHT	0x2c  #define NAND_CMD_UNLOCK1	0x23  #define NAND_CMD_UNLOCK2	0x24 +#define NAND_CMD_LOCK_STATUS	0x7a  /* Extended commands for large page devices */  #define NAND_CMD_READSTART	0x30 @@ -205,9 +207,6 @@ typedef enum {  #define NAND_SUBPAGE_READ(chip) ((chip->ecc.mode == NAND_ECC_SOFT) \  					&& (chip->page_shift > 9)) -/* Mask to zero out the chip options, which come from the id table */ -#define NAND_CHIPOPTIONS_MSK	(0x0000ffff & ~NAND_NO_AUTOINCR) -  /* Non chip related options */  /*   * Use a flash based bad block table. OOB identifier is saved in OOB area. @@ -391,9 +390,10 @@ struct nand_ecc_ctrl {   * consecutive order.   */  struct nand_buffers { -	uint8_t	ecccalc[NAND_MAX_OOBSIZE]; -	uint8_t	ecccode[NAND_MAX_OOBSIZE]; -	uint8_t databuf[NAND_MAX_PAGESIZE + NAND_MAX_OOBSIZE]; +	uint8_t	ecccalc[ALIGN(NAND_MAX_OOBSIZE, ARCH_DMA_MINALIGN)]; +	uint8_t	ecccode[ALIGN(NAND_MAX_OOBSIZE, ARCH_DMA_MINALIGN)]; +	uint8_t databuf[ALIGN(NAND_MAX_PAGESIZE + NAND_MAX_OOBSIZE, +			      ARCH_DMA_MINALIGN)];  };  /** diff --git a/include/mmc.h b/include/mmc.h index 230598654..a13e2bdcf 100644 --- a/include/mmc.h +++ b/include/mmc.h @@ -27,6 +27,7 @@  #define _MMC_H_  #include <linux/list.h> +#include <linux/compiler.h>  #define SD_VERSION_SD	0x20000  #define SD_VERSION_2	(SD_VERSION_SD | 0x20) @@ -159,6 +160,7 @@  #define EXT_CSD_CARD_TYPE		196	/* RO */  #define EXT_CSD_SEC_CNT			212	/* RO, 4 bytes */  #define EXT_CSD_HC_ERASE_GRP_SIZE	224	/* RO */ +#define EXT_CSD_BOOT_MULT		226	/* RO */  /*   * EXT_CSD field definitions @@ -213,7 +215,6 @@ struct mmc_cmd {  	uint resp_type;  	uint cmdarg;  	uint response[4]; -	uint flags;  };  struct mmc_data { @@ -273,6 +274,7 @@ int get_mmc_num(void);  int board_mmc_getcd(struct mmc *mmc);  int mmc_switch_part(int dev_num, unsigned int part_num);  int mmc_getcd(struct mmc *mmc); +void spl_mmc_load(void) __noreturn;  #ifdef CONFIG_GENERIC_MMC  #define mmc_host_is_spi(mmc)	((mmc)->host_caps & MMC_MODE_SPI) diff --git a/include/mpc5xxx.h b/include/mpc5xxx.h index 859d69619..84d27c90e 100644 --- a/include/mpc5xxx.h +++ b/include/mpc5xxx.h @@ -898,8 +898,11 @@ struct mpc5xxx_xlb {  	volatile u32 snoop_window;	/* XLB + 0x70 */  }; +struct pci_controller; +  /* function prototypes */  void loadtask(int basetask, int tasks); +void pci_mpc5xxx_init(struct pci_controller *);  #endif /* __ASSEMBLY__ */ diff --git a/include/nand.h b/include/nand.h index a48b1b8ed..bbe28b20b 100644 --- a/include/nand.h +++ b/include/nand.h @@ -31,7 +31,7 @@   * at the same time, so do it here.  When all drivers are   * converted, this will go away.   */ -#if defined(CONFIG_NAND_FSL_ELBC) +#if defined(CONFIG_NAND_FSL_ELBC) || defined(CONFIG_NAND_ATMEL)  #define CONFIG_SYS_NAND_SELF_INIT  #endif @@ -141,11 +141,11 @@ int nand_write_skip_bad(nand_info_t *nand, loff_t offset, size_t *length,  int nand_erase_opts(nand_info_t *meminfo, const nand_erase_options_t *opts);  #define NAND_LOCK_STATUS_TIGHT	0x01 -#define NAND_LOCK_STATUS_LOCK	0x02  #define NAND_LOCK_STATUS_UNLOCK 0x04 -int nand_lock( nand_info_t *meminfo, int tight ); -int nand_unlock( nand_info_t *meminfo, ulong start, ulong length ); +int nand_lock(nand_info_t *meminfo, int tight); +int nand_unlock(nand_info_t *meminfo, loff_t start, size_t length, +	int allexcept);  int nand_get_lock_status(nand_info_t *meminfo, loff_t offset);  int nand_spl_load_image(uint32_t offs, unsigned int size, void *dst); diff --git a/include/ns16550.h b/include/ns16550.h index e9d2edab0..51cb5b4a6 100644 --- a/include/ns16550.h +++ b/include/ns16550.h @@ -46,6 +46,14 @@ struct NS16550 {  	UART_REG(lsr);		/* 5 */  	UART_REG(msr);		/* 6 */  	UART_REG(spr);		/* 7 */ +#ifdef CONFIG_SOC_DA8XX +	UART_REG(reg8);		/* 8 */ +	UART_REG(reg9);		/* 9 */ +	UART_REG(revid1);	/* A */ +	UART_REG(revid2);	/* B */ +	UART_REG(pwr_mgmt);	/* C */ +	UART_REG(mdr1);		/* D */ +#else  	UART_REG(mdr1);		/* 8 */  	UART_REG(reg9);		/* 9 */  	UART_REG(regA);		/* A */ @@ -58,6 +66,7 @@ struct NS16550 {  	UART_REG(ssr);		/* 11*/  	UART_REG(reg12);	/* 12*/  	UART_REG(osc_12m_sel);	/* 13*/ +#endif  };  #define thr rbr diff --git a/include/pci_ids.h b/include/pci_ids.h index 6a85c06bc..2c6dfd404 100644 --- a/include/pci_ids.h +++ b/include/pci_ids.h @@ -364,6 +364,10 @@  #define PCI_DEVICE_ID_ATI_RS400_166     0x5a32  #define PCI_DEVICE_ID_ATI_RS400_200     0x5a33  #define PCI_DEVICE_ID_ATI_RS480         0x5950 +/* additional Radeon families */ +#define PCI_DEVICE_ID_ATI_EVERGREEN     0x9802 +#define PCI_DEVICE_ID_ATI_EVERGREEN2    0x9804 +#define PCI_DEVICE_ID_ATI_WRESTLER      0x9806  /* ATI IXP Chipset */  #define PCI_DEVICE_ID_ATI_IXP200_IDE	0x4349  #define PCI_DEVICE_ID_ATI_IXP200_SMBUS	0x4353 @@ -375,9 +379,13 @@  #define PCI_DEVICE_ID_ATI_IXP400_SATA   0x4379  #define PCI_DEVICE_ID_ATI_IXP400_SATA2	0x437a  #define PCI_DEVICE_ID_ATI_IXP600_SATA	0x4380 +#define PCI_DEVICE_ID_ATI_SBX00_PCI_BRIDGE	0x4384  #define PCI_DEVICE_ID_ATI_SBX00_SMBUS	0x4385  #define PCI_DEVICE_ID_ATI_IXP600_IDE	0x438c  #define PCI_DEVICE_ID_ATI_IXP700_SATA	0x4390 +#define PCI_DEVICE_ID_ATI_SBX00_SATA_AHCI	0x4391 +#define PCI_DEVICE_ID_ATI_SBX00_EHCI	0x4396 +#define PCI_DEVICE_ID_ATI_SBX00_OHCI	0x4397  #define PCI_DEVICE_ID_ATI_IXP700_IDE	0x439c  #define PCI_VENDOR_ID_VLSI		0x1004 @@ -2539,9 +2547,16 @@  #define PCI_DEVICE_ID_INTEL_82840_HB	0x1a21  #define PCI_DEVICE_ID_INTEL_82845_HB	0x1a30  #define PCI_DEVICE_ID_INTEL_IOAT	0x1a38 +#define PCI_DEVICE_ID_INTEL_COUGARPOINT_AHCI_MOBILE	0x1c03 +#define PCI_DEVICE_ID_INTEL_COUGARPOINT_AHCI_SERIES6	0x1c02 +#define PCI_DEVICE_ID_INTEL_COUGARPOINT_HDA	0x1c20  #define PCI_DEVICE_ID_INTEL_COUGARPOINT_SMBUS	0x1c22  #define PCI_DEVICE_ID_INTEL_COUGARPOINT_LPC_MIN	0x1c41  #define PCI_DEVICE_ID_INTEL_COUGARPOINT_LPC_MAX	0x1c5f +#define PCI_DEVICE_ID_INTEL_PANTHERPOINT_AHCI_MOBILE	0x1e03 +#define PCI_DEVICE_ID_INTEL_PANTHERPOINT_HDA	0x1e20 +#define PCI_DEVICE_ID_INTEL_PANTHERPOINT_LPC_MIN 0x1e41 +#define PCI_DEVICE_ID_INTEL_PANTHERPOINT_LPC_MAX 0x1e5f  #define PCI_DEVICE_ID_INTEL_PATSBURG_SMBUS	0x1d22  #define PCI_DEVICE_ID_INTEL_PATSBURG_LPC	0x1d40  #define PCI_DEVICE_ID_INTEL_82801AA_0	0x2410 @@ -2635,6 +2650,7 @@  #define PCI_DEVICE_ID_INTEL_ICH7_30	0x27b0  #define PCI_DEVICE_ID_INTEL_TGP_LPC	0x27bc  #define PCI_DEVICE_ID_INTEL_ICH7_31	0x27bd +#define PCI_DEVICE_ID_INTEL_NM10_AHCI	0x27c1  #define PCI_DEVICE_ID_INTEL_ICH7_17	0x27da  #define PCI_DEVICE_ID_INTEL_ICH7_19	0x27dd  #define PCI_DEVICE_ID_INTEL_ICH7_20	0x27de diff --git a/include/sdhci.h b/include/sdhci.h index 9d3718324..c0345ed86 100644 --- a/include/sdhci.h +++ b/include/sdhci.h @@ -76,6 +76,8 @@  #define  SDHCI_SPACE_AVAILABLE	0x00000400  #define  SDHCI_DATA_AVAILABLE	0x00000800  #define  SDHCI_CARD_PRESENT	0x00010000 +#define  SDHCI_CARD_STATE_STABLE	0x00020000 +#define  SDHCI_CARD_DETECT_PIN_LEVEL	0x00040000  #define  SDHCI_WRITE_PROTECT	0x00080000  #define SDHCI_HOST_CONTROL	0x28 @@ -87,7 +89,9 @@  #define   SDHCI_CTRL_ADMA1	0x08  #define   SDHCI_CTRL_ADMA32	0x10  #define   SDHCI_CTRL_ADMA64	0x18 -#define   SDHCI_CTRL_8BITBUS	0x20 +#define  SDHCI_CTRL_8BITBUS	0x20 +#define  SDHCI_CTRL_CD_TEST_INS	0x40 +#define  SDHCI_CTRL_CD_TEST	0x80  #define SDHCI_POWER_CONTROL	0x29  #define  SDHCI_POWER_ON		0x01 @@ -219,6 +223,7 @@  #define SDHCI_QUIRK_BROKEN_R1B		(1 << 2)  #define SDHCI_QUIRK_NO_HISPD_BIT	(1 << 3)  #define SDHCI_QUIRK_BROKEN_VOLTAGE	(1 << 4) +#define SDHCI_QUIRK_NO_CD		(1 << 5)  /* to make gcc happy */  struct sdhci_host; @@ -248,8 +253,10 @@ struct sdhci_host {  	unsigned int clock;  	struct mmc *mmc;  	const struct sdhci_ops *ops; +	int index;  	void (*set_control_reg)(struct sdhci_host *host); +	void (*set_clock)(int dev_index, unsigned int div);  	uint	voltages;  }; diff --git a/include/search.h b/include/search.h index ef53edb9f..93e1cbc6d 100644 --- a/include/search.h +++ b/include/search.h @@ -57,13 +57,23 @@ struct hsearch_data {  	struct _ENTRY *table;  	unsigned int size;  	unsigned int filled; +/* + * Callback function which will check whether the given change for variable + * "name" from "oldval" to "newval" may be applied or not, and possibly apply + * such change. + * When (flag & H_FORCE) is set, it shall not print out any error message and + * shall force overwriting of write-once variables. +.* Must return 0 for approval, 1 for denial. + */ +	int (*apply)(const char *name, const char *oldval, +			const char *newval, int flag);  };  /* Create a new hashing table which will at most contain NEL elements.  */  extern int hcreate_r(size_t __nel, struct hsearch_data *__htab);  /* Destroy current internal hashing table.  */ -extern void hdestroy_r(struct hsearch_data *__htab); +extern void hdestroy_r(struct hsearch_data *__htab, int do_apply);  /*   * Search for entry matching ITEM.key in internal hash table.  If @@ -88,17 +98,25 @@ extern int hstrstr_r(const char *__match, int __last_idx, ENTRY ** __retval,  		    struct hsearch_data *__htab);  /* Search and delete entry matching ITEM.key in internal hash table. */ -extern int hdelete_r(const char *__key, struct hsearch_data *__htab); +extern int hdelete_r(const char *__key, struct hsearch_data *__htab, +			int do_apply);  extern ssize_t hexport_r(struct hsearch_data *__htab,  		     const char __sep, char **__resp, size_t __size,  		     int argc, char * const argv[]); +/* + * nvars: length of vars array + * vars: array of strings (variable names) to import (nvars == 0 means all) + * do_apply: whether to call callback function to check the new argument, + * and possibly apply changes (false means accept everything) + */  extern int himport_r(struct hsearch_data *__htab,  		     const char *__env, size_t __size, const char __sep, -		     int __flag); +		     int __flag, int nvars, char * const vars[], int do_apply);  /* Flags for himport_r() */ -#define	H_NOCLEAR	1	/* do not clear hash table before importing */ +#define	H_NOCLEAR	(1 << 0) /* do not clear hash table before importing */ +#define	H_FORCE		(1 << 1) /* overwrite read-only/write-once variables */  #endif /* search.h */ diff --git a/include/serial.h b/include/serial.h index 517349912..d76d6dfb6 100644 --- a/include/serial.h +++ b/include/serial.h @@ -31,7 +31,8 @@ extern struct serial_device *default_serial_console(void);  	defined(CONFIG_MB86R0x) || defined(CONFIG_MPC5xxx) || \  	defined(CONFIG_MPC83xx) || defined(CONFIG_MPC85xx) || \  	defined(CONFIG_MPC86xx) || defined(CONFIG_SYS_SC520) || \ -	defined(CONFIG_TEGRA2) || defined(CONFIG_SYS_COREBOOT) +	defined(CONFIG_TEGRA20) || defined(CONFIG_SYS_COREBOOT) || \ +	defined(CONFIG_MICROBLAZE)  extern struct serial_device serial0_device;  extern struct serial_device serial1_device;  #if defined(CONFIG_SYS_NS16550_SERIAL) diff --git a/include/sh_tmu.h b/include/sh_tmu.h new file mode 100644 index 000000000..a55d14181 --- /dev/null +++ b/include/sh_tmu.h @@ -0,0 +1,75 @@ +/* + * Copyright (C) 2012  Renesas Solutions Corp. + * + * 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. + * + * 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 __SH_TMU_H +#define __SH_TMU_H + +#include <asm/types.h> + +#if defined(CONFIG_SH3) +struct tmu_regs { +	u8	tocr; +	u8	reserved0; +	u8	tstr; +	u8	reserved1; +	u32	tcor0; +	u32	tcnt0; +	u16	tcr0; +	u16	reserved2; +	u32	tcor1; +	u32	tcnt1; +	u16	tcr1; +	u16	reserved3; +	u32	tcor2; +	u32	tcnt2; +	u16	tcr2; +	u16	reserved4; +	u32	tcpr2; +}; +#endif /* CONFIG_SH3 */ + +#if defined(CONFIG_SH4) || defined(CONFIG_SH4A) +struct tmu_regs { +	u32 reserved; +	u8  tstr; +	u8  reserved2[3]; +	u32 tcor0; +	u32 tcnt0; +	u16 tcr0; +	u16 reserved3; +	u32 tcor1; +	u32 tcnt1; +	u16 tcr1; +	u16 reserved4; +	u32 tcor2; +	u32 tcnt2; +	u16 tcr2; +	u16 reserved5; +}; +#endif /* CONFIG_SH4 */ + +static inline unsigned long get_tmu0_clk_rate(void) +{ +	return CONFIG_SYS_CLK_FREQ; +} + +#endif	/* __SH_TMU_H */ diff --git a/include/usb/ulpi.h b/include/usb/ulpi.h index 4a23fd2af..9a75c24bd 100644 --- a/include/usb/ulpi.h +++ b/include/usb/ulpi.h @@ -61,7 +61,7 @@ int ulpi_select_transceiver(struct ulpi_viewport *ulpi_vp, unsigned speed);   *   * returns 0 on success, ULPI_ERROR on failure.   */ -int ulpi_enable_vbus(struct ulpi_viewport *ulpi_vp, +int ulpi_set_vbus(struct ulpi_viewport *ulpi_vp,  			int on, int ext_power, int ext_ind);  /* |