summaryrefslogtreecommitdiff
path: root/board/mgcoge
diff options
context:
space:
mode:
authorHeiko Schocher <hs@denx.de>2008-03-07 08:13:41 +0100
committerWolfgang Denk <wd@denx.de>2008-03-08 10:48:59 +0100
commite492c90c26215e459aec0fdf0f8ef1fd204988f5 (patch)
tree4bcc34ed5bee85053689c11e888904a99fdfa937 /board/mgcoge
parentbd4458cb47abecabd406b1210457be96c69fc49d (diff)
downloadu-boot-imx-e492c90c26215e459aec0fdf0f8ef1fd204988f5.zip
u-boot-imx-e492c90c26215e459aec0fdf0f8ef1fd204988f5.tar.gz
u-boot-imx-e492c90c26215e459aec0fdf0f8ef1fd204988f5.tar.bz2
mgcoge: update board configuration
add support for the config Flash. initialize the UPIOx controller. Signed-off-by: Heiko Schocher <hs@denx.de>
Diffstat (limited to 'board/mgcoge')
-rw-r--r--board/mgcoge/mgcoge.c25
1 files changed, 20 insertions, 5 deletions
diff --git a/board/mgcoge/mgcoge.c b/board/mgcoge/mgcoge.c
index 0207a3a..e7c3fa0 100644
--- a/board/mgcoge/mgcoge.c
+++ b/board/mgcoge/mgcoge.c
@@ -278,6 +278,17 @@ int checkboard(void)
return 0;
}
+/*
+ * Early board initalization.
+ */
+int board_early_init_r(void)
+{
+ /* setup the UPIOx */
+ *(char *)(CFG_PIGGY_BASE + 0x02) = 0xc0;
+ *(char *)(CFG_PIGGY_BASE + 0x03) = 0x15;
+ return 0;
+}
+
#if defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT)
/*
* update "memory" property in the blob
@@ -286,7 +297,7 @@ void ft_blob_update(void *blob, bd_t *bd)
{
int ret, nodeoffset = 0;
ulong memory_data[2] = {0};
- ulong flash_data[4] = {0};
+ ulong flash_data[8] = {0};
memory_data[0] = cpu_to_be32(bd->bi_memstart);
memory_data[1] = cpu_to_be32(bd->bi_memsize);
@@ -304,9 +315,13 @@ void ft_blob_update(void *blob, bd_t *bd)
printf("ft_blob_update(): cannot find /memory node "
"err:%s\n", fdt_strerror(nodeoffset));
}
- /* update Flash size */
- flash_data[2] = cpu_to_be32(bd->bi_flashstart);
- flash_data[3] = cpu_to_be32(bd->bi_flashsize);
+ /* update Flash addr, size */
+ flash_data[2] = cpu_to_be32(CFG_FLASH_BASE);
+ flash_data[3] = cpu_to_be32(CFG_FLASH_SIZE);
+ flash_data[4] = cpu_to_be32(1);
+ flash_data[5] = cpu_to_be32(0);
+ flash_data[6] = cpu_to_be32(CFG_FLASH_BASE_1);
+ flash_data[7] = cpu_to_be32(CFG_FLASH_SIZE_1);
nodeoffset = fdt_path_offset (blob, "/localbus");
if (nodeoffset >= 0) {
ret = fdt_setprop(blob, nodeoffset, "ranges", flash_data,
@@ -331,7 +346,7 @@ void ft_blob_update(void *blob, bd_t *bd)
}
else {
/* memory node is required in dts */
- printf("ft_blob_update(): cannot find /localbus node "
+ printf("ft_blob_update(): cannot find /soc/cpm/ethernet node "
"err:%s\n", fdt_strerror(nodeoffset));
}