diff options
Diffstat (limited to 'board')
-rw-r--r-- | board/amcc/taihu/taihu.c | 2 | ||||
-rw-r--r-- | board/mgcoge/mgcoge.c | 25 | ||||
-rw-r--r-- | board/mgsuvd/mgsuvd.c | 23 |
3 files changed, 38 insertions, 12 deletions
diff --git a/board/amcc/taihu/taihu.c b/board/amcc/taihu/taihu.c index ea83671988..eedde597b8 100644 --- a/board/amcc/taihu/taihu.c +++ b/board/amcc/taihu/taihu.c @@ -162,7 +162,7 @@ void spi_sda(int bit) unsigned char spi_read(void) { - return (unsigned char)gpio_read_out_bit(SPI_DIN_GPIO15); + return (unsigned char)gpio_read_in_bit(SPI_DIN_GPIO15); } void taihu_spi_chipsel(int cs) diff --git a/board/mgcoge/mgcoge.c b/board/mgcoge/mgcoge.c index 0207a3aebd..e7c3fa00c7 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)); } diff --git a/board/mgsuvd/mgsuvd.c b/board/mgsuvd/mgsuvd.c index 9fd164b96e..e0123bfa50 100644 --- a/board/mgsuvd/mgsuvd.c +++ b/board/mgsuvd/mgsuvd.c @@ -134,6 +134,17 @@ long int initdram (int board_type) return (size); } +/* + * Early board initalization. + */ +int board_early_init_r(void) +{ + /* setup the UPIOx */ + *(char *)(CFG_PIGGY_BASE + 0x02) = 0xc0; + *(char *)(CFG_PIGGY_BASE + 0x03) = 0x35; + return 0; +} + #if defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT) /* * update "memory" property in the blob @@ -179,31 +190,31 @@ void ft_blob_update(void *blob, bd_t *bd) } /* BRG */ brg_data[0] = cpu_to_be32(bd->bi_busfreq); - nodeoffset = fdt_path_offset (blob, "/soc866/cpm"); + nodeoffset = fdt_path_offset (blob, "/soc/cpm"); if (nodeoffset >= 0) { ret = fdt_setprop(blob, nodeoffset, "brg-frequency", brg_data, sizeof(brg_data)); if (ret < 0) - printf("ft_blob_update): cannot set /soc866/cpm/brg-frequency " + printf("ft_blob_update): cannot set /soc/cpm/brg-frequency " "property err:%s\n", fdt_strerror(ret)); } else { /* memory node is required in dts */ - printf("ft_blob_update(): cannot find /localbus node " + printf("ft_blob_update(): cannot find /soc/cpm node " "err:%s\n", fdt_strerror(nodeoffset)); } /* MAC Adresse */ - nodeoffset = fdt_path_offset (blob, "/soc866/cpm/ethernet"); + nodeoffset = fdt_path_offset (blob, "/soc/cpm/ethernet"); if (nodeoffset >= 0) { ret = fdt_setprop(blob, nodeoffset, "mac-address", bd->bi_enetaddr, sizeof(uchar) * 6); if (ret < 0) - printf("ft_blob_update): cannot set /soc866/cpm/scc/mac-address " + printf("ft_blob_update): cannot set /soc/cpm/scc/mac-address " "property err:%s\n", fdt_strerror(ret)); } 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)); } } |