diff options
| author | Andreas Huber <andreas.huber@keymile.com> | 2012-05-04 10:30:16 +0200 | 
|---|---|---|
| committer | Kim Phillips <kim.phillips@freescale.com> | 2012-06-15 17:07:11 -0500 | 
| commit | cf73639d32ebe9f53a4244f81cfd66c39f0e66eb (patch) | |
| tree | b321e083a8a54cb475cdc04d2740a076381afc91 /include/configs/km/km83xx-common.h | |
| parent | 7ba1c870dae8a052b4978914fb72191788fa2ce8 (diff) | |
| download | olio-uboot-2014.01-cf73639d32ebe9f53a4244f81cfd66c39f0e66eb.tar.xz olio-uboot-2014.01-cf73639d32ebe9f53a4244f81cfd66c39f0e66eb.zip | |
km/common: add support for second flash
Add support for a second flash.
By default, a single flash chip is set up:
- called 'boot'
- mtd name for ubi 'ubi0'
MTDIDS and MTDPARTS may be overwritten to add a second flash.
The 'ubiattach' command is featured in two versions:
- if CONFIG_KM_UBI_PARTITION_NAME_APP is not defined:
  this is the version as up to now
- if CONFIG_KM_UBI_PARTITION_NAME_APP is defined:
  a check on 'actual_bank' will be done to determine the flash to boot
  from.
Use CONFIG_KM_UBI_PARTITION_NAME_BOOT and
CONFIG_KM_UBI_PARTITION_NAME_APP to define where to put the bootloader
and the applications.
Example:
In the board config do:
... snip ...
       "boot:"                                                 \
               "768k(u-boot),"                                 \
               "128k(env),"                                    \
               "128k(envred),"                                 \
               "-(" CONFIG_KM_UBI_PARTITION_NAME_BOOT ");"     \
       "app:"                                                  \
               "-(" CONFIG_KM_UBI_PARTITION_NAME_APP ");"
... snap ...
You may also need to enable the second flash:
... snip ...
/* additional featured for COGE5 */
... snap ...
Signed-off-by: Andreas Huber <andreas.huber@keymile.com>
cc: Kim Phillips <kim.phillips@freescale.com>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Gerlando Falauto <gerlando.falauto@keymile.com>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Diffstat (limited to 'include/configs/km/km83xx-common.h')
| -rw-r--r-- | include/configs/km/km83xx-common.h | 11 | 
1 files changed, 8 insertions, 3 deletions
| diff --git a/include/configs/km/km83xx-common.h b/include/configs/km/km83xx-common.h index 06ecb8a3e..2c266fae1 100644 --- a/include/configs/km/km83xx-common.h +++ b/include/configs/km/km83xx-common.h @@ -15,13 +15,18 @@  #include "keymile-common.h"  #include "km-powerpc.h" -#define MTDIDS_DEFAULT		"nor0=boot" -#define MTDPARTS_DEFAULT	"mtdparts="			\ +#ifndef MTDIDS_DEFAULT +# define MTDIDS_DEFAULT	"nor0=boot" +#endif /* MTDIDS_DEFAULT */ + +#ifndef MTDPARTS_DEFAULT +# define MTDPARTS_DEFAULT	"mtdparts="			\  	"boot:"							\  		"768k(u-boot),"					\  		"128k(env),"					\  		"128k(envred),"					\ -		"-(" CONFIG_KM_UBI_PARTITION_NAME ")" +		"-(" CONFIG_KM_UBI_PARTITION_NAME_BOOT ");" +#endif /* MTDPARTS_DEFAULT */  #define CONFIG_MISC_INIT_R  /* |