diff options
Diffstat (limited to 'include')
75 files changed, 2048 insertions, 424 deletions
| diff --git a/include/aes.h b/include/aes.h new file mode 100644 index 000000000..41b0db29c --- /dev/null +++ b/include/aes.h @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2011 The Chromium OS Authors. + * (C) Copyright 2010 - 2011 NVIDIA Corporation <www.nvidia.com> + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +#ifndef _AES_REF_H_ +#define _AES_REF_H_ + +/* + * AES encryption library, with small code size, supporting only 128-bit AES + * + * AES is a stream cipher which works a block at a time, with each block + * in this case being AES_KEY_LENGTH bytes. + */ + +enum { +	AES_STATECOLS	= 4,	/* columns in the state & expanded key */ +	AES_KEYCOLS	= 4,	/* columns in a key */ +	AES_ROUNDS	= 10,	/* rounds in encryption */ + +	AES_KEY_LENGTH	= 128 / 8, +	AES_EXPAND_KEY_LENGTH	= 4 * AES_STATECOLS * (AES_ROUNDS + 1), +}; + +/** + * Expand a key into a key schedule, which is then used for the other + * operations. + * + * \param key		Key, of length AES_KEY_LENGTH bytes + * \param expkey	Buffer to place expanded key, AES_EXPAND_KEY_LENGTH + */ +void aes_expand_key(u8 *key, u8 *expkey); + +/** + * Encrypt a single block of data + * + * in		Input data + * expkey	Expanded key to use for encryption (from aes_expand_key()) + * out		Output data + */ +void aes_encrypt(u8 *in, u8 *expkey, u8 *out); + +/** + * Decrypt a single block of data + * + * in		Input data + * expkey	Expanded key to use for decryption (from aes_expand_key()) + * out		Output data + */ +void aes_decrypt(u8 *in, u8 *expkey, u8 *out); + +#endif /* _AES_REF_H_ */ diff --git a/include/ahci.h b/include/ahci.h index 465ea7fcb..c4fb9e79a 100644 --- a/include/ahci.h +++ b/include/ahci.h @@ -30,12 +30,13 @@  #define AHCI_PCI_BAR		0x24  #define AHCI_MAX_SG		56 /* hardware max is 64K */  #define AHCI_CMD_SLOT_SZ	32 +#define AHCI_MAX_CMD_SLOT	32  #define AHCI_RX_FIS_SZ		256  #define AHCI_CMD_TBL_HDR	0x80  #define AHCI_CMD_TBL_CDB	0x40  #define AHCI_CMD_TBL_SZ		AHCI_CMD_TBL_HDR + (AHCI_MAX_SG * 16) -#define AHCI_PORT_PRIV_DMA_SZ	AHCI_CMD_SLOT_SZ + AHCI_CMD_TBL_SZ	\ -				+ AHCI_RX_FIS_SZ +#define AHCI_PORT_PRIV_DMA_SZ	(AHCI_CMD_SLOT_SZ * AHCI_MAX_CMD_SLOT + \ +				AHCI_CMD_TBL_SZ	+ AHCI_RX_FIS_SZ)  #define AHCI_CMD_ATAPI		(1 << 5)  #define AHCI_CMD_WRITE		(1 << 6)  #define AHCI_CMD_PREFETCH	(1 << 7) diff --git a/include/common.h b/include/common.h index 7338e39d1..eb9de1870 100644 --- a/include/common.h +++ b/include/common.h @@ -222,6 +222,31 @@ typedef void (interrupt_handler_t)(void *);  #define MIN(x, y)  min(x, y)  #define MAX(x, y)  max(x, y) +/* + * Return the absolute value of a number. + * + * This handles unsigned and signed longs, ints, shorts and chars.  For all + * input types abs() returns a signed long. + * + * For 64-bit types, use abs64() + */ +#define abs(x) ({						\ +		long ret;					\ +		if (sizeof(x) == sizeof(long)) {		\ +			long __x = (x);				\ +			ret = (__x < 0) ? -__x : __x;		\ +		} else {					\ +			int __x = (x);				\ +			ret = (__x < 0) ? -__x : __x;		\ +		}						\ +		ret;						\ +	}) + +#define abs64(x) ({				\ +		s64 __x = (x);			\ +		(__x < 0) ? -__x : __x;		\ +	}) +  #if defined(CONFIG_ENV_IS_EMBEDDED)  #define TOTAL_MALLOC_LEN	CONFIG_SYS_MALLOC_LEN  #elif ( ((CONFIG_ENV_ADDR+CONFIG_ENV_SIZE) < CONFIG_SYS_MONITOR_BASE) || \ diff --git a/include/configs/P1023RDS.h b/include/configs/P1023RDS.h index e057b1f94..e632d1bd3 100644 --- a/include/configs/P1023RDS.h +++ b/include/configs/P1023RDS.h @@ -310,9 +310,6 @@ extern unsigned long get_clock_freq(void);  #define CONFIG_OF_BOARD_SETUP  #define CONFIG_OF_STDOUT_VIA_ALIAS -#define CONFIG_SYS_64BIT_VSPRINTF -#define CONFIG_SYS_64BIT_STRTOUL -  /* new uImage format support */  #define CONFIG_FIT  #define CONFIG_FIT_VERBOSE	/* enable fit_format_{error,warning}() */ diff --git a/include/configs/P2020COME.h b/include/configs/P2020COME.h index 365322c6a..28122ecc1 100644 --- a/include/configs/P2020COME.h +++ b/include/configs/P2020COME.h @@ -416,8 +416,6 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);  #endif  /* Misc Extra Settings */ -#define CONFIG_SYS_64BIT_VSPRINTF	1 -#define CONFIG_SYS_64BIT_STRTOUL	1  #define CONFIG_CMD_DHCP			1  #define CONFIG_CMD_DATE			1 diff --git a/include/configs/am3517_crane.h b/include/configs/am3517_crane.h index b0dd2f0af..1233985aa 100644 --- a/include/configs/am3517_crane.h +++ b/include/configs/am3517_crane.h @@ -174,7 +174,6 @@  #define CONFIG_SYS_MAX_NAND_DEVICE	1		/* Max number of */  							/* NAND devices */ -#define CONFIG_SYS_64BIT_VSPRINTF		/* needed for nand_util.c */  #define CONFIG_JFFS2_NAND  /* nand device jffs2 lives on */ @@ -326,7 +325,7 @@  #define CONFIG_SPL  #define CONFIG_SPL_NAND_SIMPLE  #define CONFIG_SPL_TEXT_BASE		0x40200800 -#define CONFIG_SPL_MAX_SIZE		(45 * 1024) +#define CONFIG_SPL_MAX_SIZE		(54 * 1024)	/* 8 KB for stack */  #define CONFIG_SPL_STACK		LOW_LEVEL_SRAM_STACK  #define CONFIG_SPL_BSS_START_ADDR	0x80000000 diff --git a/include/configs/am3517_evm.h b/include/configs/am3517_evm.h index b5f75d1e8..ff8d1b013 100644 --- a/include/configs/am3517_evm.h +++ b/include/configs/am3517_evm.h @@ -173,8 +173,6 @@  #define CONFIG_SYS_MAX_NAND_DEVICE	1		/* Max number of */  							/* NAND devices */ -#define CONFIG_SYS_64BIT_VSPRINTF		/* needed for nand_util.c */ -  #define CONFIG_JFFS2_NAND  /* nand device jffs2 lives on */  #define CONFIG_JFFS2_DEV		"nand0" @@ -326,7 +324,7 @@  #define CONFIG_SPL  #define CONFIG_SPL_NAND_SIMPLE  #define CONFIG_SPL_TEXT_BASE		0x40200800 -#define CONFIG_SPL_MAX_SIZE		(45 * 1024) +#define CONFIG_SPL_MAX_SIZE		(54 * 1024)	/* 8 KB for stack */  #define CONFIG_SPL_STACK		LOW_LEVEL_SRAM_STACK  #define CONFIG_SPL_BSS_START_ADDR	0x80000000 diff --git a/include/configs/at91sam9263ek.h b/include/configs/at91sam9263ek.h index 83992461f..f424e5a5b 100644 --- a/include/configs/at91sam9263ek.h +++ b/include/configs/at91sam9263ek.h @@ -283,8 +283,6 @@  #define CONFIG_SYS_NAND_MASK_CLE		(1 << 22)  #define CONFIG_SYS_NAND_ENABLE_PIN		AT91_PIN_PD15  #define CONFIG_SYS_NAND_READY_PIN		AT91_PIN_PA22 - -#define CONFIG_SYS_64BIT_VSPRINTF		/* needed for nand_util.c */  #endif  /* Ethernet */ diff --git a/include/configs/cam_enc_4xx.h b/include/configs/cam_enc_4xx.h index 99856ebfd..71faf1cc9 100644 --- a/include/configs/cam_enc_4xx.h +++ b/include/configs/cam_enc_4xx.h @@ -37,7 +37,7 @@  #define CONFIG_HOSTNAME			cam_enc_4xx -#define	BOARD_LATE_INIT +#define	CONFIG_BOARD_LATE_INIT  #define CONFIG_CAM_ENC_LED_MASK		0x0fc00000  /* Memory Info */ diff --git a/include/configs/cm_t35.h b/include/configs/cm_t35.h index fe91c1040..b28bd8e31 100644 --- a/include/configs/cm_t35.h +++ b/include/configs/cm_t35.h @@ -156,6 +156,7 @@  #define CONFIG_DRIVER_OMAP34XX_I2C  #define CONFIG_SYS_I2C_EEPROM_ADDR	0x50  #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN	1 +#define CONFIG_I2C_MULTI_BUS  /*   * TWL4030 diff --git a/include/configs/da830evm.h b/include/configs/da830evm.h index 4532e4f4f..781878ef3 100644 --- a/include/configs/da830evm.h +++ b/include/configs/da830evm.h @@ -111,7 +111,6 @@  #define CONFIG_SYS_NAND_CS		3  #define CONFIG_SYS_NAND_BASE		DAVINCI_ASYNC_EMIF_DATA_CE3_BASE  #define CONFIG_SYS_NAND_PAGE_2K -#define CONFIG_SYS_64BIT_VSPRINTF	/* needed for nand_util.c */  #define CONFIG_SYS_CLE_MASK		0x10  #define CONFIG_SYS_ALE_MASK		0x8  #define CONFIG_SYS_MAX_NAND_DEVICE	1 /* Max number of NAND devices */ diff --git a/include/configs/devkit3250.h b/include/configs/devkit3250.h new file mode 100644 index 000000000..9f15ffb0f --- /dev/null +++ b/include/configs/devkit3250.h @@ -0,0 +1,117 @@ +/* + * Embest/Timll DevKit3250 board configuration file + * + * Copyright (C) 2011 Vladimir Zapolskiy <vz@mleia.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., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef __CONFIG_DEVKIT3250_H__ +#define __CONFIG_DEVKIT3250_H__ + +/* SoC and board defines */ +#include <asm/sizes.h> +#include <asm/arch/cpu.h> + +/* + * Define DevKit3250 machine type by hand until it lands in mach-types + */ +#define MACH_TYPE_DEVKIT3250		3697 +#define CONFIG_MACH_TYPE		MACH_TYPE_DEVKIT3250 + +#define CONFIG_SYS_ICACHE_OFF +#define CONFIG_SYS_DCACHE_OFF +#define CONFIG_SKIP_LOWLEVEL_INIT +#define CONFIG_BOARD_EARLY_INIT_F + +/* + * 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 +#define CONFIG_SYS_SDRAM_SIZE		SZ_64M +#define CONFIG_SYS_TEXT_BASE		0x83FA0000 +#define CONFIG_SYS_MEMTEST_START	(CONFIG_SYS_SDRAM_BASE + SZ_32K) +#define CONFIG_SYS_MEMTEST_END		(CONFIG_SYS_TEXT_BASE - SZ_1M) + +#define CONFIG_SYS_LOAD_ADDR		(CONFIG_SYS_SDRAM_BASE + SZ_32K) + +#define CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_SDRAM_BASE + SZ_4K \ +					 - GENERATED_GBL_DATA_SIZE) + +/* + * Serial Driver + */ +#define CONFIG_SYS_LPC32XX_UART		2   /* UART2 */ +#define CONFIG_BAUDRATE			115200 + +/* + * NOR Flash + */ +#define CONFIG_CMD_FLASH +#define CONFIG_SYS_MAX_FLASH_BANKS	1 +#define CONFIG_SYS_MAX_FLASH_SECT	71 +#define CONFIG_SYS_FLASH_BASE		EMC_CS0_BASE +#define CONFIG_SYS_FLASH_SIZE		SZ_4M +#define CONFIG_SYS_FLASH_CFI + +/* + * U-Boot General Configurations + */ +#define CONFIG_SYS_LONGHELP +#define CONFIG_SYS_PROMPT		"=> " +#define CONFIG_SYS_CBSIZE		1024 +#define CONFIG_SYS_PBSIZE		\ +	(CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16) +#define CONFIG_SYS_MAXARGS		16 +#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE + +#define CONFIG_AUTO_COMPLETE +#define CONFIG_CMDLINE_EDITING +#define CONFIG_VERSION_VARIABLE +#define CONFIG_DISPLAY_CPUINFO +#define CONFIG_DOS_PARTITION + +#define CONFIG_ENV_IS_NOWHERE +#define CONFIG_ENV_SIZE			SZ_128K + +/* + * U-Boot Commands + */ +#include <config_cmd_default.h> +#define CONFIG_CMD_CACHE + +/* + * Boot Linux + */ +#define CONFIG_CMDLINE_TAG +#define CONFIG_SETUP_MEMORY_TAGS +#define CONFIG_ZERO_BOOTDELAY_CHECK +#define CONFIG_BOOTDELAY		3 + +#define CONFIG_BOOTFILE			"uImage" +#define CONFIG_BOOTARGS			"console=ttyS2,115200n8" +#define CONFIG_LOADADDR			0x80008000 + +/* + * Include SoC specific configuration + */ +#include <asm/arch/config.h> + +#endif  /* __CONFIG_DEVKIT3250_H__*/ diff --git a/include/configs/devkit8000.h b/include/configs/devkit8000.h index eb7c37678..248a5b2fa 100644 --- a/include/configs/devkit8000.h +++ b/include/configs/devkit8000.h @@ -324,7 +324,7 @@  #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x300 /* address 0x60000 */  #define CONFIG_SPL_TEXT_BASE		0x40200000 /*CONFIG_SYS_SRAM_START*/ -#define CONFIG_SPL_MAX_SIZE		0xB400  /* 45 K */ +#define CONFIG_SPL_MAX_SIZE		(54 * 1024)	/* 8 KB for stack */  #define CONFIG_SPL_STACK		LOW_LEVEL_SRAM_STACK  #define CONFIG_SPL_BSS_START_ADDR       0x80000500 /* leave space for bootargs*/ diff --git a/include/configs/dreamplug.h b/include/configs/dreamplug.h index 0f2f9a274..76f9eeaed 100644 --- a/include/configs/dreamplug.h +++ b/include/configs/dreamplug.h @@ -148,4 +148,6 @@   */  #define CONFIG_DISPLAY_CPUINFO +#define CONFIG_OF_LIBFDT +  #endif /* _CONFIG_DREAMPLUG_H */ diff --git a/include/configs/ea20.h b/include/configs/ea20.h index e059b3082..88b085d4a 100644 --- a/include/configs/ea20.h +++ b/include/configs/ea20.h @@ -31,7 +31,7 @@  #define	CONFIG_SYS_USE_NAND  #define CONFIG_DRIVER_TI_EMAC_USE_RMII  #define CONFIG_BOARD_EARLY_INIT_F -#define BOARD_LATE_INIT +#define CONFIG_BOARD_LATE_INIT  #define CONFIG_VIDEO  #define CONFIG_PREBOOT @@ -203,7 +203,6 @@  #define CONFIG_SYS_NAND_4BIT_HW_ECC_OOBFIRST  #define	CONFIG_SYS_NAND_USE_FLASH_BBT  #define CONFIG_SYS_MAX_NAND_DEVICE	1 /* Max number of NAND devices */ -#define CONFIG_SYS_64BIT_VSPRINTF	/* needed for nand_util.c */  #endif  /* SPI Flash */ diff --git a/include/configs/eb_cpux9k2.h b/include/configs/eb_cpux9k2.h index eb05e2a0b..21c471adf 100644 --- a/include/configs/eb_cpux9k2.h +++ b/include/configs/eb_cpux9k2.h @@ -288,8 +288,6 @@  #define CONFIG_SYS_NAND_BASE		0x40000000  #define CONFIG_SYS_NAND_DBW_8		1 -#define CONFIG_SYS_64BIT_VSPRINTF	1 -  /* Status LED's */  #define CONFIG_STATUS_LED		1 diff --git a/include/configs/flea3.h b/include/configs/flea3.h index f046a587b..dd7c73f3c 100644 --- a/include/configs/flea3.h +++ b/include/configs/flea3.h @@ -48,8 +48,6 @@  /* Set TEXT at the beginning of the NOR flash */  #define CONFIG_SYS_TEXT_BASE	0xA0000000 -#define CONFIG_SYS_64BIT_VSPRINTF -  /* This is required to setup the ESDC controller */  #define CONFIG_BOARD_EARLY_INIT_F diff --git a/include/configs/hawkboard.h b/include/configs/hawkboard.h index 085937138..6d2d4fb91 100644 --- a/include/configs/hawkboard.h +++ b/include/configs/hawkboard.h @@ -127,7 +127,6 @@  #define CFG_DAVINCI_STD_NAND_LAYOUT  #define CONFIG_SYS_NAND_CS		3  #define CONFIG_SYS_NAND_PAGE_2K -#define CONFIG_SYS_64BIT_VSPRINTF	/* needed for nand_util.c */  /* Max number of NAND devices */  #define CONFIG_SYS_MAX_NAND_DEVICE	1  #define CONFIG_SYS_NAND_BASE_LIST	{ 0x62000000, } diff --git a/include/configs/ib62x0.h b/include/configs/ib62x0.h new file mode 100644 index 000000000..85856f290 --- /dev/null +++ b/include/configs/ib62x0.h @@ -0,0 +1,152 @@ +/* + * Copyright (C) 2011-2012 + * Gerald Kerma <dreagle@doukki.net> + * Luka Perkov <uboot@lukaperkov.net> + * + * 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, see <http://www.gnu.org/licenses/>. + */ + +#ifndef _CONFIG_IB62x0_H +#define _CONFIG_IB62x0_H + +/* + * Version number information + */ +#define CONFIG_IDENT_STRING	" RaidSonic ICY BOX IB-NAS62x0" + +/* + * High level configuration options + */ +#define CONFIG_FEROCEON_88FR131		/* CPU Core subversion */ +#define CONFIG_KIRKWOOD			/* SOC Family Name */ +#define CONFIG_KW88F6281		/* SOC Name */ +#define CONFIG_SKIP_LOWLEVEL_INIT	/* disable board lowlevel_init */ + +/* + * Machine type + */ +#define CONFIG_MACH_TYPE	MACH_TYPE_NAS6210 + +/* + * Compression configuration + */ +#define CONFIG_BZIP2 +#define CONFIG_LZMA +#define CONFIG_LZO + +/* + * Commands configuration + */ +#define CONFIG_SYS_NO_FLASH		/* declare no flash (NOR/SPI) */ +#define CONFIG_SYS_MVFS +#include <config_cmd_default.h> +#define CONFIG_CMD_ENV +#define CONFIG_CMD_IDE +#define CONFIG_CMD_MII +#define CONFIG_CMD_NAND +#define CONFIG_CMD_PING +#define CONFIG_CMD_USB + +/* + * mv-common.h should be defined after CMD configs since it used them + * to enable certain macros + */ +#include "mv-common.h" + +#undef CONFIG_SYS_PROMPT +#define CONFIG_SYS_PROMPT	"ib62x0 => " + +/* + * Environment variables configuration + */ +#ifdef CONFIG_CMD_NAND +#define CONFIG_ENV_IS_IN_NAND +#define CONFIG_ENV_SECT_SIZE	0x20000 +#else +#define CONFIG_ENV_IS_NOWHERE +#endif +#define CONFIG_ENV_SIZE		0x20000 +#define CONFIG_ENV_OFFSET	0x80000 + +/* + * Default environment variables + */ +#define CONFIG_BOOTCOMMAND \ +	"setenv bootargs ${console} ${mtdparts} ${bootargs_root}; "	\ +	"ubi part root; "						\ +	"ubifsmount root; "						\ +	"ubifsload 0x800000 ${kernel}; "				\ +	"ubifsload 0x1100000 ${initrd}; "				\ +	"bootm 0x800000 0x1100000" + +#define CONFIG_MTDPARTS				\ +	"mtdparts=orion_nand:"			\ +	"0x80000@0x0(uboot),"			\ +	"0x20000@0x80000(uboot_env),"		\ +	"-@0xa0000(root)\0" + +#define CONFIG_EXTRA_ENV_SETTINGS					\ +	"console=console=ttyS0,115200\0"				\ +	"mtdids=nand0=orion_nand\0"					\ +	"mtdparts="CONFIG_MTDPARTS					\ +	"kernel=/boot/uImage\0"						\ +	"initrd=/boot/uInitrd\0"					\ +	"bootargs_root=ubi.mtd=2 root=ubi0:root rootfstype=ubifs\0" + +/* + * Ethernet driver configuration + */ +#ifdef CONFIG_CMD_NET +#define CONFIG_MVGBE_PORTS	{1, 0}	/* enable port 0 only */ +#define CONFIG_PHY_BASE_ADR	0 +#undef CONFIG_RESET_PHY_R +#endif /* CONFIG_CMD_NET */ + +/* + * SATA driver configuration + */ +#ifdef CONFIG_CMD_IDE +#define __io +#define CONFIG_IDE_PREINIT +#define CONFIG_DOS_PARTITION +#define CONFIG_MVSATA_IDE_USE_PORT0 +#define CONFIG_MVSATA_IDE_USE_PORT1 +#define CONFIG_SYS_ATA_IDE0_OFFSET	MV_SATA_PORT0_OFFSET +#define CONFIG_SYS_ATA_IDE1_OFFSET	MV_SATA_PORT1_OFFSET +#endif /* CONFIG_CMD_IDE */ + +/* + * RTC driver configuration + */ +#ifdef CONFIG_CMD_DATE +#define CONFIG_RTC_MV +#endif /* CONFIG_CMD_DATE */ + +/* + * File system + */ +#define CONFIG_CMD_EXT2 +#define CONFIG_CMD_FAT +#define CONFIG_CMD_JFFS2 +#define CONFIG_CMD_UBI +#define CONFIG_CMD_UBIFS +#define CONFIG_RBTREE +#define CONFIG_MTD_DEVICE +#define CONFIG_MTD_PARTITIONS +#define CONFIG_CMD_MTDPARTS + +#endif /* _CONFIG_IB62x0_H */ diff --git a/include/configs/igep0030.h b/include/configs/igep0030.h deleted file mode 100644 index bf39ba56d..000000000 --- a/include/configs/igep0030.h +++ /dev/null @@ -1,261 +0,0 @@ -/* - * (C) Copyright 2010 - * ISEE 2007 SL, <www.iseebcn.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 __CONFIG_H -#define __CONFIG_H -#include <asm/sizes.h> - -/* - * High Level Configuration Options - */ -#define CONFIG_OMAP		1	/* in a TI OMAP core */ -#define CONFIG_OMAP34XX		1	/* which is a 34XX */ -#define CONFIG_OMAP3_IGEP0030	1	/* working with IGEP0030 */ - -#define CONFIG_SDRC	/* The chip has SDRC controller */ - -#include <asm/arch/cpu.h> -#include <asm/arch/omap3.h> - -/* - * Display CPU and Board information - */ -#define CONFIG_DISPLAY_CPUINFO		1 -#define CONFIG_DISPLAY_BOARDINFO	1 - -/* Clock Defines */ -#define V_OSCK			26000000	/* Clock output from T2 */ -#define V_SCLK			(V_OSCK >> 1) - -#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 - -#define CONFIG_OF_LIBFDT		1 - -/* - * 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 - -/* select serial console configuration */ -#define CONFIG_CONS_INDEX		3 -#define CONFIG_SYS_NS16550_COM3		OMAP34XX_UART3 -#define CONFIG_SERIAL3			3 - -/* allow to overwrite serial and ethaddr */ -#define CONFIG_ENV_OVERWRITE -#define CONFIG_BAUDRATE			115200 -#define CONFIG_SYS_BAUDRATE_TABLE	{4800, 9600, 19200, 38400, 57600, 115200} -#define CONFIG_GENERIC_MMC		1 -#define CONFIG_MMC			1 -#define CONFIG_OMAP_HSMMC		1 -#define CONFIG_DOS_PARTITION		1 - -/* USB */ -#define CONFIG_MUSB_UDC			1 -#define CONFIG_USB_OMAP3		1 -#define CONFIG_TWL4030_USB		1 - -/* USB device configuration */ -#define CONFIG_USB_DEVICE		1 -#define CONFIG_USB_TTY			1 -#define CONFIG_SYS_CONSOLE_IS_IN_ENV	1 - -/* Change these to suit your needs */ -#define CONFIG_USBD_VENDORID		0x0451 -#define CONFIG_USBD_PRODUCTID		0x5678 -#define CONFIG_USBD_MANUFACTURER	"Texas Instruments" -#define CONFIG_USBD_PRODUCT_NAME	"IGEP" - -/* commands to include */ -#include <config_cmd_default.h> - -#define CONFIG_CMD_CACHE -#define CONFIG_CMD_EXT2		/* EXT2 Support			*/ -#define CONFIG_CMD_FAT		/* FAT support			*/ -#define CONFIG_CMD_I2C		/* I2C serial bus support	*/ -#define CONFIG_CMD_MMC		/* MMC support			*/ -#define CONFIG_CMD_ONENAND	/* ONENAND support		*/ -#define CONFIG_CMD_MTDPARTS	/* Enable MTD parts commands	*/ -#define CONFIG_MTD_DEVICE - -#undef CONFIG_CMD_NET		/* bootp, tftpboot, rarpboot	*/ -#undef CONFIG_CMD_NFS		/* nfs				*/ -#undef CONFIG_CMD_FLASH		/* flinfo, erase, protect	*/ -#undef CONFIG_CMD_IMLS		/* List all found images	*/ - -#define CONFIG_SYS_NO_FLASH -#define CONFIG_HARD_I2C			1 -#define CONFIG_SYS_I2C_SPEED		100000 -#define CONFIG_SYS_I2C_SLAVE		1 -#define CONFIG_SYS_I2C_BUS		0 -#define CONFIG_SYS_I2C_BUS_SELECT	1 -#define CONFIG_DRIVER_OMAP34XX_I2C	1 - -/* - * TWL4030 - */ -#define CONFIG_TWL4030_POWER		1 - -#define CONFIG_BOOTDELAY		3 - -#define CONFIG_EXTRA_ENV_SETTINGS \ -	"usbtty=cdc_acm\0" \ -	"loadaddr=0x82000000\0" \ -	"usbtty=cdc_acm\0" \ -	"console=ttyS2,115200n8\0" \ -	"mpurate=500\0" \ -	"vram=12M\0" \ -	"dvimode=1024x768MR-16@60\0" \ -	"defaultdisplay=dvi\0" \ -	"mmcdev=0\0" \ -	"mmcroot=/dev/mmcblk0p2 rw\0" \ -	"mmcrootfstype=ext3 rootwait\0" \ -	"nandroot=/dev/mtdblock4 rw\0" \ -	"nandrootfstype=jffs2\0" \ -	"mmcargs=setenv bootargs console=${console} " \ -		"mpurate=${mpurate} " \ -		"vram=${vram} " \ -		"omapfb.mode=dvi:${dvimode} " \ -		"omapfb.debug=y " \ -		"omapdss.def_disp=${defaultdisplay} " \ -		"root=${mmcroot} " \ -		"rootfstype=${mmcrootfstype}\0" \ -	"nandargs=setenv bootargs console=${console} " \ -		"mpurate=${mpurate} " \ -		"vram=${vram} " \ -		"omapfb.mode=dvi:${dvimode} " \ -		"omapfb.debug=y " \ -		"omapdss.def_disp=${defaultdisplay} " \ -		"root=${nandroot} " \ -		"rootfstype=${nandrootfstype}\0" \ -	"loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \ -	"bootscript=echo Running bootscript from mmc ...; " \ -		"source ${loadaddr}\0" \ -	"loaduimage=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \ -	"mmcboot=echo Booting from mmc ...; " \ -		"run mmcargs; " \ -		"bootm ${loadaddr}\0" \ -	"nandboot=echo Booting from onenand ...; " \ -		"run nandargs; " \ -		"onenand read ${loadaddr} 280000 400000; " \ -		"bootm ${loadaddr}\0" \ - -#define CONFIG_BOOTCOMMAND \ -	"if mmc rescan ${mmcdev}; then " \ -		"if run loadbootscript; then " \ -			"run bootscript; " \ -		"else " \ -			"if run loaduimage; then " \ -				"run mmcboot; " \ -			"else run nandboot; " \ -			"fi; " \ -		"fi; " \ -	"else run nandboot; fi" - -#define CONFIG_AUTO_COMPLETE		1 - -/* - * Miscellaneous configurable options - */ -#define CONFIG_SYS_LONGHELP		/* undef to save memory */ -#define CONFIG_SYS_HUSH_PARSER		/* use "hush" command parser */ -#define CONFIG_SYS_PROMPT_HUSH_PS2	"> " -#define CONFIG_SYS_PROMPT		"U-Boot # " -#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) - -#define CONFIG_SYS_MEMTEST_START	(OMAP34XX_SDRC_CS0)	/* memtest */ -								/* works on */ -#define CONFIG_SYS_MEMTEST_END		(OMAP34XX_SDRC_CS0 + \ -					0x01F00000) /* 31MB */ - -#define CONFIG_SYS_LOAD_ADDR		(OMAP34XX_SDRC_CS0)	/* default */ -							/* load address */ - -#define CONFIG_SYS_MONITOR_LEN		(256 << 10) - -/* - * OMAP3 has 12 GP timers, they can be driven by the system clock - * (12/13/16.8/19.2/38.4MHz) or by 32KHz clock. We use 13MHz (V_SCLK). - * This rate is divided by a local divisor. - */ -#define CONFIG_SYS_TIMERBASE		(OMAP34XX_GPT2) -#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 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 -#define PHYS_SDRAM_1_SIZE	(32 << 20)	/* at least 32 meg */ -#define PHYS_SDRAM_2		OMAP34XX_SDRC_CS1 - -/* - * FLASH and environment organization - */ - -#define PISMO1_ONEN_SIZE		GPMC_SIZE_128M /* Configure the PISMO */ - -#define CONFIG_SYS_ONENAND_BASE		ONENAND_MAP - -#define ONENAND_ENV_OFFSET		0x260000 /* environment starts here */ - -#define CONFIG_ENV_IS_IN_ONENAND	1 -#define CONFIG_ENV_SIZE			(512 << 10) /* Total Size Environment */ -#define CONFIG_ENV_ADDR			ONENAND_ENV_OFFSET - -/* - * Size of malloc() pool - */ -#define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + (128 << 10)) - -#define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM_1 -#define CONFIG_SYS_INIT_RAM_ADDR	0x4020f800 -#define CONFIG_SYS_INIT_RAM_SIZE	0x800 -#define CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_INIT_RAM_ADDR + \ -					 CONFIG_SYS_INIT_RAM_SIZE - \ -					 GENERATED_GBL_DATA_SIZE) - -#endif /* __CONFIG_H */ diff --git a/include/configs/igep0020.h b/include/configs/igep00x0.h index c2fcdffda..a99f332a8 100644 --- a/include/configs/igep0020.h +++ b/include/configs/igep00x0.h @@ -1,5 +1,7 @@  /* - * (C) Copyright 2010 + * Common configuration settings for IGEP technology based boards + * + * (C) Copyright 2012   * ISEE 2007 SL, <www.iseebcn.com>   *   * This program is free software; you can redistribute it and/or @@ -18,8 +20,9 @@   * MA 02111-1307 USA   */ -#ifndef __CONFIG_H -#define __CONFIG_H +#ifndef __IGEP00X0_H +#define __IGEP00X0_H +  #include <asm/sizes.h>  /* @@ -27,7 +30,6 @@   */  #define CONFIG_OMAP		1	/* in a TI OMAP core */  #define CONFIG_OMAP34XX		1	/* which is a 34XX */ -#define CONFIG_OMAP3_IGEP0020	1	/* working with IGEP0020 */  #define CONFIG_SDRC	/* The chip has SDRC controller */ @@ -72,7 +74,8 @@  /* allow to overwrite serial and ethaddr */  #define CONFIG_ENV_OVERWRITE  #define CONFIG_BAUDRATE			115200 -#define CONFIG_SYS_BAUDRATE_TABLE	{4800, 9600, 19200, 38400, 57600, 115200} +#define CONFIG_SYS_BAUDRATE_TABLE	{4800, 9600, 19200, 38400, 57600, \ +					115200}  #define CONFIG_GENERIC_MMC		1  #define CONFIG_MMC			1  #define CONFIG_OMAP_HSMMC		1 @@ -133,7 +136,7 @@  	"loadaddr=0x82000000\0" \  	"usbtty=cdc_acm\0" \  	"console=ttyS2,115200n8\0" \ -	"mpurate=500\0" \ +	"mpurate=auto\0" \  	"vram=12M\0" \  	"dvimode=1024x768MR-16@60\0" \  	"defaultdisplay=dvi\0" \ @@ -158,9 +161,9 @@  		"omapdss.def_disp=${defaultdisplay} " \  		"root=${nandroot} " \  		"rootfstype=${nandrootfstype}\0" \ -	"loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \ -	"bootscript=echo Running bootscript from mmc ...; " \ -		"source ${loadaddr}\0" \ +	"loadbootenv=fatload mmc ${mmcdev} ${loadaddr} uEnv.txt\0" \ +	"importbootenv=echo Importing environment from mmc ...; " \ +		"env import -t $loadaddr $filesize\0" \  	"loaduimage=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \  	"mmcboot=echo Booting from mmc ...; " \  		"run mmcargs; " \ @@ -172,15 +175,19 @@  #define CONFIG_BOOTCOMMAND \  	"if mmc rescan ${mmcdev}; then " \ -		"if run loadbootscript; then " \ -			"run bootscript; " \ -		"else " \ -			"if run loaduimage; then " \ -				"run mmcboot; " \ -			"else run nandboot; " \ -			"fi; " \ -		"fi; " \ -	"else run nandboot; fi" +		"echo SD/MMC found on device ${mmcdev};" \ +		"if run loadbootenv; then " \ +			"run importbootenv;" \ +		"fi;" \ +		"if test -n $uenvcmd; then " \ +			"echo Running uenvcmd ...;" \ +			"run uenvcmd;" \ +		"fi;" \ +		"if run loaduimage; then " \ +			"run mmcboot;" \ +		"fi;" \ +	"fi;" \ +	"run nandboot;" \  #define CONFIG_AUTO_COMPLETE		1 @@ -269,4 +276,4 @@  					 CONFIG_SYS_INIT_RAM_SIZE - \  					 GENERATED_GBL_DATA_SIZE) -#endif /* __CONFIG_H */ +#endif /* __IGEP00X0_H */ diff --git a/include/configs/ima3-mx53.h b/include/configs/ima3-mx53.h new file mode 100644 index 000000000..ea48d6463 --- /dev/null +++ b/include/configs/ima3-mx53.h @@ -0,0 +1,269 @@ +/* + * (C) Copyright 2012, Stefano Babic <sbabic@denx.de> + * + * Copyright (C) 2010 Freescale Semiconductor, Inc. + * + * Configuration settings for the MX53-EVK Freescale board. + * + * 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. + */ + +#ifndef __CONFIG_H +#define __CONFIG_H + +/* SOC type must be included before imx-regs.h */ +#define CONFIG_MX53 +#include <asm/arch/imx-regs.h> +#include <asm/arch/mx5x_pins.h> + +#define CONFIG_SYS_MX5_HCLK		24000000 +#define CONFIG_SYS_MX5_CLK32		32768 + +#define CONFIG_DISPLAY_CPUINFO +#define CONFIG_DISPLAY_BOARDINFO + +#define CONFIG_CMDLINE_TAG		/* enable passing of ATAGs */ +#define CONFIG_SETUP_MEMORY_TAGS +#define CONFIG_INITRD_TAG + +#define CONFIG_OF_LIBFDT + +/* Size of malloc() pool */ +#define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + 2 * 1024 * 1024) + +#define CONFIG_BOARD_EARLY_INIT_F + +/* Enable GPIOs */ +#define CONFIG_MXC_GPIO + +/* UART */ +#define CONFIG_MXC_UART +#define CONFIG_MXC_UART_BASE	UART4_BASE_ADDR + +/* MMC */ +#define CONFIG_FSL_ESDHC +#define CONFIG_SYS_FSL_ESDHC_ADDR	0 +#define CONFIG_SYS_FSL_ESDHC_NUM	1 + +#define CONFIG_MMC +#define CONFIG_GENERIC_MMC +#define CONFIG_DOS_PARTITION + +/* 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 +#define CONFIG_FEC_MXC_PHYADDR		0x01 +#define CONFIG_PHY_ADDR			CONFIG_FEC_MXC_PHYADDR +#define CONFIG_RESET_PHY_R +#define CONFIG_FEC_MXC_NO_ANEG +#define CONFIG_PRIME	"FEC0" + +/* SPI */ +#define CONFIG_HARD_SPI +#define CONFIG_MXC_SPI +#define CONFIG_DEFAULT_SPI_BUS		1 +#define CONFIG_DEFAULT_SPI_MODE		SPI_MODE_0 + +/* SPI FLASH - not used for environment */ +#define CONFIG_SPI_FLASH +#define CONFIG_SPI_FLASH_STMICRO +#define CONFIG_SPI_FLASH_CS		(IOMUX_TO_GPIO(MX53_PIN_CSI0_D11) \ +						 << 8) | 0 +#define CONFIG_SF_DEFAULT_MODE		SPI_MODE_0 +#define CONFIG_SF_DEFAULT_SPEED		25000000 + +/* allow to overwrite serial and ethaddr */ +#define CONFIG_ENV_OVERWRITE +#define CONFIG_CONS_INDEX		1 +#define CONFIG_BAUDRATE			115200 +#define CONFIG_SYS_BAUDRATE_TABLE	{9600, 19200, 38400, 57600, 115200} + +/* Command definition */ +#include <config_cmd_default.h> +#define CONFIG_CMD_PING +#define CONFIG_CMD_DHCP +#define CONFIG_CMD_MII +#define CONFIG_CMD_MMC +#define CONFIG_CMD_FAT +#define CONFIG_CMD_EXT2 +#define CONFIG_CMD_MTDPARTS +#define CONFIG_CMD_SPI +#define CONFIG_CMD_SF +#define CONFIG_CMD_GPIO + +#define CONFIG_BOOTDELAY	3 + +#define CONFIG_LOADADDR		0x70800000	/* loadaddr env var */ +#define CONFIG_SYS_TEXT_BASE    0xf0001400 /* uboot in nor flash */ + +#define CONFIG_ARP_TIMEOUT	200UL + +/* Miscellaneous configurable options */ +#define CONFIG_SYS_LONGHELP		/* undef to save memory */ +#define CONFIG_SYS_HUSH_PARSER		/* use "hush" command parser */ +#define CONFIG_SYS_PROMPT_HUSH_PS2	"> " +#define CONFIG_SYS_PROMPT		"IMA3 MX53 U-Boot > " +#define CONFIG_AUTO_COMPLETE +#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_MEMTEST_START       0x70000000 +#define CONFIG_SYS_MEMTEST_END         0x10000 + +#define CONFIG_SYS_LOAD_ADDR		CONFIG_LOADADDR + +#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 +#define PHYS_SDRAM_1_SIZE	(1024 * 1024 * 1024) + +#define CONFIG_SYS_SDRAM_BASE		(PHYS_SDRAM_1) +#define CONFIG_SYS_INIT_RAM_ADDR	(IRAM_BASE_ADDR) +#define CONFIG_SYS_INIT_RAM_SIZE	(IRAM_SIZE) + +#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) + +#define CONFIG_MTD_DEVICE		/* needed for mtdparts commands */ +#define MTDIDS_DEFAULT		"nor0=f0000000.flash" + +/* FLASH and environment organization */ + +#define CONFIG_SYS_FLASH_BASE		0xF0000000 +#define CONFIG_SYS_FLASH_CFI		/* Flash is CFI conformant */ +#define CONFIG_FLASH_CFI_DRIVER		/* Use the common driver */ +#define CONFIG_FLASH_CFI_MTD		/* with MTD support */ +#define CONFIG_SYS_FLASH_BANKS_LIST	{ CONFIG_SYS_FLASH_BASE } +#define CONFIG_SYS_MAX_FLASH_BANKS	1 +#define CONFIG_SYS_MAX_FLASH_SECT	1024 + +#define CONFIG_SYS_FLASH_EMPTY_INFO +#define CONFIG_SYS_FLASH_USE_BUFFER_WRITE + +#define CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_FLASH_BASE +#define CONFIG_SYS_MONITOR_LEN		(512 * 1024) + +#define CONFIG_ENV_SIZE        (8 * 1024) +#define CONFIG_ENV_IS_IN_FLASH +#define CONFIG_ENV_ADDR		(CONFIG_SYS_MONITOR_BASE + \ +				CONFIG_SYS_MONITOR_LEN) +#define CONFIG_ENV_SECT_SIZE	0x20000 +#define CONFIG_ENV_OFFSET_REDUND	(CONFIG_ENV_OFFSET + \ +					CONFIG_ENV_SECT_SIZE) +#define CONFIG_ENV_SIZE_REDUND	CONFIG_ENV_SIZE + +/* + * Default environment and default scripts + * to update uboot and load kernel + */ + +#define HOSTNAME ima3-mx53 +#define xstr(s)	str(s) +#define str(s)	#s + +#define CONFIG_HOSTNAME ima3-mx53 +#define	CONFIG_EXTRA_ENV_SETTINGS					\ +	"netdev=eth0\0"							\ +	"nfsargs=setenv bootargs root=/dev/nfs rw "			\ +		"nfsroot=${serverip}:${rootpath}\0"			\ +	"ramargs=setenv bootargs root=/dev/ram0 rw\0"			\ +	"addip_sta=setenv bootargs ${bootargs} "			\ +		"ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}"	\ +		":${hostname}:${netdev}:off panic=1\0"			\ +	"addip_dyn=setenv bootargs ${bootargs} ip=dhcp\0"		\ +	"addip=if test -n ${ipdyn};then run addip_dyn;"			\ +		"else run addip_sta;fi\0"	\ +	"addmtd=setenv bootargs ${bootargs} ${mtdparts}\0"		\ +	"addtty=setenv bootargs ${bootargs}"				\ +		" console=${console},${baudrate}\0"			\ +	"addmisc=setenv bootargs ${bootargs} ${misc}\0"			\ +	"console=ttymxc3\0"						\ +	"loadaddr=70800000\0"						\ +	"kernel_addr_r=70800000\0"					\ +	"ramdisk_addr_r=71000000\0"					\ +	"hostname=" xstr(CONFIG_HOSTNAME) "\0"				\ +	"bootfile=" xstr(CONFIG_HOSTNAME) "/uImage\0"			\ +	"ramdisk_file=" xstr(CONFIG_HOSTNAME) "/uRamdisk\0"		\ +	"mmcargs=setenv bootargs root=${mmcroot} "			\ +		"rootfstype=${mmcrootfstype}\0"				\ +	"mmcroot=/dev/mmcblk0p3 rw\0"					\ +	"mmcboot=echo Booting from mmc ...; "				\ +		"run mmcargs addip addtty addmtd addmisc mmcload;"	\ +		"bootm\0"						\ +	"mmcload=fatload mmc ${mmcdev}:${mmcpart} "			\ +		"${loadaddr} ${uimage}\0"				\ +	"mmcrootfstype=ext3 rootwait\0"					\ +	"flash_self=run ramargs addip addtty addmtd addmisc;"		\ +		"bootm ${kernel_addr} ${ramdisk_addr}\0"		\ +	"flash_nfs=run nfsargs addip addtty addmtd addmisc;"		\ +		"bootm ${kernel_addr}\0"				\ +	"net_nfs=tftp ${kernel_addr_r} ${bootfile}; "			\ +		"run nfsargs addip addtty addmtd addmisc;"		\ +		"bootm ${kernel_addr_r}\0"				\ +	"net_self_load=tftp ${ramdisk_addr_r} ${ramdisk_file};"		\ +		"tftp ${kernel_addr_r} ${bootfile}\0"			\ +	"net_self=if run net_self_load;then "				\ +		"run ramargs addip addtty addmtd addmisc;"		\ +		"bootm ${kernel_addr_r} ${ramdisk_addr_r};"		\ +		"else echo Images not loades;fi\0"			\ +	"satargs=setenv bootargs root=/dev/sda1\0"			\ +	"satafile=boot/uImage\0"					\ +	"ssdboot=echo Booting from ssd ...; "				\ +		"run satargs addip addtty addmtd addmisc;"		\ +		"sata init;ext2load sata 0:1 ${kernel_addr_r} "		\ +		"${satafile};bootm\0"					\ +	"u-boot=" xstr(CONFIG_HOSTNAME) "/u-boot.imx\0"			\ +	"uimage=uImage\0"						\ +	"load=tftp ${loadaddr} ${u-boot}\0"				\ +	"uboot_addr=0xf0001000\0"					\ +	"update=protect off 0xf0000000 +60000;"				\ +		"erase ${uboot_addr} +60000;"				\ +		"cp.b ${loadaddr} ${uboot_addr} ${filesize}\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"		\ +	"bootcmd=run net_nfs\0" + + +#define CONFIG_CMD_SATA +#ifdef CONFIG_CMD_SATA +	#define CONFIG_DWC_AHSATA +	#define CONFIG_SYS_SATA_MAX_DEVICE      1 +	#define CONFIG_DWC_AHSATA_PORT_ID       0 +	#define CONFIG_DWC_AHSATA_BASE_ADDR     SATA_BASE_ADDR +	#define CONFIG_LBA48 +	#define CONFIG_LIBATA +#endif + +#endif				/* __CONFIG_H */ diff --git a/include/configs/imx27lite-common.h b/include/configs/imx27lite-common.h index 2af4e7af3..c1f1aa6a8 100644 --- a/include/configs/imx27lite-common.h +++ b/include/configs/imx27lite-common.h @@ -153,7 +153,6 @@  #define CONFIG_SYS_NAND_BASE		0xd8000000  #define CONFIG_JFFS2_NAND  #define CONFIG_MXC_NAND_HWECC -#define CONFIG_SYS_64BIT_VSPRINTF	/* needed for nand_util.c */  /*   * SD/MMC diff --git a/include/configs/m28evk.h b/include/configs/m28evk.h index 012381a50..c62f4d01f 100644 --- a/include/configs/m28evk.h +++ b/include/configs/m28evk.h @@ -43,6 +43,8 @@  #define	CONFIG_ARCH_CPU_INIT  #define	CONFIG_ARCH_MISC_INIT +#define CONFIG_OF_LIBFDT +  /*   * SPL   */ @@ -52,6 +54,7 @@  #define	CONFIG_SPL_LDSCRIPT	"arch/arm/cpu/arm926ejs/mx28/u-boot-spl.lds"  #define	CONFIG_SPL_LIBCOMMON_SUPPORT  #define	CONFIG_SPL_LIBGENERIC_SUPPORT +#define	CONFIG_SPL_GPIO_SUPPORT  /*   * U-Boot Commands @@ -84,7 +87,7 @@   */  #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	PHYS_SDRAM_1_SIZE		0x20000000	/* Max 512 MB 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 */ @@ -279,6 +282,7 @@  #define	CONFIG_BOOTCOMMAND	"run bootcmd_net"  #define	CONFIG_LOADADDR		0x42000000  #define	CONFIG_SYS_LOAD_ADDR	CONFIG_LOADADDR +#define	CONFIG_OF_LIBFDT  /*   * Extra Environments @@ -286,6 +290,7 @@  #define	CONFIG_EXTRA_ENV_SETTINGS					\  	"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 */	\ @@ -312,6 +317,14 @@  		"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"  #endif /* __M28_H__ */ diff --git a/include/configs/mcx.h b/include/configs/mcx.h index 1315c3ceb..f6a83a850 100644 --- a/include/configs/mcx.h +++ b/include/configs/mcx.h @@ -171,8 +171,6 @@  #define CONFIG_SYS_MAX_NAND_DEVICE	1		/* Max number of */  							/* NAND devices */ -#define CONFIG_SYS_64BIT_VSPRINTF		/* needed for nand_util.c */ -  #define CONFIG_JFFS2_NAND  /* nand device jffs2 lives on */  #define CONFIG_JFFS2_DEV		"nand0" @@ -327,7 +325,7 @@  #define CONFIG_SPL_LDSCRIPT		"$(CPUDIR)/omap-common/u-boot-spl.lds"  #define CONFIG_SPL_TEXT_BASE		0x40200000 /*CONFIG_SYS_SRAM_START*/ -#define CONFIG_SPL_MAX_SIZE		(45 << 10) +#define CONFIG_SPL_MAX_SIZE		(54 * 1024)	/* 8 KB for stack */  #define CONFIG_SPL_STACK		LOW_LEVEL_SRAM_STACK  /* move malloc and bss high to prevent clashing with the main image */ diff --git a/include/configs/meesc.h b/include/configs/meesc.h index d6197bc61..db1e87d69 100644 --- a/include/configs/meesc.h +++ b/include/configs/meesc.h @@ -164,7 +164,6 @@  # define CONFIG_SYS_NAND_MASK_CLE		(1 << 22)  # define CONFIG_SYS_NAND_ENABLE_PIN		AT91_PIO_PORTD, 15  # define CONFIG_SYS_NAND_READY_PIN		AT91_PIO_PORTA, 22 -# define CONFIG_SYS_64BIT_VSPRINTF		/* needed for nand_util.c */  #endif  /* Ethernet */ diff --git a/include/configs/mv-common.h b/include/configs/mv-common.h index 1a6379176..27b489902 100644 --- a/include/configs/mv-common.h +++ b/include/configs/mv-common.h @@ -132,7 +132,6 @@   */  #ifdef CONFIG_CMD_NAND  #define CONFIG_SYS_MAX_NAND_DEVICE     1 -#define CONFIG_SYS_64BIT_VSPRINTF      /* needed for nand_util.c */  #endif  /* diff --git a/include/configs/mx25pdk.h b/include/configs/mx25pdk.h index d1ba02b6e..7210b6e80 100644 --- a/include/configs/mx25pdk.h +++ b/include/configs/mx25pdk.h @@ -65,7 +65,6 @@  #define CONFIG_ENV_IS_NOWHERE  #define CONFIG_SYS_NO_FLASH -#define CONFIG_SYS_64BIT_VSPRINTF  /* U-Boot general configuration */  #define CONFIG_SYS_PROMPT	"MX25PDK U-Boot > " diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h index 02f3366ed..0c18e5022 100644 --- a/include/configs/mx28evk.h +++ b/include/configs/mx28evk.h @@ -46,6 +46,7 @@  #define CONFIG_SPL_LDSCRIPT	"arch/arm/cpu/arm926ejs/mx28/u-boot-spl.lds"  #define CONFIG_SPL_LIBCOMMON_SUPPORT  #define CONFIG_SPL_LIBGENERIC_SUPPORT +#define CONFIG_SPL_GPIO_SUPPORT  /*   * U-Boot Commands @@ -67,6 +68,7 @@  #define CONFIG_CMD_SF  #define CONFIG_CMD_SPI  #define CONFIG_CMD_USB +#define CONFIG_CMD_BOOTZ  /*   * Memory configurations @@ -148,6 +150,16 @@  #endif  /* + * NAND Driver + */ +#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 +#endif + +/*   * Ethernet on SOC (FEC)   */  #ifdef	CONFIG_CMD_NET @@ -225,6 +237,7 @@  #define CONFIG_BOOTCOMMAND	"run bootcmd_net"  #define CONFIG_LOADADDR	0x42000000  #define CONFIG_SYS_LOAD_ADDR	CONFIG_LOADADDR +#define CONFIG_OF_LIBFDT  /*   * Extra Environments diff --git a/include/configs/mx31pdk.h b/include/configs/mx31pdk.h index 49d440b9a..6ce97bc69 100644 --- a/include/configs/mx31pdk.h +++ b/include/configs/mx31pdk.h @@ -99,6 +99,7 @@  #define CONFIG_CMD_SPI  #define CONFIG_CMD_DATE  #define CONFIG_CMD_NAND +#define CONFIG_CMD_BOOTZ  /*   * Disabled due to compilation errors in cmd_bootm.c (IMLS seems to require diff --git a/include/configs/mx35pdk.h b/include/configs/mx35pdk.h index de4b954a5..bd57baa80 100644 --- a/include/configs/mx35pdk.h +++ b/include/configs/mx35pdk.h @@ -39,8 +39,6 @@  #define CONFIG_SYS_TEXT_BASE	0xA0000000  #define CONFIG_SYS_CACHELINE_SIZE	32 -#define CONFIG_SYS_64BIT_VSPRINTF -  #define CONFIG_BOARD_EARLY_INIT_F  #define CONFIG_BOARD_LATE_INIT diff --git a/include/configs/mx53loco.h b/include/configs/mx53loco.h index 34a4edd41..eab0e27fb 100644 --- a/include/configs/mx53loco.h +++ b/include/configs/mx53loco.h @@ -27,7 +27,6 @@  #define CONFIG_SYS_MX5_HCLK	24000000  #define CONFIG_SYS_MX5_CLK32		32768 -#define CONFIG_DISPLAY_CPUINFO  #define CONFIG_DISPLAY_BOARDINFO  #define CONFIG_MACH_TYPE	MACH_TYPE_MX53_LOCO @@ -42,7 +41,9 @@  #define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + 2 * 1024 * 1024)  #define CONFIG_BOARD_EARLY_INIT_F +#define CONFIG_BOARD_LATE_INIT  #define CONFIG_MXC_GPIO +#define CONFIG_REVISION_TAG  #define CONFIG_MXC_UART  #define CONFIG_MXC_UART_BASE	UART1_BASE @@ -56,6 +57,7 @@  #define CONFIG_CMD_MMC  #define CONFIG_GENERIC_MMC  #define CONFIG_CMD_FAT +#define CONFIG_CMD_EXT2  #define CONFIG_DOS_PARTITION  /* Eth Configs */ @@ -85,6 +87,21 @@  #define CONFIG_MXC_USB_PORTSC	(PORT_PTS_UTMI | PORT_PTS_PTW)  #define CONFIG_MXC_USB_FLAGS	0 +/* I2C Configs */ +#define CONFIG_HARD_I2C +#define CONFIG_I2C_MXC +#define CONFIG_SYS_I2C_MX53_PORT1 +#define CONFIG_SYS_I2C_SPEED		100000 +#define CONFIG_SYS_I2C_SLAVE		0xfe + +/* PMIC Controller */ +#define CONFIG_PMIC +#define CONFIG_PMIC_I2C +#define CONFIG_DIALOG_PMIC +#define CONFIG_PMIC_FSL +#define CONFIG_SYS_DIALOG_PMIC_I2C_ADDR	0x48 +#define CONFIG_SYS_FSL_PMIC_I2C_ADDR	0x8 +  /* allow to overwrite serial and ethaddr */  #define CONFIG_ENV_OVERWRITE  #define CONFIG_CONS_INDEX		1 @@ -193,4 +210,14 @@  #define CONFIG_OF_LIBFDT +#define CONFIG_CMD_SATA +#ifdef CONFIG_CMD_SATA +	#define CONFIG_DWC_AHSATA +	#define CONFIG_SYS_SATA_MAX_DEVICE      1 +	#define CONFIG_DWC_AHSATA_PORT_ID       0 +	#define CONFIG_DWC_AHSATA_BASE_ADDR     SATA_BASE_ADDR +	#define CONFIG_LBA48 +	#define CONFIG_LIBATA +#endif +  #endif				/* __CONFIG_H */ diff --git a/include/configs/mx6qarm2.h b/include/configs/mx6qarm2.h index e83aec6c2..90652c662 100644 --- a/include/configs/mx6qarm2.h +++ b/include/configs/mx6qarm2.h @@ -168,6 +168,7 @@  #define CONFIG_SYS_MMC_ENV_DEV		1  #define CONFIG_OF_LIBFDT +#define CONFIG_CMD_BOOTZ  #define CONFIG_SYS_DCACHE_OFF diff --git a/include/configs/mx6qsabrelite.h b/include/configs/mx6qsabrelite.h index 3f7e51d87..feabc05a4 100644 --- a/include/configs/mx6qsabrelite.h +++ b/include/configs/mx6qsabrelite.h @@ -42,6 +42,7 @@  #define CONFIG_ARCH_CPU_INIT  #define CONFIG_BOARD_EARLY_INIT_F +#define CONFIG_MISC_INIT_R  #define CONFIG_MXC_GPIO  #define CONFIG_MXC_UART @@ -71,6 +72,19 @@  #define CONFIG_CMD_FAT  #define CONFIG_DOS_PARTITION +#define CONFIG_CMD_SATA +/* + * SATA Configs + */ +#ifdef CONFIG_CMD_SATA +#define CONFIG_DWC_AHSATA +#define CONFIG_SYS_SATA_MAX_DEVICE	1 +#define CONFIG_DWC_AHSATA_PORT_ID	0 +#define CONFIG_DWC_AHSATA_BASE_ADDR	SATA_ARB_BASE_ADDR +#define CONFIG_LBA48 +#define CONFIG_LIBATA +#endif +  #define CONFIG_CMD_PING  #define CONFIG_CMD_DHCP  #define CONFIG_CMD_MII @@ -110,6 +124,8 @@  #define CONFIG_BOOTDELAY	       3 +#define CONFIG_PREBOOT                 "" +  #define CONFIG_LOADADDR			       0x10800000  #define CONFIG_SYS_TEXT_BASE	       0x17800000 @@ -211,6 +227,7 @@  #endif  #define CONFIG_OF_LIBFDT +#define CONFIG_CMD_BOOTZ  #define CONFIG_SYS_DCACHE_OFF diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h index ddeb4146f..b891ee492 100644 --- a/include/configs/omap3_beagle.h +++ b/include/configs/omap3_beagle.h @@ -399,7 +399,7 @@  #define CONFIG_SPL  #define CONFIG_SPL_NAND_SIMPLE  #define CONFIG_SPL_TEXT_BASE		0x40200800 -#define CONFIG_SPL_MAX_SIZE		(45 * 1024) +#define CONFIG_SPL_MAX_SIZE		(54 * 1024)	/* 8 KB for stack */  #define CONFIG_SPL_STACK		LOW_LEVEL_SRAM_STACK  #define CONFIG_SPL_BSS_START_ADDR	0x80000000 @@ -410,6 +410,7 @@  #define CONFIG_SYS_MMC_SD_FAT_BOOT_PARTITION	1  #define CONFIG_SPL_FAT_LOAD_PAYLOAD_NAME	"u-boot.img" +#define CONFIG_SPL_BOARD_INIT  #define CONFIG_SPL_LIBCOMMON_SUPPORT  #define CONFIG_SPL_LIBDISK_SUPPORT  #define CONFIG_SPL_I2C_SUPPORT diff --git a/include/configs/omap3_evm_common.h b/include/configs/omap3_evm_common.h index 4910ddaa8..7b21a5c8c 100644 --- a/include/configs/omap3_evm_common.h +++ b/include/configs/omap3_evm_common.h @@ -282,12 +282,13 @@  /* Defines for SPL */  #define CONFIG_SPL  #define CONFIG_SPL_TEXT_BASE		0x40200800 -#define CONFIG_SPL_MAX_SIZE		(45 * 1024)	/* 45 KB */ +#define CONFIG_SPL_MAX_SIZE		(54 * 1024)	/* 8 KB for stack */  #define CONFIG_SPL_STACK		LOW_LEVEL_SRAM_STACK  #define CONFIG_SPL_BSS_START_ADDR	0x80000000  #define CONFIG_SPL_BSS_MAX_SIZE		0x80000		/* 512 KB */ +#define CONFIG_SPL_BOARD_INIT  #define CONFIG_SPL_LIBCOMMON_SUPPORT  #define CONFIG_SPL_LIBDISK_SUPPORT  #define CONFIG_SPL_I2C_SUPPORT diff --git a/include/configs/omap3_overo.h b/include/configs/omap3_overo.h index 64adc7455..a0a7a1c42 100644 --- a/include/configs/omap3_overo.h +++ b/include/configs/omap3_overo.h @@ -303,7 +303,7 @@  #define CONFIG_SPL  #define CONFIG_SPL_NAND_SIMPLE  #define CONFIG_SPL_TEXT_BASE		0x40200800 -#define CONFIG_SPL_MAX_SIZE		(45 * 1024) +#define CONFIG_SPL_MAX_SIZE		(54 * 1024)	/* 8 KB for stack */  #define CONFIG_SPL_STACK		LOW_LEVEL_SRAM_STACK  /* move malloc and bss high to prevent clashing with the main image */ @@ -317,6 +317,7 @@  #define CONFIG_SYS_MMC_SD_FAT_BOOT_PARTITION	1  #define CONFIG_SPL_FAT_LOAD_PAYLOAD_NAME	"u-boot.img" +#define CONFIG_SPL_BOARD_INIT  #define CONFIG_SPL_LIBCOMMON_SUPPORT  #define CONFIG_SPL_LIBDISK_SUPPORT  #define CONFIG_SPL_I2C_SUPPORT diff --git a/include/configs/omap3_pandora.h b/include/configs/omap3_pandora.h index 4df5f5dac..d02f33843 100644 --- a/include/configs/omap3_pandora.h +++ b/include/configs/omap3_pandora.h @@ -174,8 +174,7 @@  	"usbtty=cdc_acm\0" \  	"loadaddr=0x82000000\0" \  	"bootargs=ubi.mtd=4 ubi.mtd=3 root=ubi0:rootfs rootfstype=ubifs " \ -	"rw rootflags=bulk_read console=ttyS0,115200n8 " \ -	"vram=6272K omapfb.vram=0:3000K\0" \ +		"rw rootflags=bulk_read vram=6272K omapfb.vram=0:3000K\0" \  	"mtdparts=" MTDPARTS_DEFAULT "\0" \  #define CONFIG_BOOTCOMMAND \ diff --git a/include/configs/omap4_common.h b/include/configs/omap4_common.h index a989721af..072e17bab 100644 --- a/include/configs/omap4_common.h +++ b/include/configs/omap4_common.h @@ -35,7 +35,6 @@  #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_ARCH_CPU_INIT  /* Get CPU defs */  #include <asm/arch/cpu.h> @@ -106,7 +105,6 @@  #define CONFIG_GENERIC_MMC		1  #define CONFIG_MMC			1  #define CONFIG_OMAP_HSMMC		1 -#define CONFIG_SYS_MMC_SET_DEV		1  #define CONFIG_DOS_PARTITION		1 @@ -151,6 +149,7 @@  #define CONFIG_EXTRA_ENV_SETTINGS \  	"loadaddr=0x82000000\0" \  	"console=ttyO2,115200n8\0" \ +	"fdt_high=0xffffffff\0" \  	"usbtty=cdc_acm\0" \  	"vram=16M\0" \  	"mmcdev=0\0" \ @@ -287,4 +286,6 @@  #define CONFIG_SYS_ENABLE_PADS_ALL +#define CONFIG_SYS_THUMB_BUILD +  #endif /* __CONFIG_OMAP4_COMMON_H */ diff --git a/include/configs/omap5912osk.h b/include/configs/omap5912osk.h index a8dfef321..d3a2438e2 100644 --- a/include/configs/omap5912osk.h +++ b/include/configs/omap5912osk.h @@ -44,8 +44,6 @@  #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  */  #define CONFIG_SETUP_MEMORY_TAGS	1  #define CONFIG_INITRD_TAG      1       /* Required for ramdisk support */ diff --git a/include/configs/omap5_evm.h b/include/configs/omap5_evm.h index d3d526310..38b502806 100644 --- a/include/configs/omap5_evm.h +++ b/include/configs/omap5_evm.h @@ -38,7 +38,6 @@  #define CONFIG_OMAP54XX	/* which is a 54XX */  #define CONFIG_OMAP5430	/* which is in a 5430 */  #define CONFIG_5430EVM	/* working with EVM */ -#define CONFIG_ARCH_CPU_INIT  /* Get CPU defs */  #include <asm/arch/cpu.h> @@ -49,8 +48,10 @@  #define CONFIG_DISPLAY_BOARDINFO  /* Clock Defines */ -#define V_OSCK	38400000 /* Clock output from T2 */ +#define V_OSCK			19200000	/* Clock output from T2 */  #define V_SCLK	V_OSCK +#define CONFIG_SYS_CLOCKS_ENABLE_ALL	1	/* Enable all clocks */ +#define CONFIG_SYS_ENABLE_PADS_ALL	1	/* Enable all PADS for now */  #undef CONFIG_USE_IRQ	/* no support for IRQs */  #define CONFIG_MISC_INIT_R @@ -97,9 +98,10 @@  #define CONFIG_DRIVER_OMAP34XX_I2C  #define CONFIG_I2C_MULTI_BUS -/* TWL6030 */ -#define CONFIG_TWL6030_POWER -#define CONFIG_CMD_BAT +/* TWL6035 */ +#ifndef CONFIG_SPL_BUILD +#define CONFIG_TWL6035_POWER +#endif  /* MMC */  #define CONFIG_GENERIC_MMC @@ -111,14 +113,8 @@  #define CONFIG_ENV_IS_IN_MMC  #define CONFIG_SYS_MMC_ENV_DEV		1	/* SLOT2: eMMC(1) */  #define CONFIG_ENV_OFFSET		0xE0000 +#define CONFIG_CMD_SAVEENV -/* USB */ -#define CONFIG_MUSB_UDC -#define CONFIG_USB_OMAP3 - -/* USB device configuration */ -#define CONFIG_USB_DEVICE -#define CONFIG_USB_TTY  #define CONFIG_SYS_CONSOLE_IS_IN_ENV  /* Flash */ @@ -154,7 +150,7 @@  #define CONFIG_EXTRA_ENV_SETTINGS \  	"loadaddr=0x82000000\0" \ -	"console=ttyS2,115200n8\0" \ +	"console=ttyO2,115200n8\0" \  	"usbtty=cdc_acm\0" \  	"vram=16M\0" \  	"mmcdev=0\0" \ @@ -250,8 +246,8 @@  /* Defines for SPL */  #define CONFIG_SPL -#define CONFIG_SPL_TEXT_BASE		0x40304350 -#define CONFIG_SPL_MAX_SIZE		0x1E000	/* 120K */ +#define CONFIG_SPL_TEXT_BASE		0x40300350 +#define CONFIG_SPL_MAX_SIZE		0x19000	/* 100K */  #define CONFIG_SPL_STACK		LOW_LEVEL_SRAM_STACK  #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR	0x300 /* address 0x60000 */ diff --git a/include/configs/omap730p2.h b/include/configs/omap730p2.h index 26e7e1f1e..f7900e0d8 100644 --- a/include/configs/omap730p2.h +++ b/include/configs/omap730p2.h @@ -49,8 +49,6 @@  #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	 */  #define CONFIG_SETUP_MEMORY_TAGS   1 diff --git a/include/configs/origen.h b/include/configs/origen.h index 8ede82575..367f99184 100644 --- a/include/configs/origen.h +++ b/include/configs/origen.h @@ -69,9 +69,10 @@  #define EXYNOS4_DEFAULT_UART_OFFSET	0x020000  /* SD/MMC configuration */ -#define CONFIG_GENERIC_MMC		1 -#define CONFIG_MMC			1 -#define CONFIG_S5P_MMC			1 +#define CONFIG_GENERIC_MMC +#define CONFIG_MMC +#define CONFIG_SDHCI +#define CONFIG_S5P_SDHCI  /* PWM */  #define CONFIG_PWM			1 diff --git a/include/configs/otc570.h b/include/configs/otc570.h index b322c775a..85993789b 100644 --- a/include/configs/otc570.h +++ b/include/configs/otc570.h @@ -215,7 +215,6 @@  # define CONFIG_SYS_NAND_MASK_CLE		(1 << 22)  # define CONFIG_SYS_NAND_ENABLE_PIN		AT91_PIO_PORTD, 15  # define CONFIG_SYS_NAND_READY_PIN		AT91_PIO_PORTA, 22 -# define CONFIG_SYS_64BIT_VSPRINTF		/* needed for nand_util.c */  #endif  /* Ethernet */ diff --git a/include/configs/p1_p2_rdb_pc.h b/include/configs/p1_p2_rdb_pc.h index 9f2951d68..04fd8d07f 100644 --- a/include/configs/p1_p2_rdb_pc.h +++ b/include/configs/p1_p2_rdb_pc.h @@ -534,9 +534,6 @@  #define CONFIG_OF_BOARD_SETUP  #define CONFIG_OF_STDOUT_VIA_ALIAS -#define CONFIG_SYS_64BIT_VSPRINTF -#define CONFIG_SYS_64BIT_STRTOUL -  /* new uImage format support */  #define CONFIG_FIT  #define CONFIG_FIT_VERBOSE	/* enable fit_format_{error,warning}() */ diff --git a/include/configs/pogo_e02.h b/include/configs/pogo_e02.h new file mode 100644 index 000000000..df46be546 --- /dev/null +++ b/include/configs/pogo_e02.h @@ -0,0 +1,119 @@ +/* + * Copyright (C) 2012 + * David Purdy <david.c.purdy@gmail.com> + * + * Based on Kirkwood support: + * (C) Copyright 2009 + * Marvell Semiconductor <www.marvell.com> + * Written-by: Prafulla Wadaskar <prafulla@marvell.com> + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; If not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef _CONFIG_POGO_E02_H +#define _CONFIG_POGO_E02_H + +/* + * Machine type definition and ID + */ +#define MACH_TYPE_POGO_E02		3542 +#define CONFIG_MACH_TYPE		MACH_TYPE_POGO_E02 +#define CONFIG_IDENT_STRING		"\nPogo E02" + +/* + * High Level Configuration Options (easy to change) + */ +#define CONFIG_FEROCEON_88FR131		/* CPU Core subversion */ +#define CONFIG_KIRKWOOD			/* SOC Family Name */ +#define CONFIG_KW88F6281		/* SOC Name */ +#define CONFIG_SKIP_LOWLEVEL_INIT	/* disable board lowlevel_init */ + +/* + * Commands configuration + */ +#define CONFIG_SYS_NO_FLASH		/* Declare no flash (NOR/SPI) */ +#define CONFIG_SYS_MVFS +#include <config_cmd_default.h> +#define CONFIG_CMD_DHCP +#define CONFIG_CMD_ENV +#define CONFIG_CMD_MII +#define CONFIG_CMD_NAND +#define CONFIG_CMD_PING +#define CONFIG_CMD_USB + +/* + * mv-common.h should be defined after CMD configs since it used them + * to enable certain macros + */ +#include "mv-common.h" + +/* Remove or override few declarations from mv-common.h */ +#undef CONFIG_SYS_PROMPT	/* previously defined in mv-common.h */ +#define CONFIG_SYS_PROMPT	"PogoE02> " + +/* + *  Environment variables configurations + */ +#ifdef CONFIG_CMD_NAND +#define CONFIG_ENV_IS_IN_NAND +#define CONFIG_ENV_SECT_SIZE		0x20000	/* 128K */ +#else +#define CONFIG_ENV_IS_NOWHERE +#endif + +#define CONFIG_ENV_SIZE			0x20000	/* 128k */ +#define CONFIG_ENV_OFFSET		0x60000	/* env starts here */ + +/* + * Default environment variables + */ +#define CONFIG_BOOTCOMMAND \ +	"setenv bootargs $(bootargs_console); " \ +	"run bootcmd_usb; " \ +	"bootm 0x00800000 0x01100000" + +#define CONFIG_EXTRA_ENV_SETTINGS \ +	"mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage)," \ +	"32M(rootfs),-(data)\0"\ +	"mtdids=nand0=orion_nand\0"\ +	"bootargs_console=console=ttyS0,115200\0" \ +	"bootcmd_usb=usb start; ext2load usb 0:1 0x00800000 /uImage; " \ +	"ext2load usb 0:1 0x01100000 /uInitrd\0" + +/* + * Ethernet Driver configuration + */ +#ifdef CONFIG_CMD_NET +#define CONFIG_MVGBE_PORTS	{1, 0}	/* enable port 0 only */ +#define CONFIG_PHY_BASE_ADR	0 +#endif /* CONFIG_CMD_NET */ + +/* + * File system + */ +#define CONFIG_CMD_EXT2 +#define CONFIG_CMD_FAT +#define CONFIG_CMD_JFFS2 +#define CONFIG_CMD_UBI +#define CONFIG_CMD_UBIFS +#define CONFIG_RBTREE +#define CONFIG_MTD_DEVICE               /* needed for mtdparts commands */ +#define CONFIG_MTD_PARTITIONS +#define CONFIG_CMD_MTDPARTS +#define CONFIG_LZO + +#endif /* _CONFIG_POGO_E02_H */ diff --git a/include/configs/s5p_goni.h b/include/configs/s5p_goni.h index 56b5547fd..e133a1725 100644 --- a/include/configs/s5p_goni.h +++ b/include/configs/s5p_goni.h @@ -63,9 +63,10 @@  #define CONFIG_BAUDRATE			115200  /* MMC */ -#define CONFIG_GENERIC_MMC		1 -#define CONFIG_MMC			1 -#define CONFIG_S5P_MMC			1 +#define CONFIG_GENERIC_MMC +#define CONFIG_MMC +#define CONFIG_SDHCI +#define CONFIG_S5P_SDHCI  /* PWM */  #define CONFIG_PWM			1 diff --git a/include/configs/s5pc210_universal.h b/include/configs/s5pc210_universal.h index 13012756a..00db37418 100644 --- a/include/configs/s5pc210_universal.h +++ b/include/configs/s5pc210_universal.h @@ -66,9 +66,10 @@  #define CONFIG_BAUDRATE		115200  /* MMC */ -#define CONFIG_GENERIC_MMC	1 -#define CONFIG_MMC		1 -#define CONFIG_S5P_MMC		1 +#define CONFIG_GENERIC_MMC +#define CONFIG_MMC +#define CONFIG_SDHCI +#define CONFIG_S5P_SDHCI  /* PWM */  #define CONFIG_PWM			1 diff --git a/include/configs/seaboard.h b/include/configs/seaboard.h index ae075e786..46d42281b 100644 --- a/include/configs/seaboard.h +++ b/include/configs/seaboard.h @@ -25,6 +25,14 @@  #define __CONFIG_H  #include <asm/sizes.h> + +/* LP0 suspend / resume */ +#define CONFIG_TEGRA2_LP0 +#define CONFIG_AES +#define CONFIG_TEGRA_PMU +#define CONFIG_TPS6586X_POWER +#define CONFIG_TEGRA_CLOCK_SCALING +  #include "tegra2-common.h"  /* Enable fdt support for Seaboard. Flash the image in u-boot-dtb.bin */ @@ -92,4 +100,12 @@  #define CONFIG_USB_STORAGE  #define CONFIG_CMD_USB +/* Enable keyboard */ +#define CONFIG_TEGRA2_KEYBOARD +#define CONFIG_KEYBOARD + +#undef TEGRA2_DEVICE_SETTINGS +#define TEGRA2_DEVICE_SETTINGS	"stdin=serial,tegra-kbc\0" \ +					"stdout=serial\0" \ +					"stderr=serial\0"  #endif /* __CONFIG_H */ diff --git a/include/configs/smdk5250.h b/include/configs/smdk5250.h index 9659f9ebd..0f63040d2 100644 --- a/include/configs/smdk5250.h +++ b/include/configs/smdk5250.h @@ -78,7 +78,8 @@  /* SD/MMC configuration */  #define CONFIG_GENERIC_MMC  #define CONFIG_MMC -#define CONFIG_S5P_MMC +#define CONFIG_SDHCI +#define CONFIG_S5P_SDHCI  #define CONFIG_BOARD_EARLY_INIT_F diff --git a/include/configs/smdkv310.h b/include/configs/smdkv310.h index 93c25da1c..702134bda 100644 --- a/include/configs/smdkv310.h +++ b/include/configs/smdkv310.h @@ -68,9 +68,10 @@  #define EXYNOS4_DEFAULT_UART_OFFSET	0x010000  /* SD/MMC configuration */ -#define CONFIG_GENERIC_MMC		1 -#define CONFIG_MMC			1 -#define CONFIG_S5P_MMC			1 +#define CONFIG_GENERIC_MMC +#define CONFIG_MMC +#define CONFIG_SDHCI +#define CONFIG_S5P_SDHCI  /* PWM */  #define CONFIG_PWM			1 diff --git a/include/configs/spear-common.h b/include/configs/spear-common.h index a79181565..ab1b33209 100644 --- a/include/configs/spear-common.h +++ b/include/configs/spear-common.h @@ -196,7 +196,6 @@  #define CONFIG_SYS_BARGSIZE			CONFIG_SYS_CBSIZE  #define CONFIG_SYS_LOAD_ADDR			0x00800000  #define CONFIG_SYS_CONSOLE_INFO_QUIET		1 -#define CONFIG_SYS_64BIT_VSPRINTF		1  #define CONFIG_EXTRA_ENV_SETTINGS		CONFIG_EXTRA_ENV_USBTTY diff --git a/include/configs/tam3517-common.h b/include/configs/tam3517-common.h index 4c4321d2f..3fc2c4434 100644 --- a/include/configs/tam3517-common.h +++ b/include/configs/tam3517-common.h @@ -146,7 +146,6 @@  #define CONFIG_SYS_MAX_NAND_DEVICE	1		/* Max number of */  							/* NAND devices */ -#define CONFIG_SYS_64BIT_VSPRINTF		/* needed for nand_util.c */  #define CONFIG_AUTO_COMPLETE @@ -258,7 +257,7 @@  #define CONFIG_SPL_LDSCRIPT		"$(CPUDIR)/omap-common/u-boot-spl.lds"  #define CONFIG_SPL_TEXT_BASE		0x40200000 /*CONFIG_SYS_SRAM_START*/ -#define CONFIG_SPL_MAX_SIZE		(45 << 10)	/* 45 K */ +#define CONFIG_SPL_MAX_SIZE		(54 * 1024)	/* 8 KB for stack */  #define CONFIG_SPL_STACK		LOW_LEVEL_SRAM_STACK  #define CONFIG_SYS_SPL_MALLOC_START	0x8f000000 diff --git a/include/configs/tegra2-common.h b/include/configs/tegra2-common.h index 837f859c7..068ce8855 100644 --- a/include/configs/tegra2-common.h +++ b/include/configs/tegra2-common.h @@ -26,6 +26,14 @@  #include <asm/sizes.h>  /* + * QUOTE(m) will evaluate to a string version of the value of the macro m + * passed in.  The extra level of indirection here is to first evaluate the + * macro m before applying the quoting operator. + */ +#define QUOTE_(m)       #m +#define QUOTE(m)        QUOTE_(m) + +/*   * High Level Configuration Options   */  #define CONFIG_ARMCORTEXA9		/* This is an ARM V7 CPU core */ @@ -50,6 +58,15 @@  #define CONFIG_CMDLINE_TAG		/* enable passing of ATAGs */  #define CONFIG_OF_LIBFDT		/* enable passing of devicetree */ +#ifdef CONFIG_TEGRA2_LP0 +#define TEGRA_LP0_ADDR			0x1C406000 +#define TEGRA_LP0_SIZE			0x2000 +#define TEGRA_LP0_VEC \ +	"lp0_vec=" QUOTE(TEGRA_LP0_SIZE) "@" QUOTE(TEGRA_LP0_ADDR) " " +#else +#define TEGRA_LP0_VEC +#endif +  /* Environment */  #define CONFIG_ENV_SIZE			0x2000	/* Total Size Environment */ @@ -115,11 +132,18 @@  #define CONFIG_SYS_NO_FLASH -/* Environment information */ +/* 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 CONFIG_EXTRA_ENV_SETTINGS \  	"console=ttyS0,115200n8\0" \  	"mem=" TEGRA2_SYSMEM "\0" \  	"smpflag=smp\0" \ +	TEGRA2_DEVICE_SETTINGS  #define CONFIG_LOADADDR		0x408000	/* def. location for kernel */  #define CONFIG_BOOTDELAY	2		/* -1 to disable auto boot */ diff --git a/include/configs/trats.h b/include/configs/trats.h index 10f11d957..ef6510e67 100644 --- a/include/configs/trats.h +++ b/include/configs/trats.h @@ -53,7 +53,6 @@  #define CONFIG_SETUP_MEMORY_TAGS  #define CONFIG_CMDLINE_TAG -#define CONFIG_INITRD_TAG  #define CONFIG_REVISION_TAG  #define CONFIG_CMDLINE_EDITING  #define CONFIG_SKIP_LOWLEVEL_INIT @@ -74,7 +73,8 @@  /* MMC */  #define CONFIG_GENERIC_MMC  #define CONFIG_MMC -#define CONFIG_S5P_MMC +#define CONFIG_S5P_SDHCI +#define CONFIG_SDHCI  /* PWM */  #define CONFIG_PWM @@ -174,9 +174,9 @@  /* TRATS has 2 banks of DRAM */  #define CONFIG_NR_DRAM_BANKS	2  #define PHYS_SDRAM_1		CONFIG_SYS_SDRAM_BASE	/* LDDDR2 DMC 0 */ -#define PHYS_SDRAM_1_SIZE	(256 << 20)		/* 256 MB in CS 0 */ +#define PHYS_SDRAM_1_SIZE	(512 << 20)		/* 512 MB in CS 0 */  #define PHYS_SDRAM_2		0x50000000		/* LPDDR2 DMC 1 */ -#define PHYS_SDRAM_2_SIZE	(256 << 20)		/* 256 MB in CS 0 */ +#define PHYS_SDRAM_2_SIZE	(512 << 20)		/* 512 MB in CS 0 */  #define CONFIG_SYS_MEM_TOP_HIDE		(1 << 20)	/* ram console */ @@ -208,10 +208,18 @@  #define CONFIG_PMIC  #define CONFIG_PMIC_I2C -#define CONFIG_PMIC_MAX8998 +#define CONFIG_PMIC_MAX8997  #define CONFIG_USB_GADGET  #define CONFIG_USB_GADGET_S3C_UDC_OTG  #define CONFIG_USB_GADGET_DUALSPEED +/* LCD */ +#define CONFIG_EXYNOS_FB +#define CONFIG_LCD +#define CONFIG_FB_ADDR		0x52504000 +#define CONFIG_S6E8AX0 +#define CONFIG_EXYNOS_MIPI_DSIM +#define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE	(1280 * 720 * 4) +  #endif	/* __CONFIG_H */ diff --git a/include/configs/tricorder.h b/include/configs/tricorder.h index 801a24fd8..9955fca47 100644 --- a/include/configs/tricorder.h +++ b/include/configs/tricorder.h @@ -278,6 +278,7 @@  #define CONFIG_SPL  #define CONFIG_SPL_NAND_SIMPLE +#define CONFIG_SPL_BOARD_INIT  #define CONFIG_SPL_LIBCOMMON_SUPPORT  #define CONFIG_SPL_LIBDISK_SUPPORT  #define CONFIG_SPL_I2C_SUPPORT @@ -293,7 +294,7 @@  #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x300 /* address 0x60000 */  #define CONFIG_SPL_TEXT_BASE		0x40200000 /*CONFIG_SYS_SRAM_START*/ -#define CONFIG_SPL_MAX_SIZE		0xB400  /* 45 K */ +#define CONFIG_SPL_MAX_SIZE		(54 * 1024)	/* 8 KB for stack */  #define CONFIG_SPL_STACK		LOW_LEVEL_SRAM_STACK  #define CONFIG_SPL_BSS_START_ADDR	0x80000000 /*CONFIG_SYS_SDRAM_BASE*/ diff --git a/include/configs/tx25.h b/include/configs/tx25.h index 87bd8a675..3dfafa507 100644 --- a/include/configs/tx25.h +++ b/include/configs/tx25.h @@ -117,8 +117,6 @@  #define CONFIG_MXC_NAND_HWECC  #define CONFIG_SYS_NAND_LARGEPAGE -#define CONFIG_SYS_64BIT_VSPRINTF -  /* U-Boot general configuration */  #define CONFIG_SYS_PROMPT	"=> "	/* Monitor Command Prompt */  #define CONFIG_SYS_CBSIZE	1024	/* Console I/O Buffer Size  */ diff --git a/include/configs/zmx25.h b/include/configs/zmx25.h index 599d5bb42..d7ce6c64d 100644 --- a/include/configs/zmx25.h +++ b/include/configs/zmx25.h @@ -93,8 +93,6 @@  #define CONFIG_CMD_NET  #define CONFIG_CMD_CACHE -#define CONFIG_SYS_64BIT_VSPRINTF -  /*   * Additional command   */ diff --git a/include/dialog_pmic.h b/include/dialog_pmic.h new file mode 100644 index 000000000..8d43585e2 --- /dev/null +++ b/include/dialog_pmic.h @@ -0,0 +1,187 @@ +/* + * da9053 register declarations. + * + * Copyright(c) 2009 Dialog Semiconductor Ltd. + * + * 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 __DIALOG_PMIC_H__ +#define __DIALOG_PMIC_H__ + +enum { +	DA9053_PAGECON0_REG = 0, +	DA9053_STATUSA_REG, +	DA9053_STATUSB_REG, +	DA9053_STATUSC_REG, +	DA9053_STATUSD_REG, +	DA9053_EVENTA_REG, +	DA9053_EVENTB_REG, +	DA9053_EVENTC_REG, +	DA9053_EVENTD_REG, +	DA9053_FAULTLOG_REG, +	DA9053_IRQMASKA_REG, +	DA9053_IRQMASKB_REG, +	DA9053_IRQMASKC_REG, +	DA9053_IRQMASKD_REG, +	DA9053_CONTROLA_REG, +	DA9053_CONTROLB_REG, +	DA9053_CONTROLC_REG, +	DA9053_CONTROLD_REG, +	DA9053_PDDIS_REG, +	DA9053_INTERFACE_REG, +	DA9053_RESET_REG, +	DA9053_GPIO0001_REG, +	DA9053_GPIO0203_REG, +	DA9053_GPIO0405_REG, +	DA9053_GPIO0607_REG, +	DA9053_GPIO0809_REG, +	DA9053_GPIO1011_REG, +	DA9053_GPIO1213_REG, +	DA9053_GPIO1415_REG, +	DA9053_ID01_REG, +	DA9053_ID23_REG, +	DA9053_ID45_REG, +	DA9053_ID67_REG, +	DA9053_ID89_REG, +	DA9053_ID1011_REG, +	DA9053_ID1213_REG, +	DA9053_ID1415_REG, +	DA9053_ID1617_REG, +	DA9053_ID1819_REG, +	DA9053_ID2021_REG, +	DA9053_SEQSTATUS_REG, +	DA9053_SEQA_REG, +	DA9053_SEQB_REG, +	DA9053_SEQTIMER_REG, +	DA9053_BUCKA_REG, +	DA9053_BUCKB_REG, +	DA9053_BUCKCORE_REG, +	DA9053_BUCKPRO_REG, +	DA9053_BUCKMEM_REG, +	DA9053_BUCKPERI_REG, +	DA9053_LDO1_REG, +	DA9053_LDO2_REG, +	DA9053_LDO3_REG, +	DA9053_LDO4_REG, +	DA9053_LDO5_REG, +	DA9053_LDO6_REG, +	DA9053_LDO7_REG, +	DA9053_LDO8_REG, +	DA9053_LDO9_REG, +	DA9053_LDO10_REG, +	DA9053_SUPPLY_REG, +	DA9053_PULLDOWN_REG, +	DA9053_CHGBUCK_REG, +	DA9053_WAITCONT_REG, +	DA9053_ISET_REG, +	DA9053_BATCHG_REG, +	DA9053_CHGCONT_REG, +	DA9053_INPUTCONT_REG, +	DA9053_CHGTIME_REG, +	DA9053_BBATCONT_REG, +	DA9053_BOOST_REG, +	DA9053_LEDCONT_REG, +	DA9053_LEDMIN123_REG, +	DA9053_LED1CONF_REG, +	DA9053_LED2CONF_REG, +	DA9053_LED3CONF_REG, +	DA9053_LED1CONT_REG, +	DA9053_LED2CONT_REG, +	DA9053_LED3CONT_REG, +	DA9053_LED4CONT_REG, +	DA9053_LED5CONT_REG, +	DA9053_ADCMAN_REG, +	DA9053_ADCCONT_REG, +	DA9053_ADCRESL_REG, +	DA9053_ADCRESH_REG, +	DA9053_VDDRES_REG, +	DA9053_VDDMON_REG, +	DA9053_ICHGAV_REG, +	DA9053_ICHGTHD_REG, +	DA9053_ICHGEND_REG, +	DA9053_TBATRES_REG, +	DA9053_TBATHIGHP_REG, +	DA9053_TBATHIGHIN_REG, +	DA9053_TBATLOW_REG, +	DA9053_TOFFSET_REG, +	DA9053_ADCIN4RES_REG, +	DA9053_AUTO4HIGH_REG, +	DA9053_AUTO4LOW_REG, +	DA9053_ADCIN5RES_REG, +	DA9053_AUTO5HIGH_REG, +	DA9053_AUTO5LOW_REG, +	DA9053_ADCIN6RES_REG, +	DA9053_AUTO6HIGH_REG, +	DA9053_AUTO6LOW_REG, +	DA9053_TJUNCRES_REG, +	DA9053_TSICONTA_REG, +	DA9053_TSICONTB_REG, +	DA9053_TSIXMSB_REG, +	DA9053_TSIYMSB_REG, +	DA9053_TSILSB_REG, +	DA9053_TSIZMSB_REG, +	DA9053_COUNTS_REG, +	DA9053_COUNTMI_REG, +	DA9053_COUNTH_REG, +	DA9053_COUNTD_REG, +	DA9053_COUNTMO_REG, +	DA9053_COUNTY_REG, +	DA9053_ALARMMI_REG, +	DA9053_ALARMH_REG, +	DA9053_ALARMD_REG, +	DA9053_ALARMMO_REG, +	DA9053_ALARMY_REG, +	DA9053_SECONDA_REG, +	DA9053_SECONDB_REG, +	DA9053_SECONDC_REG, +	DA9053_SECONDD_REG, +	DA9053_PAGECON128_REG, +	DA9053_CHIPID_REG, +	DA9053_CONFIGID_REG, +	DA9053_OTPCONT_REG, +	DA9053_OSCTRIM_REG, +	DA9053_GPID0_REG, +	DA9053_GPID1_REG, +	DA9053_GPID2_REG, +	DA9053_GPID3_REG, +	DA9053_GPID4_REG, +	DA9053_GPID5_REG, +	DA9053_GPID6_REG, +	DA9053_GPID7_REG, +	DA9053_GPID8_REG, +	DA9053_GPID9_REG, +	DIALOG_NUM_OF_REGS, +}; + +#define DA_BUCKCORE_VBCORE_1_250V		0x1E + +/* BUCKCORE REGISTER */ +#define DA9052_BUCKCORE_BCORECONF               (1 << 7) +#define DA9052_BUCKCORE_BCOREEN                 (1 << 6) +#define DA9052_BUCKCORE_VBCORE                  63 + +/* SUPPLY REGISTER */ +#define DA9052_SUPPLY_VLOCK                     (1 << 7) +#define DA9052_SUPPLY_VMEMSWEN                  (1 << 6) +#define DA9052_SUPPLY_VPERISWEN                 (1 << 5) +#define DA9052_SUPPLY_VLDO3GO                   (1 << 4) +#define DA9052_SUPPLY_VLDO2GO                   (1 << 3) +#define DA9052_SUPPLY_VBMEMGO                   (1 << 2) +#define DA9052_SUPPLY_VBPROGO                   (1 << 1) +#define DA9052_SUPPLY_VBCOREGO                  (1 << 0) + +#endif /* __DIALOG_PMIC_H__ */ diff --git a/include/fdtdec.h b/include/fdtdec.h index 171c62848..fab577ed3 100644 --- a/include/fdtdec.h +++ b/include/fdtdec.h @@ -60,6 +60,9 @@ enum fdt_compat_id {  	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_COUNT,  }; @@ -117,6 +120,23 @@ int fdtdec_next_compatible(const void *blob, int node,  		enum fdt_compat_id id);  /** + * Find the next compatible subnode for a peripheral. + * + * Do the first call with node set to the parent and depth = 0. This + * function will return the offset of the next compatible node. Next time + * you call this function, pass the node value returned last time, with + * depth unchanged, and the next node will be provided. + * + * @param blob		FDT blob to use + * @param node		Start node for search + * @param id		Compatible ID to look for (enum fdt_compat_id) + * @param depthp	Current depth (set to 0 before first call) + * @return offset of next compatible node, or -FDT_ERR_NOTFOUND if no more + */ +int fdtdec_next_compatible_subnode(const void *blob, int node, +		enum fdt_compat_id id, int *depthp); + +/**   * Look up an address property in a node and return it as an address.   * The property must hold either one address with no trailing data or   * one address with a length. This is only tested on 32-bit machines. @@ -272,6 +292,25 @@ int fdtdec_get_int_array(const void *blob, int node, const char *prop_name,  		u32 *array, int count);  /** + * Look up a property in a node and return a pointer to its contents as a + * unsigned int array of given length. The property must have at least enough + * data for the array ('count' cells). It may have more, but this will be + * ignored. The data is not copied. + * + * Note that you must access elements of the array with fdt32_to_cpu(), + * since the elements will be big endian even on a little endian machine. + * + * @param blob		FDT blob + * @param node		node to examine + * @param prop_name	name of property to find + * @param count		number of array elements + * @return pointer to array if found, or NULL if the property is not + *		found or there is not enough data + */ +const u32 *fdtdec_locate_array(const void *blob, int node, +			       const char *prop_name, int count); + +/**   * Look up a boolean property in a node and return it.   *   * A boolean properly is true if present in the device tree and false if not @@ -311,3 +350,35 @@ int fdtdec_decode_gpio(const void *blob, int node, const char *prop_name,   * @return 0 if all ok or gpio was FDT_GPIO_NONE; -1 on error   */  int fdtdec_setup_gpio(struct fdt_gpio_state *gpio); + +/* + * Look up a property in a node and return its contents in a byte + * array of given length. The property must have at least enough data for + * the array (count bytes). It may have more, but this will be ignored. + * + * @param blob		FDT blob + * @param node		node to examine + * @param prop_name	name of property to find + * @param array		array to fill with data + * @param count		number of array elements + * @return 0 if ok, or -FDT_ERR_MISSING if the property is not found, + *		or -FDT_ERR_BADLAYOUT if not enough data + */ +int fdtdec_get_byte_array(const void *blob, int node, const char *prop_name, +		u8 *array, int count); + +/** + * Look up a property in a node and return a pointer to its contents as a + * byte array of given length. The property must have at least enough data + * for the array (count bytes). It may have more, but this will be ignored. + * The data is not copied. + * + * @param blob		FDT blob + * @param node		node to examine + * @param prop_name	name of property to find + * @param count		number of array elements + * @return pointer to byte array if found, or NULL if the property is not + *		found or there is not enough data + */ +const u8 *fdtdec_locate_byte_array(const void *blob, int node, +			     const char *prop_name, int count); diff --git a/include/fsl_esdhc.h b/include/fsl_esdhc.h index 8418bf7f4..0e265584b 100644 --- a/include/fsl_esdhc.h +++ b/include/fsl_esdhc.h @@ -34,12 +34,13 @@  #define SYSCTL_INITA		0x08000000  #define SYSCTL_TIMEOUT_MASK	0x000f0000  #define SYSCTL_CLOCK_MASK	0x0000fff0 -#define SYSCTL_RSTA		0x01000000  #define SYSCTL_CKEN		0x00000008  #define SYSCTL_PEREN		0x00000004  #define SYSCTL_HCKEN		0x00000002  #define SYSCTL_IPGEN		0x00000001  #define SYSCTL_RSTA		0x01000000 +#define SYSCTL_RSTC		0x02000000 +#define SYSCTL_RSTD		0x04000000  #define IRQSTAT			0x0002e030  #define IRQSTAT_DMAE		(0x10000000) @@ -85,6 +86,7 @@  #define IRQSTATEN_CC		(0x00000001)  #define PRSSTAT			0x0002e024 +#define PRSSTAT_DAT0		(0x01000000)  #define PRSSTAT_CLSL		(0x00800000)  #define PRSSTAT_WPSPL		(0x00080000)  #define PRSSTAT_CDPL		(0x00040000) diff --git a/include/fsl_pmic.h b/include/fsl_pmic.h index 742f2e19f..64c1e2ef6 100644 --- a/include/fsl_pmic.h +++ b/include/fsl_pmic.h @@ -122,4 +122,15 @@ enum {  /* Interrupt status 1 */  #define RTCRSTI		(1 << 7) +/* MC34708 Definitions */ +#define SWx_VOLT_MASK_MC34708	0x3F +#define SWx_1_250V_MC34708	0x30 +#define SWx_1_300V_MC34708	0x34 +#define TIMER_MASK_MC34708	0x300 +#define TIMER_4S_MC34708	0x100 +#define VUSBSEL_MC34708		(1 << 2) +#define VUSBEN_MC34708		(1 << 3) +#define SWBST_CTRL		31 +#define SWBST_AUTO		0x8 +  #endif diff --git a/include/input.h b/include/input.h new file mode 100644 index 000000000..31b1ef960 --- /dev/null +++ b/include/input.h @@ -0,0 +1,147 @@ +/* + * Keyboard input helper functions (too small to be called a layer) + * + * Copyright (c) 2011 The Chromium OS Authors. + * 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 _INPUT_H +#define _INPUT_H + +enum { +	INPUT_MAX_MODIFIERS	= 4, +	INPUT_BUFFER_LEN	= 16, +}; + +enum { +	/* Keyboard LEDs */ +	INPUT_LED_SCROLL	= 1 << 0, +	INPUT_LED_CAPS		= 1 << 1, +	INPUT_LED_NUM		= 1 << 2, +}; + +/* + * This table translates key codes to ASCII. Most of the entries are ASCII + * codes, but entries after KEY_FIRST_MOD indicate that this key is a + * modifier key, like shift, ctrl. KEY_FIRST_MOD + MOD_SHIFT is the shift + * key, for example. + */ +struct input_key_xlate { +	/* keycode of the modifiers which select this table, -1 if none */ +	int left_keycode; +	int right_keycode; +	const uchar *xlate;	/* keycode to ASCII table */ +	int num_entries;	/* number of entries in this table */ +}; + +struct input_config { +	uchar fifo[INPUT_BUFFER_LEN]; +	int fifo_in, fifo_out; + +	/* Which modifiers are active (1 bit for each MOD_... value) */ +	uchar modifiers; +	uchar flags;		/* active state keys (FLAGS_...) */ +	uchar leds;		/* active LEDS (INPUT_LED_...) */ +	uchar num_tables;	/* number of modifier tables */ +	int prev_keycodes[INPUT_BUFFER_LEN];	/* keys held last time */ +	int num_prev_keycodes;	/* number of prev keys */ +	struct input_key_xlate table[INPUT_MAX_MODIFIERS]; + +	/** +	 * Function the input helper calls to scan the keyboard +	 * +	 * @param config	Input state +	 * @return 0 if no keys read, otherwise number of keys read, or 1 if +	 *		unknown +	 */ +	int (*read_keys)(struct input_config *config); +	unsigned int next_repeat_ms;	/* Next time we repeat a key */ +	unsigned int repeat_delay_ms;	/* Time before autorepeat starts */ +	unsigned int repeat_rate_ms;	/* Autorepeat rate in ms */ +}; + +struct stdio_dev; + +/** + * Convert a list of key codes into ASCII and send them + * + * @param config	Input state + * @param keycode	List of key codes to examine + * @param num_keycodes	Number of key codes + */ +int input_send_keycodes(struct input_config *config, int keycode[], int count); + +/** + * Add a new key translation table to the input + * + * @param config	Input state + * @param left_keycode	Key to hold to get into this table + * @param right_keycode	Another key to hold to get into this table + * @param xlate		Conversion table from key codes to ASCII + * @param num_entries	Number of entries in xlate table + */ +int input_add_table(struct input_config *config, int left_keycode, +		    int right_keycode, const uchar *xlate, int num_entries); + +/** + * Test if keys are available to be read + * + * @param config	Input state + * @return 0 if no keys available, 1 if keys are available + */ +int input_tstc(struct input_config *config); + +/** + * Read a key + * + * TODO: U-Boot wants 0 for no key, but Ctrl-@ is a valid key... + * + * @param config	Input state + * @return key, or 0 if no key, or -1 if error + */ +int input_getc(struct input_config *config); + +/** + * Register a new device with stdio and switch to it if wanted + * + * @param dev	Pointer to device + * @return 0 if ok, -1 on error + */ +int input_stdio_register(struct stdio_dev *dev); + +/** + * Set up the input handler with basic key maps. + * + * @param config	Input state + * @param leds		Initial LED value (INPUT_LED_ mask), 0 suggested + * @param repeat_delay_ms	Delay before key auto-repeat starts (in ms) + * @param repeat_rate_ms	Delay between successive key repeats (in ms) + * @return 0 if ok, -1 on error + */ +int input_init(struct input_config *config, int leds, int repeat_delay_ms, +	       int repeat_rate_ms); + +#ifdef CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE +extern int overwrite_console(void); +#define OVERWRITE_CONSOLE overwrite_console() +#else +#define OVERWRITE_CONSOLE 0 +#endif /* CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE */ + +#endif diff --git a/include/key_matrix.h b/include/key_matrix.h new file mode 100644 index 000000000..f41331407 --- /dev/null +++ b/include/key_matrix.h @@ -0,0 +1,99 @@ +/* + * Keyboard matrix helper functions + * + * Copyright (c) 2012 The Chromium OS Authors. + * 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 _KEY_MATRIX_H +#define _KEY_MATRIX_H + +#include <common.h> + +/* Information about a matrix keyboard */ +struct key_matrix { +	/* Dimensions of the keyboard matrix, in rows and columns */ +	int num_rows; +	int num_cols; +	int key_count;	/* number of keys in the matrix (= rows * cols) */ + +	/* +	 * Information about keycode mappings. The plain_keycode array must +	 * exist but fn may be NULL in which case it is not decoded. +	 */ +	const u8 *plain_keycode;        /* key code for each row / column */ +	const u8 *fn_keycode;           /* ...when Fn held down */ +	int fn_pos;                     /* position of Fn key in key (or -1) */ +}; + +/* Information about a particular key (row, column pair) in the matrix */ +struct key_matrix_key { +	uint8_t row;	/* row number (0 = first) */ +	uint8_t col;	/* column number (0 = first) */ +	uint8_t valid;	/* 1 if valid, 0 to ignore this */ +}; + +/** + * Decode a set of pressed keys into key codes + * + * Given a list of keys that are pressed, this converts this list into + * a list of key codes. Each of the keys has a valid flag, which can be + * used to mark a particular key as invalid (so that it is ignored). + * + * The plain keymap is used, unless the Fn key is detected along the way, + * at which point we switch to the Fn key map. + * + * If key ghosting is detected, we simply ignore the keys and return 0. + * + * @param config        Keyboard matrix config + * @param keys		List of keys to process (each is row, col) + * @param num_keys	Number of keys to process + * @param keycode	Returns a list of key codes, decoded from input + * @param max_keycodes	Size of key codes array (suggest 8) + * + */ +int key_matrix_decode(struct key_matrix *config, struct key_matrix_key *keys, +		      int num_keys, int keycode[], int max_keycodes); + +/** + * Read the keyboard configuration out of the fdt. + * + * Decode properties of named "linux,<type>keymap" where <type> is either + * empty, or "fn-". Then set up the plain key map (and the FN keymap if + * present). + * + * @param config        Keyboard matrix config + * @param blob          FDT blob + * @param node          Node containing compatible data + * @return 0 if ok, -1 on error + */ +int key_matrix_decode_fdt(struct key_matrix *config, const void *blob, +			  int node); + +/** + * Set up a new key matrix. + * + * @param config	Keyboard matrix config + * @param rows		Number of rows in key matrix + * @param cols		Number of columns in key matrix + * @return 0 if ok, -1 on error + */ +int key_matrix_init(struct key_matrix *config, int rows, int cols); + +#endif diff --git a/include/lcd.h b/include/lcd.h index d95feeb79..3d9ef1671 100644 --- a/include/lcd.h +++ b/include/lcd.h @@ -183,6 +183,70 @@ typedef struct vidinfo {  	u_long	mmio;		/* Memory mapped registers */  } vidinfo_t; +#elif defined(CONFIG_EXYNOS_FB) + +enum { +	FIMD_RGB_INTERFACE = 1, +	FIMD_CPU_INTERFACE = 2, +}; + +typedef struct vidinfo { +	ushort vl_col;		/* Number of columns (i.e. 640) */ +	ushort vl_row;		/* Number of rows (i.e. 480) */ +	ushort vl_width;	/* Width of display area in millimeters */ +	ushort vl_height;	/* Height of display area in millimeters */ + +	/* LCD configuration register */ +	u_char vl_freq;		/* Frequency */ +	u_char vl_clkp;		/* Clock polarity */ +	u_char vl_oep;		/* Output Enable polarity */ +	u_char vl_hsp;		/* Horizontal Sync polarity */ +	u_char vl_vsp;		/* Vertical Sync polarity */ +	u_char vl_dp;		/* Data polarity */ +	u_char vl_bpix;		/* Bits per pixel */ + +	/* Horizontal control register. Timing from data sheet */ +	u_char vl_hspw;		/* Horz sync pulse width */ +	u_char vl_hfpd;		/* Wait before of line */ +	u_char vl_hbpd;		/* Wait end of line */ + +	/* Vertical control register. */ +	u_char	vl_vspw;	/* Vertical sync pulse width */ +	u_char	vl_vfpd;	/* Wait before of frame */ +	u_char	vl_vbpd;	/* Wait end of frame */ +	u_char  vl_cmd_allow_len; /* Wait end of frame */ + +	void (*cfg_gpio)(void); +	void (*backlight_on)(unsigned int onoff); +	void (*reset_lcd)(void); +	void (*lcd_power_on)(void); +	void (*cfg_ldo)(void); +	void (*enable_ldo)(unsigned int onoff); +	void (*mipi_power)(void); +	void (*backlight_reset)(void); + +	unsigned int win_id; +	unsigned int init_delay; +	unsigned int power_on_delay; +	unsigned int reset_delay; +	unsigned int interface_mode; +	unsigned int mipi_enabled; +	unsigned int cs_setup; +	unsigned int wr_setup; +	unsigned int wr_act; +	unsigned int wr_hold; + +	/* parent clock name(MPLL, EPLL or VPLL) */ +	unsigned int pclk_name; +	/* ratio value for source clock from parent clock. */ +	unsigned int sclk_div; + +	unsigned int dual_lcd_enabled; + +} vidinfo_t; + +void init_panel_info(vidinfo_t *vid); +  #else  typedef struct vidinfo { diff --git a/include/linux/input.h b/include/linux/input.h new file mode 100644 index 000000000..44aec763d --- /dev/null +++ b/include/linux/input.h @@ -0,0 +1,155 @@ +/* + * Copyright (c) 1999-2002 Vojtech Pavlik + * + * 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. + */ + +#ifndef _LINUX_INPUT_H +#define _LINUX_INPUT_H + +/* + * Keys and buttons + * + * Most of the keys/buttons are modeled after USB HUT 1.12 + * (see http://www.usb.org/developers/hidpage). + * Abbreviations in the comments: + * AC - Application Control + * AL - Application Launch Button + * SC - System Control + */ + +#define KEY_RESERVED		0 +#define KEY_ESC			1 +#define KEY_1			2 +#define KEY_2			3 +#define KEY_3			4 +#define KEY_4			5 +#define KEY_5			6 +#define KEY_6			7 +#define KEY_7			8 +#define KEY_8			9 +#define KEY_9			10 +#define KEY_0			11 +#define KEY_MINUS		12 +#define KEY_EQUAL		13 +#define KEY_BACKSPACE		14 +#define KEY_TAB			15 +#define KEY_Q			16 +#define KEY_W			17 +#define KEY_E			18 +#define KEY_R			19 +#define KEY_T			20 +#define KEY_Y			21 +#define KEY_U			22 +#define KEY_I			23 +#define KEY_O			24 +#define KEY_P			25 +#define KEY_LEFTBRACE		26 +#define KEY_RIGHTBRACE		27 +#define KEY_ENTER		28 +#define KEY_LEFTCTRL		29 +#define KEY_A			30 +#define KEY_S			31 +#define KEY_D			32 +#define KEY_F			33 +#define KEY_G			34 +#define KEY_H			35 +#define KEY_J			36 +#define KEY_K			37 +#define KEY_L			38 +#define KEY_SEMICOLON		39 +#define KEY_APOSTROPHE		40 +#define KEY_GRAVE		41 +#define KEY_LEFTSHIFT		42 +#define KEY_BACKSLASH		43 +#define KEY_Z			44 +#define KEY_X			45 +#define KEY_C			46 +#define KEY_V			47 +#define KEY_B			48 +#define KEY_N			49 +#define KEY_M			50 +#define KEY_COMMA		51 +#define KEY_DOT			52 +#define KEY_SLASH		53 +#define KEY_RIGHTSHIFT		54 +#define KEY_KPASTERISK		55 +#define KEY_LEFTALT		56 +#define KEY_SPACE		57 +#define KEY_CAPSLOCK		58 +#define KEY_F1			59 +#define KEY_F2			60 +#define KEY_F3			61 +#define KEY_F4			62 +#define KEY_F5			63 +#define KEY_F6			64 +#define KEY_F7			65 +#define KEY_F8			66 +#define KEY_F9			67 +#define KEY_F10			68 +#define KEY_NUMLOCK		69 +#define KEY_SCROLLLOCK		70 +#define KEY_KP7			71 +#define KEY_KP8			72 +#define KEY_KP9			73 +#define KEY_KPMINUS		74 +#define KEY_KP4			75 +#define KEY_KP5			76 +#define KEY_KP6			77 +#define KEY_KPPLUS		78 +#define KEY_KP1			79 +#define KEY_KP2			80 +#define KEY_KP3			81 +#define KEY_KP0			82 +#define KEY_KPDOT		83 + +#define KEY_ZENKAKUHANKAKU	85 +#define KEY_102ND		86 +#define KEY_F11			87 +#define KEY_F12			88 +#define KEY_RO			89 +#define KEY_KATAKANA		90 +#define KEY_HIRAGANA		91 +#define KEY_HENKAN		92 +#define KEY_KATAKANAHIRAGANA	93 +#define KEY_MUHENKAN		94 +#define KEY_KPJPCOMMA		95 +#define KEY_KPENTER		96 +#define KEY_RIGHTCTRL		97 +#define KEY_KPSLASH		98 +#define KEY_SYSRQ		99 +#define KEY_RIGHTALT		100 +#define KEY_LINEFEED		101 +#define KEY_HOME		102 +#define KEY_UP			103 +#define KEY_PAGEUP		104 +#define KEY_LEFT		105 +#define KEY_RIGHT		106 +#define KEY_END			107 +#define KEY_DOWN		108 +#define KEY_PAGEDOWN		109 +#define KEY_INSERT		110 +#define KEY_DELETE		111 +#define KEY_MACRO		112 +#define KEY_MUTE		113 +#define KEY_VOLUMEDOWN		114 +#define KEY_VOLUMEUP		115 +#define KEY_POWER		116	/* SC System Power Down */ +#define KEY_KPEQUAL		117 +#define KEY_KPPLUSMINUS		118 +#define KEY_PAUSE		119 +#define KEY_SCALE		120	/* AL Compiz Scale (Expose) */ + +#define KEY_KPCOMMA		121 +#define KEY_HANGEUL		122 +#define KEY_HANGUEL		KEY_HANGEUL +#define KEY_HANJA		123 +#define KEY_YEN			124 +#define KEY_LEFTMETA		125 +#define KEY_RIGHTMETA		126 +#define KEY_COMPOSE		127 +#define KEY_FN			0x1d0 + +#endif diff --git a/include/linux/linkage.h b/include/linux/linkage.h index ed4cf6cbc..7b749bbda 100644 --- a/include/linux/linkage.h +++ b/include/linux/linkage.h @@ -44,8 +44,13 @@  #define SYMBOL_NAME_LABEL(X)	X:  #endif +#ifndef __ALIGN  #define __ALIGN .align		4 +#endif + +#ifndef __ALIGN_STR  #define __ALIGN_STR		".align 4" +#endif  #ifdef __ASSEMBLY__ @@ -67,7 +72,7 @@  #ifndef ENDPROC  #define ENDPROC(name) \ -	.type name, @function; \ +	.type name STT_FUNC; \  	END(name)  #endif diff --git a/include/max8997_pmic.h b/include/max8997_pmic.h new file mode 100644 index 000000000..17ae24ea6 --- /dev/null +++ b/include/max8997_pmic.h @@ -0,0 +1,190 @@ +/* + *  Copyright (C) 2011 Samsung Electronics + *  Lukasz Majewski <l.majewski@samsung.com> + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +#ifndef __MAX8997_PMIC_H_ +#define __MAX8997_PMIC_H_ + +/* MAX 8997 registers */ +enum { +	MAX8997_REG_PMIC_ID0	= 0x00, +	MAX8997_REG_PMIC_ID1	= 0x01, +	MAX8997_REG_INTSRC	= 0x02, +	MAX8997_REG_INT1	= 0x03, +	MAX8997_REG_INT2	= 0x04, +	MAX8997_REG_INT3	= 0x05, +	MAX8997_REG_INT4	= 0x06, + +	MAX8997_REG_INT1MSK	= 0x08, +	MAX8997_REG_INT2MSK	= 0x09, +	MAX8997_REG_INT3MSK	= 0x0a, +	MAX8997_REG_INT4MSK	= 0x0b, + +	MAX8997_REG_STATUS1	= 0x0d, +	MAX8997_REG_STATUS2	= 0x0e, +	MAX8997_REG_STATUS3	= 0x0f, +	MAX8997_REG_STATUS4	= 0x10, + +	MAX8997_REG_MAINCON1	= 0x13, +	MAX8997_REG_MAINCON2	= 0x14, +	MAX8997_REG_BUCKRAMP	= 0x15, + +	MAX8997_REG_BUCK1CTRL	= 0x18, +	MAX8997_REG_BUCK1DVS1	= 0x19, +	MAX8997_REG_BUCK1DVS2	= 0x1a, +	MAX8997_REG_BUCK1DVS3	= 0x1b, +	MAX8997_REG_BUCK1DVS4	= 0x1c, +	MAX8997_REG_BUCK1DVS5	= 0x1d, +	MAX8997_REG_BUCK1DVS6	= 0x1e, +	MAX8997_REG_BUCK1DVS7	= 0x1f, +	MAX8997_REG_BUCK1DVS8	= 0x20, +	MAX8997_REG_BUCK2CTRL	= 0x21, +	MAX8997_REG_BUCK2DVS1	= 0x22, +	MAX8997_REG_BUCK2DVS2	= 0x23, +	MAX8997_REG_BUCK2DVS3	= 0x24, +	MAX8997_REG_BUCK2DVS4	= 0x25, +	MAX8997_REG_BUCK2DVS5	= 0x26, +	MAX8997_REG_BUCK2DVS6	= 0x27, +	MAX8997_REG_BUCK2DVS7	= 0x28, +	MAX8997_REG_BUCK2DVS8	= 0x29, +	MAX8997_REG_BUCK3CTRL	= 0x2a, +	MAX8997_REG_BUCK3DVS	= 0x2b, +	MAX8997_REG_BUCK4CTRL	= 0x2c, +	MAX8997_REG_BUCK4DVS	= 0x2d, +	MAX8997_REG_BUCK5CTRL	= 0x2e, +	MAX8997_REG_BUCK5DVS1	= 0x2f, +	MAX8997_REG_BUCK5DVS2	= 0x30, +	MAX8997_REG_BUCK5DVS3	= 0x31, +	MAX8997_REG_BUCK5DVS4	= 0x32, +	MAX8997_REG_BUCK5DVS5	= 0x33, +	MAX8997_REG_BUCK5DVS6	= 0x34, +	MAX8997_REG_BUCK5DVS7	= 0x35, +	MAX8997_REG_BUCK5DVS8	= 0x36, +	MAX8997_REG_BUCK6CTRL	= 0x37, +	MAX8997_REG_BUCK6BPSKIPCTRL	= 0x38, +	MAX8997_REG_BUCK7CTRL	= 0x39, +	MAX8997_REG_BUCK7DVS	= 0x3a, +	MAX8997_REG_LDO1CTRL	= 0x3b, +	MAX8997_REG_LDO2CTRL	= 0x3c, +	MAX8997_REG_LDO3CTRL	= 0x3d, +	MAX8997_REG_LDO4CTRL	= 0x3e, +	MAX8997_REG_LDO5CTRL	= 0x3f, +	MAX8997_REG_LDO6CTRL	= 0x40, +	MAX8997_REG_LDO7CTRL	= 0x41, +	MAX8997_REG_LDO8CTRL	= 0x42, +	MAX8997_REG_LDO9CTRL	= 0x43, +	MAX8997_REG_LDO10CTRL	= 0x44, +	MAX8997_REG_LDO11CTRL	= 0x45, +	MAX8997_REG_LDO12CTRL	= 0x46, +	MAX8997_REG_LDO13CTRL	= 0x47, +	MAX8997_REG_LDO14CTRL	= 0x48, +	MAX8997_REG_LDO15CTRL	= 0x49, +	MAX8997_REG_LDO16CTRL	= 0x4a, +	MAX8997_REG_LDO17CTRL	= 0x4b, +	MAX8997_REG_LDO18CTRL	= 0x4c, +	MAX8997_REG_LDO21CTRL	= 0x4d, + +	MAX8997_REG_MBCCTRL1	= 0x50, +	MAX8997_REG_MBCCTRL2	= 0x51, +	MAX8997_REG_MBCCTRL3	= 0x52, +	MAX8997_REG_MBCCTRL4	= 0x53, +	MAX8997_REG_MBCCTRL5	= 0x54, +	MAX8997_REG_MBCCTRL6	= 0x55, +	MAX8997_REG_OTPCGHCVS	= 0x56, + +	MAX8997_REG_SAFEOUTCTRL	= 0x5a, + +	MAX8997_REG_LBCNFG1	= 0x5e, +	MAX8997_REG_LBCNFG2	= 0x5f, +	MAX8997_REG_BBCCTRL	= 0x60, + +	MAX8997_REG_FLASH1_CUR	= 0x63, /* 0x63 ~ 0x6e for FLASH */ +	MAX8997_REG_FLASH2_CUR	= 0x64, +	MAX8997_REG_MOVIE_CUR	= 0x65, +	MAX8997_REG_GSMB_CUR	= 0x66, +	MAX8997_REG_BOOST_CNTL	= 0x67, +	MAX8997_REG_LEN_CNTL	= 0x68, +	MAX8997_REG_FLASH_CNTL	= 0x69, +	MAX8997_REG_WDT_CNTL	= 0x6a, +	MAX8997_REG_MAXFLASH1	= 0x6b, +	MAX8997_REG_MAXFLASH2	= 0x6c, +	MAX8997_REG_FLASHSTATUS	= 0x6d, +	MAX8997_REG_FLASHSTATUSMASK	= 0x6e, + +	MAX8997_REG_GPIOCNTL1	= 0x70, +	MAX8997_REG_GPIOCNTL2	= 0x71, +	MAX8997_REG_GPIOCNTL3	= 0x72, +	MAX8997_REG_GPIOCNTL4	= 0x73, +	MAX8997_REG_GPIOCNTL5	= 0x74, +	MAX8997_REG_GPIOCNTL6	= 0x75, +	MAX8997_REG_GPIOCNTL7	= 0x76, +	MAX8997_REG_GPIOCNTL8	= 0x77, +	MAX8997_REG_GPIOCNTL9	= 0x78, +	MAX8997_REG_GPIOCNTL10	= 0x79, +	MAX8997_REG_GPIOCNTL11	= 0x7a, +	MAX8997_REG_GPIOCNTL12	= 0x7b, + +	MAX8997_REG_LDO1CONFIG	= 0x80, +	MAX8997_REG_LDO2CONFIG	= 0x81, +	MAX8997_REG_LDO3CONFIG	= 0x82, +	MAX8997_REG_LDO4CONFIG	= 0x83, +	MAX8997_REG_LDO5CONFIG	= 0x84, +	MAX8997_REG_LDO6CONFIG	= 0x85, +	MAX8997_REG_LDO7CONFIG	= 0x86, +	MAX8997_REG_LDO8CONFIG	= 0x87, +	MAX8997_REG_LDO9CONFIG	= 0x88, +	MAX8997_REG_LDO10CONFIG	= 0x89, +	MAX8997_REG_LDO11CONFIG	= 0x8a, +	MAX8997_REG_LDO12CONFIG	= 0x8b, +	MAX8997_REG_LDO13CONFIG	= 0x8c, +	MAX8997_REG_LDO14CONFIG	= 0x8d, +	MAX8997_REG_LDO15CONFIG	= 0x8e, +	MAX8997_REG_LDO16CONFIG	= 0x8f, +	MAX8997_REG_LDO17CONFIG	= 0x90, +	MAX8997_REG_LDO18CONFIG	= 0x91, +	MAX8997_REG_LDO21CONFIG	= 0x92, + +	MAX8997_REG_DVSOKTIMER1	= 0x97, +	MAX8997_REG_DVSOKTIMER2	= 0x98, +	MAX8997_REG_DVSOKTIMER4	= 0x99, +	MAX8997_REG_DVSOKTIMER5	= 0x9a, + +	PMIC_NUM_OF_REGS = 0x9b, +}; + +#define ENSAFEOUT1 (1 << 6) +#define ENSAFEOUT2 (1 << 7) + +#define MAX8997_I2C_ADDR        (0xCC >> 1) +#define MAX8997_RTC_ADDR	(0x0C >> 1) +#define MAX8997_MUIC_ADDR	(0x4A >> 1) +#define MAX8997_FG_ADDR	(0x6C >> 1) + +enum { +	LDO_OFF = 0, +	LDO_ON = 1, + +	DIS_LDO = (0x00 << 6), +	EN_LDO = (0x3 << 6), +}; + +#endif /* __MAX8997_PMIC_H_ */ diff --git a/include/max8998_pmic.h b/include/max8998_pmic.h index 10c892a51..ca21f882c 100644 --- a/include/max8998_pmic.h +++ b/include/max8998_pmic.h @@ -75,6 +75,7 @@ enum {  };  #define MAX8998_LDO3		(1 << 2) +#define MAX8998_LDO4		(1 << 1)  #define MAX8998_LDO8		(1 << 5)  #define MAX8998_SAFEOUT1	(1 << 4) diff --git a/include/mmc.h b/include/mmc.h index f52df70ad..230598654 100644 --- a/include/mmc.h +++ b/include/mmc.h @@ -47,6 +47,9 @@  #define MMC_MODE_SPI		0x400  #define MMC_MODE_HC		0x800 +#define MMC_MODE_MASK_WIDTH_BITS (MMC_MODE_4BIT | MMC_MODE_8BIT) +#define MMC_MODE_WIDTH_BITS_SHIFT 8 +  #define SD_DATA_4BIT	0x00040000  #define IS_SD(x) (x->version & SD_VERSION_SD) @@ -205,56 +208,6 @@ struct mmc_cid {  	char pnm[7];  }; -/* - * WARNING! - * - * This structure is used by atmel_mci.c only. - * It works for the AVR32 architecture but NOT - * for ARM/AT91 architectures. - * Its use is highly depreciated. - * After the atmel_mci.c driver for AVR32 has - * been replaced this structure will be removed. - */ -struct mmc_csd -{ -	u8	csd_structure:2, -		spec_vers:4, -		rsvd1:2; -	u8	taac; -	u8	nsac; -	u8	tran_speed; -	u16	ccc:12, -		read_bl_len:4; -	u64	read_bl_partial:1, -		write_blk_misalign:1, -		read_blk_misalign:1, -		dsr_imp:1, -		rsvd2:2, -		c_size:12, -		vdd_r_curr_min:3, -		vdd_r_curr_max:3, -		vdd_w_curr_min:3, -		vdd_w_curr_max:3, -		c_size_mult:3, -		sector_size:5, -		erase_grp_size:5, -		wp_grp_size:5, -		wp_grp_enable:1, -		default_ecc:2, -		r2w_factor:3, -		write_bl_len:4, -		write_bl_partial:1, -		rsvd3:5; -	u8	file_format_grp:1, -		copy:1, -		perm_write_protect:1, -		tmp_write_protect:1, -		file_format:2, -		ecc:2; -	u8	crc:7; -	u8	one:1; -}; -  struct mmc_cmd {  	ushort cmdidx;  	uint resp_type; diff --git a/include/pmic.h b/include/pmic.h index 52a1526d9..6a05b40ae 100644 --- a/include/pmic.h +++ b/include/pmic.h @@ -55,6 +55,7 @@ struct pmic {  };  int pmic_init(void); +int pmic_dialog_init(void);  int check_reg(u32 reg);  struct pmic *get_pmic(void);  int pmic_probe(struct pmic *p); diff --git a/include/sdhci.h b/include/sdhci.h index 800f9d9c0..9d3718324 100644 --- a/include/sdhci.h +++ b/include/sdhci.h @@ -216,6 +216,9 @@   */  #define SDHCI_QUIRK_32BIT_DMA_ADDR	(1 << 0)  #define SDHCI_QUIRK_REG32_RW		(1 << 1) +#define SDHCI_QUIRK_BROKEN_R1B		(1 << 2) +#define SDHCI_QUIRK_NO_HISPD_BIT	(1 << 3) +#define SDHCI_QUIRK_BROKEN_VOLTAGE	(1 << 4)  /* to make gcc happy */  struct sdhci_host; @@ -240,10 +243,14 @@ struct sdhci_host {  	char *name;  	void *ioaddr;  	unsigned int quirks; +	unsigned int host_caps;  	unsigned int version;  	unsigned int clock;  	struct mmc *mmc;  	const struct sdhci_ops *ops; + +	void (*set_control_reg)(struct sdhci_host *host); +	uint	voltages;  };  #ifdef CONFIG_MMC_SDHCI_IO_ACCESSORS diff --git a/include/tegra-kbc.h b/include/tegra-kbc.h new file mode 100644 index 000000000..f331c79c9 --- /dev/null +++ b/include/tegra-kbc.h @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2011 The Chromium OS Authors. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#ifndef __include_tegra_kbc_h__ +#define __include_tegra_kbc_h__ + +#include <common.h> + +#define KEY_IS_MODIFIER(key) ((key) >= KEY_FIRST_MODIFIER) + +struct kbc_tegra { +	u32 control; +	u32 interrupt; +	u32 row_cfg[4]; +	u32 col_cfg[3]; +	u32 timeout_dly; +	u32 init_dly; +	u32 rpt_dly; +	u32 kp_ent[2]; +	u32 row_mask[16]; +}; + +#ifdef CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE +extern int overwrite_console(void); +#define OVERWRITE_CONSOLE overwrite_console() +#else +#define OVERWRITE_CONSOLE 0 +#endif /* CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE */ + +#endif /* __include_tegra_kbc_h__ */ diff --git a/include/tps6586x.h b/include/tps6586x.h new file mode 100644 index 000000000..ab880823a --- /dev/null +++ b/include/tps6586x.h @@ -0,0 +1,68 @@ +/* + *  (C) Copyright 2010,2011 + *  NVIDIA Corporation <www.nvidia.com> + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +#ifndef __H_ +#define _TPS6586X_H_ + +enum { +	/* SM0-2 PWM/PFM Mode Selection */ +	TPS6586X_PWM_SM0	= 1 << 0, +	TPS6586X_PWM_SM1	= 1 << 1, +	TPS6586X_PWM_SM2	= 1 << 2, +}; + +/** + * Enable PWM mode for selected SM0-2 + * + * @param mask	Mask of synchronous converter to enable (TPS6586X_PWM_...) + * @return 0 if ok, -1 on error + */ +int tps6586x_set_pwm_mode(int mask); + +/** + * Adjust SM0 and SM1 voltages to the given targets in incremental steps. + * + * @param sm0_target	Target voltage for SM0 in 25mW units, 0=725mV, 31=1.5V + * @param sm1_target	Target voltage for SM1 in 25mW units, 0=725mV, 31=1.5V + * @param step		Amount to change voltage in each step, in 25mW units + * @param rate		Slew ratein mV/us: 0=instantly, 1=0.11, 2=0.22, + *			3=0.44, 4=0.88, 5=1.76, 6=3.52, 7=7.04 + * @param min_sm0_over_sm1	Minimum amount by which sm0 must exceed sm1. + *			If this condition is not met, no adjustment will be + *			done and an error will be reported. Use -1 to skip + *			this check. + * @return 0 if ok, -1 on error + */ +int tps6586x_adjust_sm0_sm1(int sm0_target, int sm1_target, int step, int rate, +			    int min_sm0_over_sm1); + +/** + * Set up the TPS6586X I2C bus number. This will be used for all operations + * on the device. This function must be called before using other functions. + * + * @param bus	I2C bus number containing the TPS6586X chip + * @return 0 (always succeeds) + */ +int tps6586x_init(int bus); + +#endif	/* _TPS6586X_H_ */ diff --git a/include/twl6035.h b/include/twl6035.h new file mode 100644 index 000000000..e21ddbaf2 --- /dev/null +++ b/include/twl6035.h @@ -0,0 +1,42 @@ +/* + * (C) Copyright 2012 + * Texas Instruments, <www.ti.com> + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +#include <common.h> +#include <i2c.h> + +/* I2C chip addresses */ +#define TWL6035_CHIP_ADDR	0x48 + +/* 0x1XY translates to page 1, register address 0xXY */ +#define LDO9_CTRL		0x60 +#define LDO9_VOLTAGE		0x61 + +/* Bit field definitions for LDOx_CTRL */ +#define LDO_ON			(1 << 4) +#define LDO_MODE_SLEEP		(1 << 2) +#define LDO_MODE_ACTIVE		(1 << 0) + +int twl6035_i2c_write_u8(u8 chip_no, u8 val, u8 reg); +int twl6035_i2c_read_u8(u8 chip_no, u8 *val, u8 reg); +void twl6035_init_settings(void); +void twl6035_mmc1_poweron_ldo(void); |