aboutsummaryrefslogtreecommitdiff
path: root/board/ifm
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-03-31 08:40:25 -0600
committerTom Rini <trini@konsulko.com>2017-04-05 13:59:20 -0400
commit088454cde245b4d431ce0181be8b3cbceea059d6 (patch)
treeec86ebe66961c9b06ab4b39ec83fd81d4a86e9be /board/ifm
parent52c411805c090999f015df8bdf8016fb684746d0 (diff)
downloadu-boot-088454cde245b4d431ce0181be8b3cbceea059d6.zip
u-boot-088454cde245b4d431ce0181be8b3cbceea059d6.tar.gz
u-boot-088454cde245b4d431ce0181be8b3cbceea059d6.tar.bz2
board_f: Drop return value from initdram()
At present we cannot use this function as an init sequence call without a wrapper, since it returns the RAM size. Adjust it to set the RAM size in global_data instead, and return 0 on success. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'board/ifm')
-rw-r--r--board/ifm/ac14xx/ac14xx.c7
-rw-r--r--board/ifm/o2dnt2/o2dnt2.c6
2 files changed, 9 insertions, 4 deletions
diff --git a/board/ifm/ac14xx/ac14xx.c b/board/ifm/ac14xx/ac14xx.c
index b107dd1..129eb47 100644
--- a/board/ifm/ac14xx/ac14xx.c
+++ b/board/ifm/ac14xx/ac14xx.c
@@ -310,9 +310,12 @@ u32 sdram_init_seq[] = {
/* EMPTY, optional, we don't do it */
};
-phys_size_t initdram(void)
+int initdram(void)
{
- return fixed_sdram(NULL, sdram_init_seq, ARRAY_SIZE(sdram_init_seq));
+ gd->ram_size = fixed_sdram(NULL, sdram_init_seq,
+ ARRAY_SIZE(sdram_init_seq));
+
+ return 0;
}
int misc_init_r(void)
diff --git a/board/ifm/o2dnt2/o2dnt2.c b/board/ifm/o2dnt2/o2dnt2.c
index 7452d2b..4f81007 100644
--- a/board/ifm/o2dnt2/o2dnt2.c
+++ b/board/ifm/o2dnt2/o2dnt2.c
@@ -66,7 +66,7 @@ static void sdram_start(int hi_addr)
* use of CONFIG_SYS_SDRAM_BASE. The code does not work if
* CONFIG_SYS_SDRAM_BASE is something else than 0x00000000.
*/
-phys_size_t initdram(void)
+int initdram(void)
{
struct mpc5xxx_mmap_ctl *mmap_ctl =
(struct mpc5xxx_mmap_ctl *)CONFIG_SYS_MBAR;
@@ -181,7 +181,9 @@ phys_size_t initdram(void)
(PVR_MAJ(pvr) == 1) && (PVR_MIN(pvr) == 4))
out_be32(&sdram->sdelay, 0x04);
- return dramsize + dramsize2;
+ gd->ram_size = dramsize + dramsize2;
+
+ return 0;
}