summaryrefslogtreecommitdiff
path: root/board/keymile/km8xx
diff options
context:
space:
mode:
authorHeiko Schocher <hs@denx.de>2009-07-09 12:04:18 +0200
committerWolfgang Denk <wd@denx.de>2009-07-21 00:06:11 +0200
commitdc71b248ef0d5e12b19f33c6efb873e31df91fa9 (patch)
tree113d6e10d2cba07a38f420b5b7bb82a2cdef0ccb /board/keymile/km8xx
parentf14d81050a9e0fa57aedb1bc746c60a07c1ad67f (diff)
downloadu-boot-imx-dc71b248ef0d5e12b19f33c6efb873e31df91fa9.zip
u-boot-imx-dc71b248ef0d5e12b19f33c6efb873e31df91fa9.tar.gz
u-boot-imx-dc71b248ef0d5e12b19f33c6efb873e31df91fa9.tar.bz2
powerpc: updates for the keymile boards
- CONFIG_SYS_MAX_I2C_BUS changed to 1 We use only one I2C hardwarecontroller on this boards, so change the CONFIG_SYS_MAX_I2C_BUS to 1. - common: dont print errormsg if second IVM Block lacks. - 82xx, mgcoge: fix double mtdpart entry in environment - 82xx, mgcoge: activate on second Flash the second bank. - common: CONFIG_ENV_SIZE 0x4000 for all keymile boards - common: Change malloc size to 1MByte for all Keymile boards We need a bigger malloc area for the environment support (128k) on some Keymile boards (kmeter1) and the upcoming UBI support. Change it to 1MB for all Keymile boards to be on the save side. Also define CONFIG_SYS_64BIT_VSPRINTF which is needed for UBI/UBIFS support. - Add UBI support to all Keymile boards - change manner of writing "/localbus/ranges" node instead of writting the complete "/localbus/ranges" node before booting Linux, only update the ranges entries which gets dynamical detected (size of flashes). This is needed, because keymile adds in the DTS "/localbus/ranges" node entries, which u-boot must not overwrite/delete. - kmeter, mgcoge: define 2 seperate regions needed for the Intel P30 chips The Intel P30 chip has 2 non-identical chips on one die, so we need to define 2 seperate regions that are scanned by physmap_of independantly. - kmeter1: Add MTD concat support to Keymile boards - 82xx, mgcoge: add "unlock=yes" to default environment - added CONFIG_MTD_DEVICE to get in sync with mainline code Signed-off-by: Heiko Schocher <hs@denx.de> Signed-off-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'board/keymile/km8xx')
-rw-r--r--board/keymile/km8xx/km8xx.c42
1 files changed, 28 insertions, 14 deletions
diff --git a/board/keymile/km8xx/km8xx.c b/board/keymile/km8xx/km8xx.c
index 7c58179..ec883a4 100644
--- a/board/keymile/km8xx/km8xx.c
+++ b/board/keymile/km8xx/km8xx.c
@@ -159,12 +159,6 @@ int hush_init_var (void)
}
#if defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT)
-extern int fdt_set_node_and_value (void *blob,
- char *nodename,
- char *regname,
- void *var,
- int size);
-
/*
* update "memory" property in the blob
*/
@@ -172,33 +166,53 @@ void ft_blob_update (void *blob, bd_t *bd)
{
ulong brg_data[1] = {0};
ulong memory_data[2] = {0};
- ulong flash_data[4] = {0};
+ ulong *flash_data = NULL;
ulong flash_reg[3] = {0};
- uchar enetaddr[6];
+ flash_info_t *info;
+ int len;
+ int i = 0;
memory_data[0] = cpu_to_be32 (bd->bi_memstart);
memory_data[1] = cpu_to_be32 (bd->bi_memsize);
fdt_set_node_and_value (blob, "/memory", "reg", memory_data,
sizeof (memory_data));
- flash_data[2] = cpu_to_be32 (bd->bi_flashstart);
- flash_data[3] = cpu_to_be32 (bd->bi_flashsize);
+ len = fdt_get_node_and_value (blob, "/localbus", "ranges",
+ (void *)&flash_data);
+
+ if (flash_data == NULL) {
+ printf ("%s: error /localbus/ranges entry\n", __FUNCTION__);
+ return;
+ }
+
+ /* update Flash addr, size */
+ while ( i < (len / 4)) {
+ switch (flash_data[i]) {
+ case 0:
+ info = flash_get_info(CONFIG_SYS_FLASH_BASE);
+ flash_data[i + 1] = 0;
+ flash_data[i + 2] = cpu_to_be32 (CONFIG_SYS_FLASH_BASE);
+ flash_data[i + 3] = cpu_to_be32 (info->size);
+ break;
+ default:
+ break;
+ }
+ i += 4;
+ }
fdt_set_node_and_value (blob, "/localbus", "ranges", flash_data,
- sizeof (flash_data));
+ len);
flash_reg[2] = cpu_to_be32 (bd->bi_flashsize);
fdt_set_node_and_value (blob, "/localbus/flash@0,0", "reg", flash_reg,
sizeof (flash_reg));
-
/* BRG */
brg_data[0] = cpu_to_be32 (bd->bi_busfreq);
fdt_set_node_and_value (blob, "/soc/cpm", "brg-frequency", brg_data,
sizeof (brg_data));
/* MAC adr */
- eth_getenv_enetaddr("ethaddr", enetaddr);
fdt_set_node_and_value (blob, "/soc/cpm/ethernet", "mac-address",
- enetaddr, sizeof (u8) * 6);
+ bd->bi_enetaddr, sizeof (u8) * 6);
}
void ft_board_setup(void *blob, bd_t *bd)