summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/common.h29
-rw-r--r--include/config_cmd_all.h1
-rw-r--r--include/configs/apx4devkit.h2
-rw-r--r--include/configs/bf609-ezkit.h162
-rw-r--r--include/configs/bfin_adi_common.h8
-rw-r--r--include/configs/cam_enc_4xx.h2
-rw-r--r--include/configs/coreboot.h6
-rw-r--r--include/configs/devkit8000.h1
-rw-r--r--include/configs/dockstar.h2
-rw-r--r--include/configs/ea20.h6
-rw-r--r--include/configs/ib62x0.h2
-rw-r--r--include/configs/iconnect.h2
-rw-r--r--include/configs/km/keymile-common.h12
-rw-r--r--include/configs/km/km8309-common.h4
-rw-r--r--include/configs/km/km8321-common.h2
-rw-r--r--include/configs/km/km83xx-common.h9
-rw-r--r--include/configs/km8360.h2
-rw-r--r--include/configs/omap3_pandora.h3
-rw-r--r--include/configs/sandbox.h18
-rw-r--r--include/configs/suvd3.h37
-rw-r--r--include/configs/tricorder.h2
-rw-r--r--include/configs/tuxx1.h46
-rw-r--r--include/configs/twister.h1
-rw-r--r--include/configs/x600.h2
-rw-r--r--include/exports.h1
-rw-r--r--include/ext4fs.h3
-rw-r--r--include/fat.h2
-rw-r--r--include/fs.h1
-rw-r--r--include/hash.h13
-rw-r--r--include/malloc.h1
-rw-r--r--include/os.h58
-rw-r--r--include/sandboxfs.h30
-rw-r--r--include/u-boot/crc.h11
33 files changed, 430 insertions, 51 deletions
diff --git a/include/common.h b/include/common.h
index 4ad17ea..6d52924 100644
--- a/include/common.h
+++ b/include/common.h
@@ -270,7 +270,8 @@ int cpu_init(void);
phys_size_t initdram (int);
int display_options (void);
void print_size(unsigned long long, const char *);
-int print_buffer (ulong addr, void* data, uint width, uint count, uint linelen);
+int print_buffer(ulong addr, const void *data, uint width, uint count,
+ uint linelen);
/* common/main.c */
void main_loop (void);
@@ -357,7 +358,19 @@ int getenv_yesno(const char *var);
int saveenv (void);
int setenv (const char *, const char *);
int setenv_ulong(const char *varname, ulong value);
-int setenv_addr(const char *varname, const void *addr);
+int setenv_hex(const char *varname, ulong value);
+/**
+ * setenv_addr - Set an environment variable to an address in hex
+ *
+ * @varname: Environmet variable to set
+ * @addr: Value to set it to
+ * @return 0 if ok, 1 on error
+ */
+static inline int setenv_addr(const char *varname, const void *addr)
+{
+ return setenv_hex(varname, (ulong)addr);
+}
+
#ifdef CONFIG_ARM
# include <asm/mach-types.h>
# include <asm/setup.h>
@@ -869,6 +882,18 @@ int cpu_disable(int nr);
int cpu_release(int nr, int argc, char * const argv[]);
#endif
+/* Define a null map_sysmem() if the architecture doesn't use it */
+# ifndef CONFIG_ARCH_MAP_SYSMEM
+static inline void *map_sysmem(phys_addr_t paddr, unsigned long len)
+{
+ return (void *)(uintptr_t)paddr;
+}
+
+static inline void unmap_sysmem(const void *vaddr)
+{
+}
+# endif
+
#endif /* __ASSEMBLY__ */
#ifdef CONFIG_PPC
diff --git a/include/config_cmd_all.h b/include/config_cmd_all.h
index 2a82e19..0930781 100644
--- a/include/config_cmd_all.h
+++ b/include/config_cmd_all.h
@@ -76,6 +76,7 @@
#define CONFIG_CMD_RARP /* rarpboot support */
#define CONFIG_CMD_READ /* Read data from partition */
#define CONFIG_CMD_RUN /* run command in env variable */
+#define CONFIG_CMD_SANDBOX /* sb command to access sandbox features */
#define CONFIG_CMD_SAVEENV /* saveenv */
#define CONFIG_CMD_SAVES /* save S record dump */
#define CONFIG_CMD_SCSI /* SCSI Support */
diff --git a/include/configs/apx4devkit.h b/include/configs/apx4devkit.h
index 73c66af..ab4efa4 100644
--- a/include/configs/apx4devkit.h
+++ b/include/configs/apx4devkit.h
@@ -222,7 +222,7 @@
"root=ubi0:rootfs rootfstype=ubifs ${mtdparts} rw\0" \
"bootcmd_nand=" \
"run bootargs_nand && ubi part root 2048 && " \
- "ubifsmount rootfs && ubifsload 41000000 boot/uImage && " \
+ "ubifsmount ubi:rootfs && ubifsload 41000000 boot/uImage && " \
"bootm 41000000\0" \
"bootargs_mmc=" \
"setenv bootargs ${kernelargs} " \
diff --git a/include/configs/bf609-ezkit.h b/include/configs/bf609-ezkit.h
new file mode 100644
index 0000000..02149fa
--- /dev/null
+++ b/include/configs/bf609-ezkit.h
@@ -0,0 +1,162 @@
+/*
+ * U-boot - Configuration file for BF609 EZ-Kit board
+ */
+
+#ifndef __CONFIG_BF609_EZKIT_H__
+#define __CONFIG_BF609_EZKIT_H__
+
+#include <asm/config-pre.h>
+
+/*
+ * Processor Settings
+ */
+#define CONFIG_BFIN_CPU bf609-0.0
+#define CONFIG_BFIN_BOOT_MODE BFIN_BOOT_PARA
+
+
+/* For ez-board version 1.0, else undef this */
+#define CONFIG_BFIN_BOARD_VERSION_1_0
+
+/*
+ * Clock Settings
+ * CCLK = (CLKIN * VCO_MULT) / CCLK_DIV
+ * SCLK = (CLKIN * VCO_MULT) / SYSCLK_DIV
+ * SCLK0 = SCLK / SCLK0_DIV
+ * SCLK1 = SCLK / SCLK1_DIV
+ */
+/* CONFIG_CLKIN_HZ is any value in Hz */
+#define CONFIG_CLKIN_HZ (25000000)
+/* CLKIN_HALF controls the DF bit in PLL_CTL 0 = CLKIN */
+/* 1 = CLKIN / 2 */
+#define CONFIG_CLKIN_HALF (0)
+
+/* VCO_MULT controls the MSEL (multiplier) bits in PLL_CTL */
+/* Values can range from 0-127 (where 0 means 128) */
+#define CONFIG_VCO_MULT (20)
+
+/* CCLK_DIV controls the core clock divider */
+/* Values can range from 0-31 (where 0 means 32) */
+#define CONFIG_CCLK_DIV (1)
+/* SCLK_DIV controls the system clock divider */
+/* Values can range from 0-31 (where 0 means 32) */
+#define CONFIG_SCLK_DIV (4)
+/* Values can range from 0-7 (where 0 means 8) */
+#define CONFIG_SCLK0_DIV (1)
+#define CONFIG_SCLK1_DIV (1)
+/* DCLK_DIV controls the DDR clock divider */
+/* Values can range from 0-31 (where 0 means 32) */
+#define CONFIG_DCLK_DIV (2)
+/* OCLK_DIV controls the output clock divider */
+/* Values can range from 0-127 (where 0 means 128) */
+#define CONFIG_OCLK_DIV (16)
+
+/*
+ * Memory Settings
+ */
+#define CONFIG_MEM_SIZE 128
+
+#define CONFIG_SMC_GCTL_VAL 0x00000010
+#define CONFIG_SMC_B0CTL_VAL 0x01007011
+#define CONFIG_SMC_B0TIM_VAL 0x08170977
+#define CONFIG_SMC_B0ETIM_VAL 0x00092231
+
+#define CONFIG_SYS_MONITOR_LEN (768 * 1024)
+#define CONFIG_SYS_MALLOC_LEN (512 * 1024)
+
+#define CONFIG_HW_WATCHDOG
+/*
+ * Network Settings
+ */
+#define ADI_CMDS_NETWORK
+#define CONFIG_NETCONSOLE
+#define CONFIG_NET_MULTI
+#define CONFIG_HOSTNAME "bf609-ezkit"
+#define CONFIG_DESIGNWARE_ETH
+#define CONFIG_DW_PORTS 1
+#define CONFIG_DW_AUTONEG
+#define CONFIG_DW_ALTDESCRIPTOR
+#define CONFIG_CMD_NET
+#define CONFIG_CMD_MII
+#define CONFIG_MII
+
+/* i2c Settings */
+#define CONFIG_BFIN_TWI_I2C
+#define CONFIG_HARD_I2C
+
+/*
+ * Flash Settings
+ */
+#undef CONFIG_CMD_IMLS
+#undef CONFIG_CMD_JFFS2
+#define CONFIG_SYS_FLASH_CFI_WIDTH 2
+#define CONFIG_FLASH_CFI_DRIVER
+#define CONFIG_SYS_FLASH_BASE 0xb0000000
+#define CONFIG_SYS_FLASH_CFI
+#define CONFIG_SYS_FLASH_PROTECTION
+#define CONFIG_SYS_MAX_FLASH_BANKS 1
+#define CONFIG_SYS_MAX_FLASH_SECT 131
+#define CONFIG_CFI_FLASH_USE_WEAK_ACCESSORS
+
+/*
+ * SPI Settings
+ */
+#define CONFIG_BFIN_SPI6XX
+#define CONFIG_ENV_SPI_MAX_HZ 25000000
+#define CONFIG_SF_DEFAULT_SPEED 25000000
+#define CONFIG_SPI_FLASH
+#define CONFIG_SPI_FLASH_ALL
+
+/*
+ * Env Storage Settings
+ */
+#if (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_SPI_MASTER)
+#define CONFIG_ENV_IS_IN_SPI_FLASH
+#define CONFIG_ENV_OFFSET 0x10000
+#define CONFIG_ENV_SIZE 0x2000
+#define CONFIG_ENV_SECT_SIZE 0x10000
+#define CONFIG_ENV_IS_EMBEDDED_IN_LDR
+#elif (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_NAND)
+#define CONFIG_ENV_IS_IN_NAND
+#define CONFIG_ENV_OFFSET 0x60000
+#define CONFIG_ENV_SIZE 0x20000
+#else
+#define CONFIG_ENV_IS_IN_FLASH
+#define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + CONFIG_ENV_OFFSET)
+#define CONFIG_ENV_OFFSET 0x8000
+#define CONFIG_ENV_SIZE 0x8000
+#define CONFIG_ENV_SECT_SIZE 0x8000
+#define CONFIG_ENV_IS_EMBEDDED_IN_LDR
+#endif
+
+#define FLASHBOOT_ENV_SETTINGS "flashboot=bootm 0xB0100000\0"
+
+/*
+ * SDH Settings
+ */
+#define CONFIG_GENERIC_MMC
+#define CONFIG_MMC
+#define CONFIG_BFIN_SDH
+
+/*
+ * Misc Settings
+ */
+#define CONFIG_BOARD_EARLY_INIT_F
+#define CONFIG_UART_CONSOLE 0
+
+#define CONFIG_CMD_MEMORY
+
+#define CONFIG_SYS_MEMTEST_END (CONFIG_STACKBASE - 20*1024*1024 + 4)
+#define CONFIG_BFIN_SOFT_SWITCH
+
+#if 0
+#define CONFIG_UART_MEM 1024
+#undef CONFIG_UART_CONSOLE
+#undef CONFIG_JTAG_CONSOLE
+#undef CONFIG_UART_CONSOLE_IS_JTAG
+#endif
+
+/*
+ * Pull in common ADI header for remaining command/environment setup
+ */
+#include <configs/bfin_adi_common.h>
+#endif
diff --git a/include/configs/bfin_adi_common.h b/include/configs/bfin_adi_common.h
index ccdec0d..d3ae3a7 100644
--- a/include/configs/bfin_adi_common.h
+++ b/include/configs/bfin_adi_common.h
@@ -10,7 +10,7 @@
*/
#ifndef _CONFIG_CMD_DEFAULT_H
# include <config_cmd_default.h>
-# if ADI_CMDS_NETWORK
+# ifdef ADI_CMDS_NETWORK
# define CONFIG_CMD_DHCP
# define CONFIG_BOOTP_SUBNETMASK
# define CONFIG_BOOTP_GATEWAY
@@ -58,7 +58,7 @@
# endif
# ifdef CONFIG_RTC_BFIN
# define CONFIG_CMD_DATE
-# if ADI_CMDS_NETWORK
+# ifdef ADI_CMDS_NETWORK
# define CONFIG_CMD_SNTP
# endif
# endif
@@ -193,10 +193,12 @@
"nand erase 0 0x40000;" \
"nand write $(loadaddr) 0 0x40000"
# else
-# define UBOOT_ENV_UPDATE \
+# ifndef UBOOT_ENV_UPDATE
+# define UBOOT_ENV_UPDATE \
"protect off 0x20000000 +$(filesize);" \
"erase 0x20000000 +$(filesize);" \
"cp.b $(loadaddr) 0x20000000 $(filesize)"
+# endif
# endif
# ifdef CONFIG_NETCONSOLE
# define NETCONSOLE_ENV \
diff --git a/include/configs/cam_enc_4xx.h b/include/configs/cam_enc_4xx.h
index a7a698c..56528dd 100644
--- a/include/configs/cam_enc_4xx.h
+++ b/include/configs/cam_enc_4xx.h
@@ -451,7 +451,7 @@
"bootfile=" __stringify(CONFIG_HOSTNAME) "/uImage \0" \
"kernel_addr_r=80600000\0" \
"load_kernel=tftp ${kernel_addr_r} ${bootfile}\0" \
- "ubi_load_kernel=ubi part ubi 2048;ubifsmount ${img_volume};" \
+ "ubi_load_kernel=ubi part ubi 2048;ubifsmount ubi:${img_volume};" \
"ubifsload ${kernel_addr_r} boot/uImage\0" \
"fit_addr_r=" __stringify(CONFIG_BOARD_IMG_ADDR_R) "\0" \
"img_addr_r=" __stringify(CONFIG_BOARD_IMG_ADDR_R) "\0" \
diff --git a/include/configs/coreboot.h b/include/configs/coreboot.h
index c7f36ff..49f05de 100644
--- a/include/configs/coreboot.h
+++ b/include/configs/coreboot.h
@@ -42,6 +42,12 @@
#define CONFIG_ZBOOT_32
#define CONFIG_PHYSMEM
+#define CONFIG_LMB
+#define CONFIG_OF_LIBFDT
+#define CONFIG_OF_CONTROL
+#define CONFIG_OF_SEPARATE
+#define CONFIG_DEFAULT_DEVICE_TREE link
+
/*-----------------------------------------------------------------------
* Watchdog Configuration
*/
diff --git a/include/configs/devkit8000.h b/include/configs/devkit8000.h
index d926f74..788227d 100644
--- a/include/configs/devkit8000.h
+++ b/include/configs/devkit8000.h
@@ -354,7 +354,6 @@
/* SPL OS boot options */
#define CONFIG_SPL_OS_BOOT
-#define CONFIG_SPL_OS_BOOT_KEY 26
#define CONFIG_CMD_SPL
#define CONFIG_CMD_SPL_WRITE_SIZE 0x400 /* 1024 byte */
diff --git a/include/configs/dockstar.h b/include/configs/dockstar.h
index 249f93b..63d5e35 100644
--- a/include/configs/dockstar.h
+++ b/include/configs/dockstar.h
@@ -85,7 +85,7 @@
#define CONFIG_BOOTCOMMAND \
"setenv bootargs ${console} ${mtdparts} ${bootargs_root}; " \
"ubi part root; " \
- "ubifsmount root; " \
+ "ubifsmount ubi:root; " \
"ubifsload 0x800000 ${kernel}; " \
"ubifsload 0x1100000 ${initrd}; " \
"bootm 0x800000 0x1100000"
diff --git a/include/configs/ea20.h b/include/configs/ea20.h
index 03dfe0a..90fc7c5 100644
--- a/include/configs/ea20.h
+++ b/include/configs/ea20.h
@@ -294,12 +294,12 @@
"bootm ${kernel_addr_r}\0" \
"net_self_load=tftp ${kernel_addr_r} ${bootfile};" \
"tftp ${ramdisk_addr_r} ${ramdisk_file};\0" \
- "nand_nand=ubi part nand0,${as};ubifsmount rootfs;" \
+ "nand_nand=ubi part nand0,${as};ubifsmount ubi:rootfs;" \
"ubifsload ${kernel_addr_r} /boot/uImage;" \
"ubifsumount; run nandargs addip addtty " \
"addmtd addmisc addmem;clrlogo;" \
"bootm ${kernel_addr_r}\0" \
- "nand_nandrw=ubi part nand0,${as};ubifsmount rootfs;" \
+ "nand_nandrw=ubi part nand0,${as};ubifsmount ubi:rootfs;" \
"ubifsload ${kernel_addr_r} /boot/uImage;" \
"ubifsumount; run nandrwargs addip addtty " \
"addmtd addmisc addmem;clrlogo;" \
@@ -310,7 +310,7 @@
"u-boot=" __stringify(CONFIG_HOSTNAME) "/u-boot.bin\0" \
"load_magic=if sf probe 0;then sf " \
"read c0000000 0x10000 0x60000;fi\0" \
- "load_nand=ubi part nand0,${as};ubifsmount rootfs;" \
+ "load_nand=ubi part nand0,${as};ubifsmount ubi:rootfs;" \
"if ubifsload c0000014 /boot/u-boot.bin;" \
"then mw c0000008 ${filesize};else echo Error reading" \
" u-boot from nand!;fi\0" \
diff --git a/include/configs/ib62x0.h b/include/configs/ib62x0.h
index f646ae5..d3c664c 100644
--- a/include/configs/ib62x0.h
+++ b/include/configs/ib62x0.h
@@ -88,7 +88,7 @@
#define CONFIG_BOOTCOMMAND \
"setenv bootargs ${console} ${mtdparts} ${bootargs_root}; " \
"ubi part root; " \
- "ubifsmount root; " \
+ "ubifsmount ubi:root; " \
"ubifsload 0x800000 ${kernel}; " \
"ubifsload 0x1100000 ${initrd}; " \
"bootm 0x800000 0x1100000"
diff --git a/include/configs/iconnect.h b/include/configs/iconnect.h
index ba57849..c882bfa 100644
--- a/include/configs/iconnect.h
+++ b/include/configs/iconnect.h
@@ -87,7 +87,7 @@
#define CONFIG_BOOTCOMMAND \
"setenv bootargs ${console} ${mtdparts} ${bootargs_root}; " \
"ubi part rootfs; " \
- "ubifsmount rootfs; " \
+ "ubifsmount ubi:rootfs; " \
"ubifsload 0x800000 ${kernel}; " \
"bootm 0x800000"
diff --git a/include/configs/km/keymile-common.h b/include/configs/km/keymile-common.h
index f64748e..796f330 100644
--- a/include/configs/km/keymile-common.h
+++ b/include/configs/km/keymile-common.h
@@ -148,6 +148,14 @@
"ubi part " CONFIG_KM_UBI_PARTITION_NAME_APP "; fi\0"
#endif /* CONFIG_KM_UBI_PARTITION_NAME_APP */
+#ifdef CONFIG_NAND_ECC_BCH
+#define CONFIG_KM_UIMAGE_NAME "ecc_bch_uImage\0"
+#define CONFIG_KM_ECC_MODE " eccmode=bch"
+#else
+#define CONFIG_KM_UIMAGE_NAME "uImage\0"
+#define CONFIG_KM_ECC_MODE
+#endif
+
/*
* boottargets
* - set 'subbootcmds'
@@ -184,6 +192,7 @@
":${hostname}:${netdev}:off3" \
" console=" CONFIG_KM_CONSOLE_TTY ",${baudrate}" \
" mem=${kernelmem} init=${init}" \
+ CONFIG_KM_ECC_MODE \
" phram.phram=phvar,${varaddr}," __stringify(CONFIG_KM_PHRAM)\
" " CONFIG_KM_UBI_LINUX_MTD " " \
CONFIG_KM_DEF_BOOT_ARGS_CPU \
@@ -210,9 +219,10 @@
*/
#define CONFIG_KM_DEF_ENV_FLASH_BOOT \
"cramfsaddr=" __stringify(CONFIG_KM_CRAMFS_ADDR) "\0" \
- "cramfsloadkernel=cramfsload ${load_addr_r} uImage\0" \
+ "cramfsloadkernel=cramfsload ${load_addr_r} ${uimage}\0" \
"ubicopy=ubi read "__stringify(CONFIG_KM_CRAMFS_ADDR) \
" bootfs${boot_bank}\0" \
+ "uimage=" CONFIG_KM_UIMAGE_NAME \
CONFIG_KM_DEV_ENV_FLASH_BOOT_UBI
/*
diff --git a/include/configs/km/km8309-common.h b/include/configs/km/km8309-common.h
index b36e892..7f9cffa 100644
--- a/include/configs/km/km8309-common.h
+++ b/include/configs/km/km8309-common.h
@@ -22,7 +22,7 @@
#define CONFIG_MPC830x 1 /* MPC830x family */
#define CONFIG_MPC8309 1 /* MPC8309 CPU specific */
-#define CONFIG_KM_DEF_ARCH "arch=ppc_8xx\0"
+#define CONFIG_KM_DEF_ARCH "arch=ppc_82xx\0"
#define CONFIG_CMD_DIAG 1
/* include common defines/options for all 83xx Keymile boards */
@@ -33,8 +33,6 @@
/* at end of uboot partition, before env */
#define CONFIG_SYS_QE_FMAN_FW_ADDR 0xF00B0000
-#define CONFIG_MISC_INIT_R
-
/*
* System IO Config
*/
diff --git a/include/configs/km/km8321-common.h b/include/configs/km/km8321-common.h
index 8ad6fc3..abb9081 100644
--- a/include/configs/km/km8321-common.h
+++ b/include/configs/km/km8321-common.h
@@ -38,8 +38,6 @@
/* include common defines/options for all 83xx Keymile boards */
#include "km83xx-common.h"
-#define CONFIG_MISC_INIT_R
-
/*
* System IO Config
*/
diff --git a/include/configs/km/km83xx-common.h b/include/configs/km/km83xx-common.h
index a9823d6..eb0e5b6 100644
--- a/include/configs/km/km83xx-common.h
+++ b/include/configs/km/km83xx-common.h
@@ -165,19 +165,15 @@
#define CONFIG_UEC_ETH
#define CONFIG_ETHPRIME "UEC0"
+#if !defined(CONFIG_MPC8309)
#define CONFIG_UEC_ETH1 /* GETH1 */
#define UEC_VERBOSE_DEBUG 1
+#endif
#ifdef CONFIG_UEC_ETH1
-#if defined(CONFIG_MPC8309)
-#define CONFIG_SYS_UEC1_UCC_NUM 2 /* UCC3 */
-#define CONFIG_SYS_UEC1_RX_CLK QE_CLK_NONE /* not used in RMII Mode */
-#define CONFIG_SYS_UEC1_TX_CLK QE_CLK12
-#else
#define CONFIG_SYS_UEC1_UCC_NUM 3 /* UCC4 */
#define CONFIG_SYS_UEC1_RX_CLK QE_CLK_NONE /* not used in RMII Mode */
#define CONFIG_SYS_UEC1_TX_CLK QE_CLK17
-#endif
#define CONFIG_SYS_UEC1_ETH_TYPE FAST_ETH
#define CONFIG_SYS_UEC1_PHY_ADDR 0
#define CONFIG_SYS_UEC1_INTERFACE_TYPE PHY_INTERFACE_MODE_RMII
@@ -316,7 +312,6 @@
#define CONFIG_EXTRA_ENV_SETTINGS \
CONFIG_KM_DEF_ENV \
CONFIG_KM_DEF_ARCH \
- "dtt_bus=pca9547:70:a\0" \
"EEprom_ivm=pca9547:70:9\0" \
"newenv=" \
"prot off 0xF00C0000 +0x40000 && " \
diff --git a/include/configs/km8360.h b/include/configs/km8360.h
index 7631ab6..5b191bc 100644
--- a/include/configs/km8360.h
+++ b/include/configs/km8360.h
@@ -25,6 +25,8 @@
#define CONFIG_KM_BOARD_NAME "kmcoge5ne"
#define CONFIG_KM_DEF_NETDEV "netdev=eth1\0"
#define CONFIG_CMD_NAND
+#define CONFIG_NAND_ECC_BCH
+#define CONFIG_BCH
#define CONFIG_NAND_KMETER1
#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define NAND_MAX_CHIPS 1
diff --git a/include/configs/omap3_pandora.h b/include/configs/omap3_pandora.h
index ee88841..b77ce25 100644
--- a/include/configs/omap3_pandora.h
+++ b/include/configs/omap3_pandora.h
@@ -180,7 +180,8 @@
"ext2load mmc1 0 ${loadaddr} autoboot.scr; then " \
"source ${loadaddr}; " \
"fi; " \
- "ubi part boot && ubifsmount boot && ubifsload ${loadaddr} uImage && bootm ${loadaddr}"
+ "ubi part boot && ubifsmount ubi:boot && " \
+ "ubifsload ${loadaddr} uImage && bootm ${loadaddr}"
#define CONFIG_AUTO_COMPLETE 1
/*
diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h
index 9c431bf..406da43 100644
--- a/include/configs/sandbox.h
+++ b/include/configs/sandbox.h
@@ -32,6 +32,13 @@
#define CONFIG_OF_LIBFDT
#define CONFIG_LMB
+#define CONFIG_FS_FAT
+#define CONFIG_FS_EXT4
+#define CONFIG_EXT4_WRITE
+#define CONFIG_CMD_FAT
+#define CONFIG_CMD_EXT4
+#define CONFIG_CMD_EXT4_WRITE
+
#define CONFIG_SYS_VSNPRINTF
#define CONFIG_CMD_GPIO
@@ -63,8 +70,8 @@
#define CONFIG_SYS_HZ 1000
/* Memory things - we don't really want a memory test */
-#define CONFIG_SYS_LOAD_ADDR 0x10000000
-#define CONFIG_SYS_MEMTEST_START 0x10000000
+#define CONFIG_SYS_LOAD_ADDR 0x00000000
+#define CONFIG_SYS_MEMTEST_START 0x00100000
#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + 0x1000)
#define CONFIG_PHYS_64BIT
@@ -85,6 +92,13 @@
#undef CONFIG_CMD_NET
#undef CONFIG_CMD_NFS
+#define CONFIG_CMD_HASH
+#define CONFIG_HASH_VERIFY
+#define CONFIG_SHA1
+#define CONFIG_SHA256
+
+#define CONFIG_CMD_SANDBOX
+
#define CONFIG_BOOTARGS ""
#define CONFIG_EXTRA_ENV_SETTINGS "stdin=serial\0" \
diff --git a/include/configs/suvd3.h b/include/configs/suvd3.h
index c50832c..bbf9da5 100644
--- a/include/configs/suvd3.h
+++ b/include/configs/suvd3.h
@@ -110,4 +110,41 @@
BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE)
#define CONFIG_SYS_DBAT6U CONFIG_SYS_IBAT6U
+/*
+ * QE UEC ethernet configuration
+ */
+#if defined(CONFIG_KMVECT1)
+#define CONFIG_MV88E6352_SWITCH
+#define CONFIG_KM_MVEXTSW_ADDR 0x10
+
+/* ethernet port connected to simple switch 88e6122 (UEC0) */
+#define CONFIG_UEC_ETH1
+#define CONFIG_SYS_UEC1_UCC_NUM 0 /* UCC1 */
+#define CONFIG_SYS_UEC1_RX_CLK QE_CLK9
+#define CONFIG_SYS_UEC1_TX_CLK QE_CLK10
+
+#define CONFIG_FIXED_PHY 0xFFFFFFFF
+#define CONFIG_SYS_FIXED_PHY_ADDR 0x1E /* unused address */
+#define CONFIG_SYS_FIXED_PHY_PORT(devnum, speed, duplex) \
+ {devnum, speed, duplex}
+#define CONFIG_SYS_FIXED_PHY_PORTS \
+ CONFIG_SYS_FIXED_PHY_PORT("UEC0", SPEED_100, DUPLEX_FULL)
+
+#define CONFIG_SYS_UEC1_ETH_TYPE FAST_ETH
+#define CONFIG_SYS_UEC1_PHY_ADDR CONFIG_SYS_FIXED_PHY_ADDR
+#define CONFIG_SYS_UEC1_INTERFACE_TYPE PHY_INTERFACE_MODE_MII
+#define CONFIG_SYS_UEC1_INTERFACE_SPEED 100
+
+/* ethernet port connected to piggy (UEC2) */
+#define CONFIG_HAS_ETH1
+#define CONFIG_UEC_ETH2
+#define CONFIG_SYS_UEC2_UCC_NUM 2 /* UCC3 */
+#define CONFIG_SYS_UEC2_RX_CLK QE_CLK_NONE /* not used in RMII Mode */
+#define CONFIG_SYS_UEC2_TX_CLK QE_CLK12
+#define CONFIG_SYS_UEC2_ETH_TYPE FAST_ETH
+#define CONFIG_SYS_UEC2_PHY_ADDR 0
+#define CONFIG_SYS_UEC2_INTERFACE_TYPE PHY_INTERFACE_MODE_RMII
+#define CONFIG_SYS_UEC2_INTERFACE_SPEED 100
+#endif /* CONFIG_KMVECT1 */
+
#endif /* __CONFIG_H */
diff --git a/include/configs/tricorder.h b/include/configs/tricorder.h
index 1a665ac..ebd7a25 100644
--- a/include/configs/tricorder.h
+++ b/include/configs/tricorder.h
@@ -193,7 +193,7 @@
"bootm ${loadaddr}\0" \
"loaduimage_ubi=mtd default; " \
"ubi part fs; " \
- "ubifsmount root; " \
+ "ubifsmount ubi:root; " \
"ubifsload ${loadaddr} /boot/uImage\0" \
"nandboot=echo Booting from nand ...; " \
"run nandargs; " \
diff --git a/include/configs/tuxx1.h b/include/configs/tuxx1.h
index 90d2e61..6caf23a 100644
--- a/include/configs/tuxx1.h
+++ b/include/configs/tuxx1.h
@@ -11,7 +11,7 @@
* (C) Copyright 2008
* Heiko Schocher, DENX Software Engineering, hs@denx.de.
*
- * (C) Copyright 2010-2012
+ * (C) Copyright 2010-2013
* Lukas Roggli, KEYMILE Ltd, lukas.roggli@keymile.com
* Holger Brunck, Keymile GmbH, holger.bruncl@keymile.com
*
@@ -27,16 +27,20 @@
/*
* High Level Configuration Options
*/
-#ifdef CONFIG_KMSUPX5
+#if defined(CONFIG_KMSUPX5)
#define CONFIG_KM_BOARD_NAME "kmsupx5"
#define CONFIG_HOSTNAME kmsupx5
-#elif defined CONFIG_TUGE1
+#elif defined(CONFIG_TUGE1)
#define CONFIG_KM_BOARD_NAME "tuge1"
#define CONFIG_HOSTNAME tuge1
-#else
-#define CONFIG_TUXXX /* TUXX1 board (tuxa1/tuda1) specific */
+#elif defined(CONFIG_TUXX1) /* TUXX1 board (tuxa1/tuda1) specific */
#define CONFIG_KM_BOARD_NAME "tuxx1"
#define CONFIG_HOSTNAME tuxx1
+#elif defined(CONFIG_KMOPTI2)
+#define CONFIG_KM_BOARD_NAME "kmopti2"
+#define CONFIG_HOSTNAME kmopti2
+#else
+#error ("Board not supported")
#endif
#define CONFIG_SYS_TEXT_BASE 0xF0000000
@@ -46,18 +50,18 @@
#define CONFIG_SYS_APP1_BASE 0xA0000000 /* PAXG */
#define CONFIG_SYS_APP1_SIZE 256 /* Megabytes */
-#ifndef CONFIG_KM_DISABLE_APP2
+#if defined(CONFIG_TUXX1) || defined(CONFIG_KMOPTI2)
#define CONFIG_SYS_APP2_BASE 0xB0000000 /* PINC3 */
#define CONFIG_SYS_APP2_SIZE 256 /* Megabytes */
#endif
/*
* Init Local Bus Memory Controller:
- *
- * Bank Bus Machine PortSz Size Device on TUDA1 TUXA1 TUGE1 KMSUPX4
- * ---- --- ------- ------ ----- ---------------------------------------
- * 2 Local GPCM 8 bit 256MB PAXG LPXF PAXI LPXF
- * 3 Local GPCM 8 bit 256MB PINC3 PINC2 unused unused
+ * Device on
+ * Bank Bus Machine PortSz Size TUDA1 TUXA1 TUGE1 KMSUPX4 KMOPTI2
+ * ---- --- ------- ------ ----- ---------------------------------------
+ * 2 Local GPCM 8 bit 256MB PAXG LPXF PAXI LPXF PAXE
+ * 3 Local GPCM 8 bit 256MB PINC3 PINC2 unused unused OPI2(16 bit)
*
*/
@@ -81,7 +85,7 @@
OR_GPCM_TRLX_SET | \
OR_GPCM_EHTR_CLEAR | \
OR_GPCM_EAD)
-#ifndef CONFIG_KM_DISABLE_APP2
+#if defined(CONFIG_TUXX1)
/*
* Configuration for C3 on the local bus
*/
@@ -107,6 +111,22 @@
MxMR_WLFx_2X)
#endif
+#if defined(CONFIG_KMOPTI2)
+/*
+ * Configuration for C3 on the local bus
+ */
+#define CONFIG_SYS_LBLAWBAR3_PRELIM CONFIG_SYS_APP2_BASE
+#define CONFIG_SYS_LBLAWAR3_PRELIM (LBLAWAR_EN | LBLAWAR_256MB)
+#define CONFIG_SYS_BR3_PRELIM (CONFIG_SYS_APP2_BASE | \
+ BR_PS_16 | \
+ BR_MS_GPCM | \
+ BR_V)
+#define CONFIG_SYS_OR3_PRELIM (MEG_TO_AM(CONFIG_SYS_APP2_SIZE) | \
+ OR_GPCM_SCY_4 | \
+ OR_GPCM_TRLX_CLEAR | \
+ OR_GPCM_EHTR_CLEAR)
+#endif
+
/*
* MMU Setup
*/
@@ -125,7 +145,7 @@
BATL_GUARDEDSTORAGE)
#define CONFIG_SYS_DBAT5U CONFIG_SYS_IBAT5U
-#ifdef CONFIG_KM_DISABLE_APP2
+#if defined(CONFIG_TUGE1) || defined(CONFIG_KMSUPX5)
#define CONFIG_SYS_IBAT6L (0)
#define CONFIG_SYS_IBAT6U (0)
#define CONFIG_SYS_DBAT6L CONFIG_SYS_IBAT6L
diff --git a/include/configs/twister.h b/include/configs/twister.h
index a852481..4205a11 100644
--- a/include/configs/twister.h
+++ b/include/configs/twister.h
@@ -58,7 +58,6 @@
#define CONFIG_CMD_SPL_NAND_OFS (CONFIG_SYS_NAND_SPL_KERNEL_OFFS+\
0x600000)
#define CONFIG_SPL_OS_BOOT
-#define CONFIG_SPL_OS_BOOT_KEY 55
#define CONFIG_SYS_SPL_ARGS_ADDR (PHYS_SDRAM_1 + 0x100)
#define CONFIG_SPL_BOARD_INIT
diff --git a/include/configs/x600.h b/include/configs/x600.h
index 3082aaa..bb495a1 100644
--- a/include/configs/x600.h
+++ b/include/configs/x600.h
@@ -262,7 +262,7 @@
"nand_ubifs=run ubifs_mount ubifs_load ubifsargs addip" \
" addcon addmisc addmtd;" \
"bootm ${kernel_addr} - ${dtb_addr}\0" \
- "ubifs_mount=ubi part ubi${boot_part};ubifsmount rootfs\0" \
+ "ubifs_mount=ubi part ubi${boot_part};ubifsmount ubi:rootfs\0" \
"ubifs_load=ubifsload ${kernel_addr} ${kernel_fs};" \
"ubifsload ${dtb_addr} ${dtb_fs};\0" \
"nand_ubifs=run ubifs_mount ubifs_load ubifsargs addip addcon " \
diff --git a/include/exports.h b/include/exports.h
index 6cf31aa..41d5085 100644
--- a/include/exports.h
+++ b/include/exports.h
@@ -24,6 +24,7 @@ int setenv (const char *varname, const char *varvalue);
long simple_strtol(const char *cp,char **endp,unsigned int base);
int strcmp(const char * cs,const char * ct);
unsigned long ustrtoul(const char *cp, char **endp, unsigned int base);
+unsigned long long ustrtoull(const char *cp, char **endp, unsigned int base);
#if defined(CONFIG_CMD_I2C)
int i2c_write (uchar, uint, int , uchar* , int);
int i2c_read (uchar, uint, int , uchar* , int);
diff --git a/include/ext4fs.h b/include/ext4fs.h
index 3b59d15..025a2e8 100644
--- a/include/ext4fs.h
+++ b/include/ext4fs.h
@@ -138,4 +138,7 @@ void ext4fs_free_node(struct ext2fs_node *node, struct ext2fs_node *currroot);
int ext4fs_devread(int sector, int byte_offset, int byte_len, char *buf);
void ext4fs_set_blk_dev(block_dev_desc_t *rbdd, disk_partition_t *info);
long int read_allocated_block(struct ext2_inode *inode, int fileblock);
+int ext4fs_probe(block_dev_desc_t *fs_dev_desc,
+ disk_partition_t *fs_partition);
+int ext4_read_file(const char *filename, void *buf, int offset, int len);
#endif
diff --git a/include/fat.h b/include/fat.h
index b28c3fd..9701323 100644
--- a/include/fat.h
+++ b/include/fat.h
@@ -213,4 +213,6 @@ int fat_set_blk_dev(block_dev_desc_t *rbdd, disk_partition_t *info);
int fat_register_device(block_dev_desc_t *dev_desc, int part_no);
int file_fat_write(const char *filename, void *buffer, unsigned long maxsize);
+int fat_read_file(const char *filename, void *buf, int offset, int len);
+void fat_close(void);
#endif /* _FAT_H_ */
diff --git a/include/fs.h b/include/fs.h
index 4f30a38..b6d69e5 100644
--- a/include/fs.h
+++ b/include/fs.h
@@ -21,6 +21,7 @@
#define FS_TYPE_ANY 0
#define FS_TYPE_FAT 1
#define FS_TYPE_EXT 2
+#define FS_TYPE_SANDBOX 3
/*
* Tell the fs layer which block device an partition to use for future
diff --git a/include/hash.h b/include/hash.h
index 34ba558..2dbbd9b 100644
--- a/include/hash.h
+++ b/include/hash.h
@@ -22,7 +22,7 @@
#ifndef _HASH_H
#define _HASH_H
-#ifdef CONFIG_SHA1SUM_VERIFY
+#if defined(CONFIG_SHA1SUM_VERIFY) || defined(CONFIG_CRC32_VERIFY)
#define CONFIG_HASH_VERIFY
#endif
@@ -51,19 +51,24 @@ struct hash_algo {
*/
#define HASH_MAX_DIGEST_SIZE 32
+enum {
+ HASH_FLAG_VERIFY = 1 << 0, /* Enable verify mode */
+ HASH_FLAG_ENV = 1 << 1, /* Allow env vars */
+};
+
/**
* hash_command: Process a hash command for a particular algorithm
*
* This common function is used to implement specific hash commands.
*
- * @algo_name: Hash algorithm being used
- * @verify: Non-zero to enable verify mode
+ * @algo_name: Hash algorithm being used (lower case!)
+ * @flags: Flags value (HASH_FLAG_...)
* @cmdtp: Pointer to command table entry
* @flag: Some flags normally 0 (see CMD_FLAG_.. above)
* @argc: Number of arguments (arg 0 must be the command text)
* @argv: Arguments
*/
-int hash_command(const char *algo_name, int verify, cmd_tbl_t *cmdtp, int flag,
+int hash_command(const char *algo_name, int flags, cmd_tbl_t *cmdtp, int flag,
int argc, char * const argv[]);
#endif
diff --git a/include/malloc.h b/include/malloc.h
index 84ecf79..6295929 100644
--- a/include/malloc.h
+++ b/include/malloc.h
@@ -937,7 +937,6 @@ extern ulong mem_malloc_end;
extern ulong mem_malloc_brk;
void mem_malloc_init(ulong start, ulong size);
-void malloc_bin_reloc(void);
#ifdef __cplusplus
}; /* end of extern "C" */
diff --git a/include/os.h b/include/os.h
index 699682a..038aba9 100644
--- a/include/os.h
+++ b/include/os.h
@@ -40,6 +40,16 @@ struct sandbox_state;
ssize_t os_read(int fd, void *buf, size_t count);
/**
+ * Access to the OS read() system call with non-blocking access
+ *
+ * \param fd File descriptor as returned by os_open()
+ * \param buf Buffer to place data
+ * \param count Number of bytes to read
+ * \return number of bytes read, or -1 on error
+ */
+ssize_t os_read_no_block(int fd, void *buf, size_t count);
+
+/**
* Access to the OS write() system call
*
* \param fd File descriptor as returned by os_open()
@@ -136,4 +146,52 @@ u64 os_get_nsec(void);
*/
int os_parse_args(struct sandbox_state *state, int argc, char *argv[]);
+/*
+ * Types of directory entry that we support. See also os_dirent_typename in
+ * the C file.
+ */
+enum os_dirent_t {
+ OS_FILET_REG, /* Regular file */
+ OS_FILET_LNK, /* Symbolic link */
+ OS_FILET_DIR, /* Directory */
+ OS_FILET_UNKNOWN, /* Something else */
+
+ OS_FILET_COUNT,
+};
+
+/** A directory entry node, containing information about a single dirent */
+struct os_dirent_node {
+ struct os_dirent_node *next; /* Pointer to next node, or NULL */
+ ulong size; /* Size of file in bytes */
+ enum os_dirent_t type; /* Type of entry */
+ char name[0]; /* Name of entry */
+};
+
+/**
+ * Get a directionry listing
+ *
+ * This allocates and returns a linked list containing the directory listing.
+ *
+ * @param dirname Directory to examine
+ * @param headp Returns pointer to head of linked list, or NULL if none
+ * @return 0 if ok, -ve on error
+ */
+int os_dirent_ls(const char *dirname, struct os_dirent_node **headp);
+
+/**
+ * Get the name of a directory entry type
+ *
+ * @param type Type to cehck
+ * @return string containing the name of that type, or "???" if none/invalid
+ */
+const char *os_dirent_get_typename(enum os_dirent_t type);
+
+/**
+ * Get the size of a file
+ *
+ * @param fname Filename to check
+ * @return size of file, or -1 if an error ocurred
+ */
+ssize_t os_get_filesize(const char *fname);
+
#endif
diff --git a/include/sandboxfs.h b/include/sandboxfs.h
new file mode 100644
index 0000000..f5213ac
--- /dev/null
+++ b/include/sandboxfs.h
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2012, Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef __SANDBOX_FS__
+#define __SANDBOX_FS__
+
+int sandbox_fs_set_blk_dev(block_dev_desc_t *rbdd, disk_partition_t *info);
+
+long sandbox_fs_read_at(const char *filename, unsigned long pos,
+ void *buffer, unsigned long maxsize);
+
+void sandbox_fs_close(void);
+int sandbox_fs_ls(const char *dirname);
+int fs_read_sandbox(const char *filename, void *buf, int offset, int len);
+
+#endif
diff --git a/include/u-boot/crc.h b/include/u-boot/crc.h
index 07badbf..08e509e 100644
--- a/include/u-boot/crc.h
+++ b/include/u-boot/crc.h
@@ -30,4 +30,15 @@ uint32_t crc32 (uint32_t, const unsigned char *, uint);
uint32_t crc32_wd (uint32_t, const unsigned char *, uint, uint);
uint32_t crc32_no_comp (uint32_t, const unsigned char *, uint);
+/**
+ * crc32_wd_buf - Perform CRC32 on a buffer and return result in buffer
+ *
+ * @input: Input buffer
+ * @ilen: Input buffer length
+ * @output: Place to put checksum result (4 bytes)
+ * @chunk_sz: Trigger watchdog after processing this many bytes
+ */
+void crc32_wd_buf(const unsigned char *input, uint ilen,
+ unsigned char *output, uint chunk_sz);
+
#endif /* _UBOOT_CRC_H */