summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMichal Simek <monstr@monstr.eu>2007-04-24 23:01:02 +0200
committerMichal Simek <monstr@monstr.eu>2007-04-24 23:01:02 +0200
commit144876a380f5756f57412caf74c1d6dc201dd796 (patch)
tree093dbd7682b0c8ecad11af1f8e941fba808fd9e1 /include
parent32556443840f127170e4baa8bdd5b567039f6c36 (diff)
downloadu-boot-imx-144876a380f5756f57412caf74c1d6dc201dd796.zip
u-boot-imx-144876a380f5756f57412caf74c1d6dc201dd796.tar.gz
u-boot-imx-144876a380f5756f57412caf74c1d6dc201dd796.tar.bz2
[PATCH] MTD partition support, JFFS2 support
Diffstat (limited to 'include')
-rw-r--r--include/configs/ml401.h29
-rw-r--r--include/linux/stat.h3
2 files changed, 29 insertions, 3 deletions
diff --git a/include/configs/ml401.h b/include/configs/ml401.h
index 15c2fe7..acaa1e4 100644
--- a/include/configs/ml401.h
+++ b/include/configs/ml401.h
@@ -40,7 +40,7 @@
/* ethernet */
#define CONFIG_EMACLITE 1
-#define XPAR_EMAC_0_DEVICE_ID XPAR_XEMAC_NUM_INSTANCES
+#define XPAR_EMAC_0_DEVICE_ID XPAR_OPB_ETHERNET_0_DEVICE_ID
/* gpio */
#define CFG_GPIO_0 1
@@ -118,6 +118,7 @@
#define CFG_FLASH_EMPTY_INFO 1 /* ?empty sector */
#define CFG_MAX_FLASH_BANKS 1 /* max number of memory banks */
#define CFG_MAX_FLASH_SECT 128 /* max number of sectors on one chip */
+ #define CFG_FLASH_PROTECTION /* hardware flash protection */
#ifdef RAMENV
#define CFG_ENV_IS_NOWHERE 1
@@ -136,6 +137,7 @@
#define CFG_ENV_IS_NOWHERE 1
#define CFG_ENV_SIZE 0x1000
#define CFG_ENV_ADDR (CFG_MONITOR_BASE - CFG_ENV_SIZE)
+ #define CFG_FLASH_PROTECTION /* hardware flash protection */
#endif /* !FLASH */
#ifdef FLASH
@@ -155,6 +157,8 @@
CFG_CMD_CACHE |\
CFG_CMD_FAT |\
CFG_CMD_EXT2 |\
+ CFG_CMD_JFFS2 |\
+ CFG_CMD_ECHO |\
CFG_CMD_IMLS |\
CFG_CMD_FLASH |\
CFG_CMD_PING \
@@ -179,6 +183,8 @@
CFG_CMD_ENV |\
CFG_CMD_FAT |\
CFG_CMD_EXT2 |\
+ CFG_CMD_JFFS2 |\
+ CFG_CMD_ECHO |\
CFG_CMD_SAVES \
)
@@ -206,6 +212,17 @@
/* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */
#include <cmd_confdefs.h>
+#if (CONFIG_COMMANDS & CFG_CMD_JFFS2)
+/* JFFS2 partitions */
+#define CONFIG_JFFS2_CMDLINE /* mtdparts command line support */
+#define MTDIDS_DEFAULT "nor0=ml401-0"
+
+/* default mtd partition table */
+#define MTDPARTS_DEFAULT "mtdparts=ml401-0:256k(u-boot),"\
+ "256k(env),3m(kernel),1m(romfs),"\
+ "1m(cramfs),-(jffs2)"
+#endif
+
/* Miscellaneous configurable options */
#define CFG_PROMPT "U-Boot-mONStR> "
#define CFG_CBSIZE 512 /* size of console buffer */
@@ -214,7 +231,7 @@
#define CFG_LONGHELP
#define CFG_LOAD_ADDR 0x12000000 /* default load address */
-#define CONFIG_BOOTDELAY 30
+#define CONFIG_BOOTDELAY 30
#define CONFIG_BOOTARGS "root=romfs"
#define CONFIG_HOSTNAME "ml401"
#define CONFIG_BOOTCOMMAND "base 0;tftp 11000000 image.img;bootm"
@@ -235,4 +252,12 @@
#define CFG_SYSTEMACE_WIDTH XILINX_SYSACE_MEM_WIDTH
#define CONFIG_DOS_PARTITION
+#define CONFIG_PREBOOT "echo U-BOOT for ML401;setenv preboot;echo"
+
+#define CONFIG_EXTRA_ENV_SETTINGS "unlock=yes\0" /* hardware flash protection */\
+ "nor0=ml401-0\0"\
+ "mtdparts=mtdparts=ml401-0:"\
+ "256k(u-boot),256k(env),3m(kernel),"\
+ "1m(romfs),1m(cramfs),-(jffs2)\0"
+
#endif /* __CONFIG_H */
diff --git a/include/linux/stat.h b/include/linux/stat.h
index f9422cb..39386f1 100644
--- a/include/linux/stat.h
+++ b/include/linux/stat.h
@@ -67,7 +67,8 @@ struct stat {
#endif /* __PPC__ */
-#if defined (__ARM__) || defined (__I386__) || defined (__M68K__) || defined (__blackfin__)
+#if defined (__ARM__) || defined (__I386__) || defined (__M68K__) || defined (__blackfin__) ||\
+ defined (__microblaze__)
struct stat {
unsigned short st_dev;