diff options
author | Vipin KUMAR <vipin.kumar@st.com> | 2012-05-07 13:06:48 +0530 |
---|---|---|
committer | Albert ARIBAUD <albert.u.boot@aribaud.net> | 2012-07-07 14:07:41 +0200 |
commit | 1b7935cd96f2295d5cdf144fa46696fb60a820ef (patch) | |
tree | 279b0bcdb938a5b053f45d8b37c7cc8de6acfad9 /include/configs | |
parent | 08166e19217cdcfd268760ecb7e94a3b1bdc4783 (diff) | |
download | u-boot-imx-1b7935cd96f2295d5cdf144fa46696fb60a820ef.zip u-boot-imx-1b7935cd96f2295d5cdf144fa46696fb60a820ef.tar.gz u-boot-imx-1b7935cd96f2295d5cdf144fa46696fb60a820ef.tar.bz2 |
SPEAr: Change the default environment variables
This patch modifies the default environment variables as:
1. Default bootargs:
- console=ttyAMA0,115200
- For environment present in NOR flash
root=/dev/mtdblock3
- For environment present in NAND flash
root=/dev/mtdblock7
- Removes "mem=" option
2. Introduces CONFIG_EXTRA_ENV_USBTTY as default usbtty env var even when usbtty
is not selected
3. Add default definitions for nfsboot and ramboot
4. Add a new default environment variable(CONFIG_EXTRA_ENV_UNLOCK) for SPEAr310
and SPEAr320
Signifacance of CONFIG_EXTRA_ENV_USBTTY:
This environment variable is important for flashing utility to work. So if
somebody accidently erases the env sector then also this variable must be
preserved so that flashing utility functions properly.
Signifacance of CONFIG_EXTRA_ENV_UNLOCK:
This env variable is read by the cfi driver to unlock all flash sectors. This
is necessary because the Parallel NOR flash connected on the spear310 and
spear320 boards, M28W64, has all its sectors in locked state at reset and these
have to be unlocked explicitly before being erased or written.
Signed-off-by: Vipin Kumar <vipin.kumar@st.com>
Signed-off-by: Shiraz Hashim <shiraz.hashim@st.com>
Signed-off-by: Amit Virdi <amit.virdi@st.com>
Acked-by: Stefan Roese <sr@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'include/configs')
-rw-r--r-- | include/configs/spear-common.h | 28 | ||||
-rw-r--r-- | include/configs/spear3xx_evb.h | 10 | ||||
-rw-r--r-- | include/configs/spear6xx_evb.h | 3 |
3 files changed, 32 insertions, 9 deletions
diff --git a/include/configs/spear-common.h b/include/configs/spear-common.h index dabd059..cf09090 100644 --- a/include/configs/spear-common.h +++ b/include/configs/spear-common.h @@ -46,9 +46,7 @@ #define CONFIG_USBD_PRODUCT_NAME "SPEAr SoC" #define CONFIG_USBD_MANUFACTURER "ST Microelectronics" -#if defined(CONFIG_USB_TTY) #define CONFIG_EXTRA_ENV_USBTTY "usbtty=cdc_acm\0" -#endif /* I2C driver configuration */ #define CONFIG_HARD_I2C @@ -143,7 +141,7 @@ */ #define CONFIG_SYS_MONITOR_LEN 0x00040000 #define CONFIG_ENV_SECT_SIZE 0x00010000 -#define CONFIG_FSMTDBLK "/dev/mtdblock8 " +#define CONFIG_FSMTDBLK "/dev/mtdblock3 " #define CONFIG_BOOTCOMMAND "bootm 0xf8050000" @@ -169,19 +167,33 @@ #define CONFIG_ENV_OFFSET 0x60000 #define CONFIG_ENV_RANGE 0x10000 -#define CONFIG_FSMTDBLK "/dev/mtdblock12 " +#define CONFIG_FSMTDBLK "/dev/mtdblock7 " #define CONFIG_BOOTCOMMAND "nand read.jffs2 0x1600000 " \ "0x80000 0x4C0000; " \ "bootm 0x1600000" #endif -#define CONFIG_BOOTARGS_NFS "root=/dev/nfs ip=dhcp " \ - "console=ttyS0 init=/bin/sh" -#define CONFIG_BOOTARGS "console=ttyS0 mem=128M " \ +#define CONFIG_BOOTARGS "console=ttyAMA0,115200 " \ + "mem=128M " \ "root="CONFIG_FSMTDBLK \ "rootfstype=jffs2" +#define CONFIG_NFSBOOTCOMMAND \ + "bootp; " \ + "setenv bootargs root=/dev/nfs rw " \ + "nfsroot=$(serverip):$(rootpath) " \ + "ip=$(ipaddr):$(serverip):$(gatewayip):" \ + "$(netmask):$(hostname):$(netdev):off " \ + "console=ttyAMA0,115200 $(othbootargs);" \ + "bootm; " + +#define CONFIG_RAMBOOTCOMMAND \ + "setenv bootargs root=/dev/ram rw " \ + "console=ttyAMA0,115200 $(othbootargs);" \ + CONFIG_BOOTCOMMAND + + #define CONFIG_ENV_SIZE 0x02000 /* Miscellaneous configurable options */ @@ -212,8 +224,6 @@ #define CONFIG_SYS_LOAD_ADDR 0x00800000 #define CONFIG_SYS_CONSOLE_INFO_QUIET 1 -#define CONFIG_EXTRA_ENV_SETTINGS CONFIG_EXTRA_ENV_USBTTY - /* Stack sizes */ #define CONFIG_STACKSIZE (128*1024) diff --git a/include/configs/spear3xx_evb.h b/include/configs/spear3xx_evb.h index d6fdc09..d603785 100644 --- a/include/configs/spear3xx_evb.h +++ b/include/configs/spear3xx_evb.h @@ -158,4 +158,14 @@ #endif +/* Environment Settings */ +#if defined(CONFIG_SPEAR300) +#define CONFIG_EXTRA_ENV_SETTINGS CONFIG_EXTRA_ENV_USBTTY + +#elif defined(CONFIG_SPEAR310) || defined(CONFIG_SPEAR320) +#define CONFIG_EXTRA_ENV_UNLOCK "unlock=yes\0" +#define CONFIG_EXTRA_ENV_SETTINGS CONFIG_EXTRA_ENV_USBTTY \ + CONFIG_EXTRA_ENV_UNLOCK +#endif + #endif /* __CONFIG_H */ diff --git a/include/configs/spear6xx_evb.h b/include/configs/spear6xx_evb.h index 18bd140..3e0f50b 100644 --- a/include/configs/spear6xx_evb.h +++ b/include/configs/spear6xx_evb.h @@ -53,4 +53,7 @@ #define CONFIG_SYS_FSMC_NAND_8BIT #define CONFIG_SYS_NAND_BASE (0xD2000000) +/* Environment Settings */ +#define CONFIG_EXTRA_ENV_SETTINGS CONFIG_EXTRA_ENV_USBTTY + #endif /* __CONFIG_H */ |