summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Waters <justin.waters@timesys.com>2013-04-24 17:43:23 -0400
committerJustin Waters <justin.waters@timesys.com>2013-04-24 17:43:23 -0400
commit15473818068d8de6672d6a83a6888ed40b1f9811 (patch)
treec3f0db00b4b2f3d0a7fcd26c3b90599523440f57
parent18282017b14c0b32b4aa6fd05df58ba5cff0b472 (diff)
LogicPD Support for OMAP3/DM3/AM3 boards 2.3 Update
-rw-r--r--Makefile31
-rw-r--r--arch/arm/include/asm/arch-omap3/sys_proto.h3
-rw-r--r--board/ti/logic/config.mk1
-rw-r--r--board/ti/logic/logic-product-id.c90
-rw-r--r--board/ti/logic/logic.c30
-rw-r--r--common/cmd_nand.c10
-rw-r--r--common/env_common.c4
-rw-r--r--common/lcd.c5
-rw-r--r--drivers/mtd/nand/nand_bch.c2
-rw-r--r--drivers/mtd/nand/omap_gpmc.c2
-rw-r--r--include/configs/omap3logic.h45
11 files changed, 190 insertions, 33 deletions
diff --git a/Makefile b/Makefile
index 1a5353e16ca..e2c76de3e6c 100644
--- a/Makefile
+++ b/Makefile
@@ -32,6 +32,7 @@ U_BOOT_VERSION = $(VERSION).$(PATCHLEVEL)$(EXTRAVERSION)
endif
TIMESTAMP_FILE = $(obj)include/timestamp_autogenerated.h
VERSION_FILE = $(obj)include/version_autogenerated.h
+ECC_METHOD_FILE = $(obj)include/ecc-method_autogenerated.h
HOSTARCH := $(shell uname -m | \
sed -e s/i.86/x86/ \
@@ -140,7 +141,7 @@ SUBDIRS = tools \
examples/standalone \
examples/api
-.PHONY : $(SUBDIRS) $(VERSION_FILE)
+.PHONY : $(SUBDIRS) $(VERSION_FILE) $(ECC_METHOD_FILE)
ifeq ($(obj)include/config.mk,$(wildcard $(obj)include/config.mk))
@@ -298,7 +299,7 @@ LIBS += board/$(BOARDDIR)/prod-id/libprod-id.o
endif
LIBS := $(addprefix $(obj),$(sort $(LIBS)))
-.PHONY : $(LIBS) $(TIMESTAMP_FILE)
+.PHONY : $(LIBS) $(TIMESTAMP_FILE) $(ECC_METHOD_FILE)
LIBBOARD := $(addprefix $(obj),$(LIBBOARD))
@@ -446,19 +447,19 @@ $(LDSCRIPT): depend
$(obj)u-boot.lds: $(LDSCRIPT)
$(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@
-nand_spl: $(TIMESTAMP_FILE) $(VERSION_FILE) depend
+nand_spl: $(TIMESTAMP_FILE) $(VERSION_FILE) $(ECC_METHOD_FILE) depend
$(MAKE) -C nand_spl/board/$(BOARDDIR) all
$(obj)u-boot-nand.bin: nand_spl $(obj)u-boot.bin
cat $(obj)nand_spl/u-boot-spl-16k.bin $(obj)u-boot.bin > $(obj)u-boot-nand.bin
-onenand_ipl: $(TIMESTAMP_FILE) $(VERSION_FILE) $(obj)include/autoconf.mk
+onenand_ipl: $(TIMESTAMP_FILE) $(VERSION_FILE) $(ECC_METHOD_FILE) $(obj)include/autoconf.mk
$(MAKE) -C onenand_ipl/board/$(BOARDDIR) all
$(obj)u-boot-onenand.bin: onenand_ipl $(obj)u-boot.bin
cat $(ONENAND_BIN) $(obj)u-boot.bin > $(obj)u-boot-onenand.bin
-mmc_spl: $(TIMESTAMP_FILE) $(VERSION_FILE) depend
+mmc_spl: $(TIMESTAMP_FILE) $(VERSION_FILE) $(ECC_METHOD_FILE) depend
$(MAKE) -C mmc_spl/board/$(BOARDDIR) all
$(obj)mmc_spl/u-boot-mmc-spl.bin: mmc_spl
@@ -472,7 +473,7 @@ updater:
# Explicitly make _depend in subdirs containing multiple targets to prevent
# parallel sub-makes creating .depend files simultaneously.
-depend dep: $(TIMESTAMP_FILE) $(VERSION_FILE) \
+depend dep: $(TIMESTAMP_FILE) $(VERSION_FILE) $(ECC_METHOD_FILE) \
$(obj)include/autoconf.mk \
$(obj)include/generated/generic-asm-offsets.h
for dir in $(SUBDIRS) $(CPUDIR) $(dir $(LDSCRIPT)) ; do \
@@ -559,6 +560,20 @@ $(VERSION_FILE):
'$(shell $(LD) -v | head -n 1)' )>> $@.tmp
@cmp -s $@ $@.tmp && rm -f $@.tmp || mv -f $@.tmp $@
+$(ECC_METHOD_FILE):
+ @#(XECO) Generating $@
+ifneq ($(SYSCFG_NAND_ECC_SOFT_BCH),)
+ @echo "#define SYSCFG_NAND_ECC_SOFT_BCH" > $@.tmp
+else
+ @echo "#undef SYSCFG_NAND_ECC_SOFT_BCH" > $@.tmp
+endif
+ifneq ($(SYSCFG_NAND_ECC_IN_CHIP),)
+ @echo "#define SYSCFG_NAND_ECC_IN_CHIP" >> $@.tmp
+else
+ @echo "#undef SYSCFG_NAND_ECC_IN_CHIP" >> $@.tmp
+endif
+ @cmp -s $@ $@.tmp && rm -f $@.tmp || mv -f $@.tmp $@
+
easylogo env gdb:
$(MAKE) -C tools/$@ all MTD_VERSION=${MTD_VERSION}
gdbtools: gdb
@@ -578,7 +593,7 @@ include/license.h: tools/bin2header COPYING
unconfig:
@rm -f $(obj)board/*/config.tmp $(obj)board/*/*/config.tmp
-%_config:: unconfig
+%_config:: unconfig $(ECC_METHOD_FILE)
@$(MKCONFIG) -A $(@:_config=)
sinclude $(obj).boards.depend
@@ -1106,7 +1121,7 @@ clean:
@rm -f $(obj)mmc_spl/{u-boot.lds,u-boot-spl,u-boot-spl.map,u-boot-spl.bin,u-boot-mmc-spl.bin}
@rm -f $(ONENAND_BIN)
@rm -f $(obj)onenand_ipl/u-boot.lds
- @rm -f $(TIMESTAMP_FILE) $(VERSION_FILE)
+ @rm -f $(TIMESTAMP_FILE) $(VERSION_FILE) $(ECC_METHOD_FILE)
@find $(OBJTREE) -type f \
\( -name 'core' -o -name '*.bak' -o -name '*~' \
-o -name '*.o' -o -name '*.a' -o -name '*.exe' \) -print \
diff --git a/arch/arm/include/asm/arch-omap3/sys_proto.h b/arch/arm/include/asm/arch-omap3/sys_proto.h
index 8c4f364d01a..ac28a8866f6 100644
--- a/arch/arm/include/asm/arch-omap3/sys_proto.h
+++ b/arch/arm/include/asm/arch-omap3/sys_proto.h
@@ -64,7 +64,8 @@ u32 wait_on_value(u32, u32, void *, u32);
void sdelay(unsigned long);
void make_cs1_contiguous(void);
enum omap_nand_ecc_mode {
- OMAP_ECC_SOFT = 1,
+ OMAP_ECC_NONE,
+ OMAP_ECC_SOFT,
OMAP_ECC_HW,
OMAP_ECC_CHIP,
OMAP_ECC_SOFT_BCH,
diff --git a/board/ti/logic/config.mk b/board/ti/logic/config.mk
index 897b252b07d..cf78f30272d 100644
--- a/board/ti/logic/config.mk
+++ b/board/ti/logic/config.mk
@@ -30,4 +30,5 @@
# (mem base + reserved)
# For use with external or internal boots.
+
CONFIG_SYS_TEXT_BASE = 0x80400000
diff --git a/board/ti/logic/logic-product-id.c b/board/ti/logic/logic-product-id.c
index edc440945f2..dba8c197ee6 100644
--- a/board/ti/logic/logic-product-id.c
+++ b/board/ti/logic/logic-product-id.c
@@ -188,18 +188,26 @@ int logic_dump_serialization_info(void)
{
int ret;
struct id_cookie cookie;
- int part_number;
+ int part_number, speed, model_number;
u8 model_name[33];
+ u8 model_type[11];
+ u8 model_grade[11];
+ u8 hardware_platform[11];
u32 model_name_size;
+ u32 model_type_size;
+ u32 model_grade_size;
u8 serial_number[11];
u32 serial_number_size;
+ u32 model_hardware_platform_size;
if (!found_id_data) {
+ printf("No ID data found\n");
return -1;
}
ret = id_init_cookie(&id_data, &cookie);
if (ret != ID_EOK) {
+ printf("Cannot initialize the ID data\n");
printf("%s:%d ret %d\n", __FUNCTION__, __LINE__, ret);
return ret;
}
@@ -248,12 +256,92 @@ int logic_dump_serialization_info(void)
return ret;
}
+ /* Find platform */
+ model_hardware_platform_size = sizeof(hardware_platform) - 1;
+ ret = id_find_string(&cookie, ID_KEY_hardware_platform, hardware_platform, &model_hardware_platform_size);
+ if (ret != ID_EOK) {
+ printf("%s:%d ret %d\n", __FUNCTION__, __LINE__, ret);
+ return ret;
+ }
+
+ /* Reinitialise cookie back to the root */
+ ret = id_init_cookie(&id_data, &cookie);
+ if (ret != ID_EOK) {
+ printf("%s:%d ret %d\n", __FUNCTION__, __LINE__, ret);
+ return ret;
+ }
+
+ /* find /cpu0_group from root */
+ ret = id_find_dict(&cookie, ID_KEY_cpu0_group, IDENUM_DICT);
+ if (ret != ID_EOK) {
+ printf("%s:%d ret %d\n", __FUNCTION__, __LINE__, ret);
+ return ret;
+ }
+
+ /* Find type */
+ model_type_size = sizeof(model_type) - 1;
+ ret = id_find_string(&cookie, ID_KEY_type, model_type, &model_type_size);
+ if (ret != ID_EOK) {
+ printf("%s:%d ret %d\n", __FUNCTION__, __LINE__, ret);
+ return ret;
+ }
+
+ /* Find number */
+ ret = id_find_number(&cookie, ID_KEY_number, &model_number);
+ if (ret != ID_EOK) {
+ printf("%s:%d ret %d\n", __FUNCTION__, __LINE__, ret);
+ return ret;
+ }
+
+ /* Find speed_mhz */
+ ret = id_find_number(&cookie, ID_KEY_speed_mhz, &speed);
+ if (ret != ID_EOK) {
+ printf("%s:%d ret %d\n", __FUNCTION__, __LINE__, ret);
+ return ret;
+ }
+
+ /* Find grade */
+ model_grade_size = sizeof(model_grade) - 1;
+ ret = id_find_string(&cookie, ID_KEY_temp_class, model_grade, &model_grade_size);
+ if (ret != ID_EOK) {
+ printf("%s:%d ret %d\n", __FUNCTION__, __LINE__, ret);
+ return ret;
+ }
+
+ /* Reinitialise cookie back to the root */
+ ret = id_init_cookie(&id_data, &cookie);
+ if (ret != ID_EOK) {
+ printf("%s:%d ret %d\n", __FUNCTION__, __LINE__, ret);
+ return ret;
+ }
+
model_name[model_name_size] = '\0';
+ model_type[model_type_size] = '\0';
+ model_grade[model_grade_size] = '\0';
+ hardware_platform[model_hardware_platform_size] = '\0';
serial_number[serial_number_size] = '\0';
+ printf("Model : %.*s%u ", model_type_size, model_type, model_number);
+ if (!strncmp(hardware_platform, "t", 2))
+ printf("Torpedo");
+ else if (!strncmp(hardware_platform, "lv", 2))
+ printf("SOM-LV");
+ else if (!strncmp(hardware_platform, "m2", 2))
+ printf("SOM-M2");
+ printf("\n");
+ printf("Temp Grade : ");
+ if (!strncmp(model_grade, "i", 1))
+ printf("Industrial");
+ else if (!strncmp(model_grade, "c", 1))
+ printf("Commercial");
+ else if (!strncmp(model_grade, "x", 1))
+ printf("Extended");
+ printf("\n");
+ printf("Max Speed : %uMHz\n", speed);
printf("Part Number : %u\n", part_number);
printf("Model Name : %.*s\n", model_name_size, model_name);
printf("Serial Number: %.*s\n", serial_number_size, serial_number);
+
return 0;
}
diff --git a/board/ti/logic/logic.c b/board/ti/logic/logic.c
index 82ee77ce15c..911d2d8d9a4 100644
--- a/board/ti/logic/logic.c
+++ b/board/ti/logic/logic.c
@@ -43,6 +43,7 @@
#include "logic.h"
#include "product_id.h"
#include "logic-proto.h"
+#include <ecc-method_autogenerated.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -67,6 +68,7 @@ unsigned int logic_identify(void)
MUX_LOGIC_HSUSB0_D5_GPIO_MUX();
if (!omap_request_gpio(189)) {
+ twl4030_usb_ulpi_init();
omap_set_gpio_direction(189, 0);
omap_set_gpio_dataout(189, 1);
@@ -109,12 +111,22 @@ unsigned int logic_identify(void)
/*
* Set the default NAND ECC method used for the environment
*/
-static int omap3logic_nand_default = -1;
+static enum omap_nand_ecc_mode omap3logic_nand_default;
void nand_setup_default_ecc_method(void)
{
- if (omap_nand_chip_has_ecc())
+ omap3logic_nand_default = OMAP_ECC_NONE;
+
+#ifdef SYSCFG_NAND_ECC_SOFT_BCH
+ omap3logic_nand_default = OMAP_ECC_SOFT_BCH;
+#endif
+ if (omap_nand_chip_has_ecc()) {
+#ifdef SYSCFG_NAND_ECC_IN_CHIP
omap3logic_nand_default = OMAP_ECC_CHIP;
- else
+#endif
+ }
+
+ /* If no ECC then default to HW as the default */
+ if (omap3logic_nand_default == OMAP_ECC_NONE)
omap3logic_nand_default = OMAP_ECC_HW;
omap_nand_switch_ecc(omap3logic_nand_default);
@@ -240,8 +252,10 @@ void touchup_env(int initial_env)
setenv("defaultecc", "chip");
else if (omap3logic_nand_default == OMAP_ECC_HW)
setenv("defaultecc", "hw");
+ else if (omap3logic_nand_default == OMAP_ECC_SOFT_BCH)
+ setenv("defaultecc", "bch");
else
- printf("%s: bad NAND ECC default %d!\n", __FUNCTION__, omap3logic_nand_default);
+ setenv("defaultecc", "soft");
/* touchup the display environment variable(s) */
touchup_display_env();
@@ -490,10 +504,10 @@ static void setup_net_chip(void)
* not sure if optimal */
#define LOGIC_NAND_GPMC_CONFIG1 0x00001800
#define LOGIC_NAND_GPMC_CONFIG2 0x00090900
-#define LOGIC_NAND_GPMC_CONFIG3 0x00090902
-#define LOGIC_NAND_GPMC_CONFIG4 0x07020702
-#define LOGIC_NAND_GPMC_CONFIG5 0x0008080A
-#define LOGIC_NAND_GPMC_CONFIG6 0x000002CF
+#define LOGIC_NAND_GPMC_CONFIG3 0x00090900
+#define LOGIC_NAND_GPMC_CONFIG4 0x06000700
+#define LOGIC_NAND_GPMC_CONFIG5 0x00070C0C
+#define LOGIC_NAND_GPMC_CONFIG6 0x00000FCF
#define LOGIC_NAND_GPMC_CONFIG7 0x00000C70
#endif
diff --git a/common/cmd_nand.c b/common/cmd_nand.c
index 509c85e3036..164ac249bf7 100644
--- a/common/cmd_nand.c
+++ b/common/cmd_nand.c
@@ -78,12 +78,12 @@ static int switch_ecc_bypart(const char *id)
{
if(!nand->has_chip_ecc)
{
- printf("NAND Chip doesn't support in-chip ECC\n");
- return -1;
+ printf("NAND Chip doesn't support in-chip ECC; defauting to HW\n");
+ omap_nand_switch_ecc(OMAP_ECC_HW);
+ } else {
+ if(nand->ecc.mode != NAND_ECC_CHIP)
+ omap_nand_switch_ecc(OMAP_ECC_CHIP);
}
- if(nand->ecc.mode != NAND_ECC_CHIP)
- omap_nand_switch_ecc(OMAP_ECC_CHIP);
- printf("Here\n");
} else if(flags & (1 << MTDFLAGS_ECC_BCH))
{
if(nand->ecc.mode != NAND_ECC_SOFT_BCH)
diff --git a/common/env_common.c b/common/env_common.c
index af7a9cb57cc..27dcf0df46e 100644
--- a/common/env_common.c
+++ b/common/env_common.c
@@ -217,7 +217,7 @@ int env_import(const char *buf, int check)
if (check) {
if (!env_check_valid(buf)) {
- set_default_env("!bad CRC");
+ set_default_env("!bad CRC or ECC error");
return 0;
}
}
@@ -249,7 +249,7 @@ void env_relocate (void)
set_default_env(NULL);
#else
show_boot_progress (-60);
- set_default_env("!bad CRC");
+ set_default_env("!bad CRC or ECC error");
#endif
} else {
env_relocate_spec ();
diff --git a/common/lcd.c b/common/lcd.c
index 3b89d4e0ef9..143aae4bd60 100644
--- a/common/lcd.c
+++ b/common/lcd.c
@@ -887,6 +887,9 @@ void bitmap_plot (int x, int y)
int lcd_display_bitmap(ulong bmp_image, int x, int y)
{
+#if defined(CONFIG_OMAP)
+ static ushort cmap_actual[256];
+#endif
#if !defined(CONFIG_MCC200)
ushort *cmap = NULL;
#endif
@@ -949,6 +952,8 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y)
cmap = (ushort *)fbi->palette;
#elif defined(CONFIG_MPC823)
cmap = (ushort *)&(cp->lcd_cmap[255*sizeof(ushort)]);
+#elif defined(CONFIG_OMAP)
+ cmap = cmap_actual;
#elif !defined(CONFIG_ATMEL_LCD)
cmap = panel_info.cmap;
#endif
diff --git a/drivers/mtd/nand/nand_bch.c b/drivers/mtd/nand/nand_bch.c
index 632dc7ae7c1..7557cb5d17e 100644
--- a/drivers/mtd/nand/nand_bch.c
+++ b/drivers/mtd/nand/nand_bch.c
@@ -141,7 +141,7 @@ int nand_bch_correct_data(struct mtd_info *mtd, unsigned char *buf,
__func__, errloc[i]);
}
} else if (count < 0) {
- printk(KERN_ERR "ecc unrecoverable error\n");
+ MTDDEBUG(MTD_DEBUG_LEVEL0, "ecc unrecoverable error\n");
count = -1;
}
return count;
diff --git a/drivers/mtd/nand/omap_gpmc.c b/drivers/mtd/nand/omap_gpmc.c
index 865065e03b3..6bb37a5660a 100644
--- a/drivers/mtd/nand/omap_gpmc.c
+++ b/drivers/mtd/nand/omap_gpmc.c
@@ -202,7 +202,7 @@ static int omap_correct_data(struct mtd_info *mtd, uint8_t *dat,
*/
if ((orig_ecc == 0x0FFF0FFF) && (new_ecc == 0x00000000))
return 0;
- printf("Error: Bad compare! failed\n");
+ MTDDEBUG(MTD_DEBUG_LEVEL0, "Error: Bad compare! failed\n");
/* detected 2 bit error */
return -1;
}
diff --git a/include/configs/omap3logic.h b/include/configs/omap3logic.h
index 6c91462576a..882349f65ed 100644
--- a/include/configs/omap3logic.h
+++ b/include/configs/omap3logic.h
@@ -33,6 +33,8 @@
#ifndef __CONFIG_H
#define __CONFIG_H
+#include <ecc-method_autogenerated.h>
+
/*
* High Level Configuration Options
*/
@@ -211,7 +213,12 @@
#define MTDPARTS_NAND_DEFAULT "mtdparts=omap2-nand.0:512k(x-loader),"\
"1664k(u-boot),384k(u-boot-env),"\
"5m(kernel),20m(ramdisk),-(fs)"
+#if defined(SYSCFG_NAND_ECC_SOFT_BCH)
+#define MTDFLAGS_NAND_DEFAULT "default=ecc_bch;x-loader=ecc_hw,repeat;fs=yaffs"
+#endif
+#if defined(SYSCFG_NAND_ECC_IN_CHIP)
#define MTDFLAGS_NAND_DEFAULT "default=ecc_chip;x-loader=ecc_hw,repeat;fs=yaffs"
+#endif
#define MTDPARTS_NOR_DEFAULT "physmap-flash.0:-(nor)"
@@ -350,7 +357,7 @@
/* ram, tftp, /dev, nfs, mmc, nand, nand-part. */
/* */
/* - $rootfs_type */
-/* Must always be set. Values can be ramdisk, jffs, yaffs, ext3, or nfs. */
+/* Must always be set. Values can be ramdisk, initramfs, jffs, yaffs, ext3, or nfs. */
/* */
/* - $loadaddr */
/* Must always be set. */
@@ -364,6 +371,8 @@
/* must be set. */
/* - If booting from a ramdisk image, then $ramdisksize, and $ramdiskaddr */
/* must be set. */
+/* - If booting from a initramfs image, then $ramdiskaddr */
+/* must be set. */
/* - If booting from an nfs location, then $serverip, $nfsrootpath, and */
/* $nfsoptions must be set. */
/* - If booting from nand, $ramdisk_partition, */
@@ -418,6 +427,7 @@
"ubootimage=u-boot.bin.ift\0" \
"kernelimage=uImage\0" \
"ramdiskimage=rootfs.ext2.gz.uboot\0" \
+ "initramfsimage=initramfs.cpio.gz.uboot\0" \
"yaffsimage=rootfs.yaffs2\0" \
"xloader_partition=x-loader\0" \
"uboot_partition=u-boot\0" \
@@ -444,6 +454,18 @@
" run _defaultboot;\n" \
" fi; \n" \
" else run _defaultboot; fi\0" \
+ "get_dhcp_address=if true;then;\n" \
+ " old_autoload=$autoload;\n" \
+ " old_serverip=$serverip;\n" \
+ " setenv autoload no;\n" \
+ " echo \"Getting DHCP address\";\n" \
+ " dhcp;\n" \
+ " if test -n \\\"$old_serverip\\\"; then;\n" \
+ " setenv serverip $old_serverip;\n" \
+ " fi;\n" \
+ " setenv autoload $old_autoload;\n" \
+ " setenv old_autoload \"\";\n" \
+ " setenv old_serverip \"\"; fi\0" \
"_loadbootscript=fatload mmc 1 $mmc_bootscript_addr " CONFIG_MMC_BOOTSCRIPT_NAME "\0" \
"bootscript=source ${mmc_bootscript_addr}\0" \
"_vrfb_arg=if itest ${rotation} -ne 0; then \n" \
@@ -492,14 +514,22 @@
" fi\n\0" \
\
/* load_rootfs_* targets */ \
+ "_get_fsimage_name=if true;then;\n" \
+ " if test $rootfs_type = ramdisk; then;\n" \
+ " setenv fs_image $ramdiskimage;\n" \
+ " else\n" \
+ " setenv fs_image $initramfsimage;\n" \
+ " fi;\n" \
+ " fi;\n\0" \
"_load_rootfs_ram=if true;then;\n" \
" echo \"== rootfs located at $ramdiskaddr ==\"; \n" \
" echo \"\"; \n" \
" setenv bootm_arg2 ${ramdiskaddr}; \n" \
" fi\0" \
"_load_rootfs_tftp=if true;then;\n" \
- " echo \"== Loading rootfs file $tftpdir$ramdiskimage to $ramdiskaddr ==\"; \n" \
- " tftpboot $ramdiskaddr $tftpdir$ramdiskimage;\n" \
+ " run _get_fsimage_name;\n" \
+ " echo \"== Loading rootfs file ${tftpdir}${fs_image} to $ramdiskaddr ==\"; \n" \
+ " tftpboot $ramdiskaddr ${tftpdir}${fs_image};\n" \
" echo \"\"; \n" \
" setenv bootm_arg2 ${ramdiskaddr}; \n" \
" fi\0" \
@@ -514,8 +544,9 @@
" setenv bootargs ${bootargs} root=/dev/nfs; \n" \
" fi\0" \
"_load_rootfs_mmc=if true;then;\n" \
- " echo \"== Loading rootfs file $ramdiskimage to $ramdiskaddr ==\"; \n" \
- " fatload mmc 1 ${ramdiskaddr} ${ramdiskimage}; \n"\
+ " run _get_fsimage_name;\n" \
+ " echo \"== Loading rootfs file ${fs_image} to $ramdiskaddr ==\"; \n" \
+ " fatload mmc 1 ${ramdiskaddr} ${fs_image}; \n"\
" setenv bootm_arg2 ${ramdiskaddr}; \n" \
" fi\0" \
"_load_rootfs_nand=if true;then;\n" \
@@ -534,6 +565,7 @@
" fi\n\0" \
\
/* set_rootfs_type_* targets */ \
+ "_set_rootfs_type_initramfs=setenv bootargs ${bootargs} rw\0" \
"_set_rootfs_type_ramdisk=setenv bootargs ${bootargs} root=/dev/ram rw ramdisk_size=${ramdisksize}\0" \
"_set_rootfs_type_jffs=setenv bootargs ${bootargs} rw rootfstype=jffs2\0" \
"_set_rootfs_type_yaffs=setenv bootargs ${bootargs} rw rootfstype=yaffs2\0" \
@@ -558,7 +590,8 @@
" fi\0" \
"defaultboot=run _defaultboot\0_defaultboot=if true;then\n" \
" run _dump_boot_sources;\n" \
- " run setconsole; setenv bootargs console=${console};\n" \
+ " run setconsole;\n" \
+ " setenv bootargs nand-ecc=$defaultecc console=${console};\n" \
" run _common_bootargs;\n" \
" run _load_kernel;\n" \
" run _load_rootfs;\n" \