u-boot-brain/arch/mips/mach-ath79/dram.c
Simon Glass 088454cde2 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>
2017-04-05 13:59:20 -04:00

21 lines
337 B
C

/*
* Copyright (C) 2015-2016 Wills Wang <wills.wang@live.com>
*
* SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
#include <linux/sizes.h>
#include <asm/addrspace.h>
#include <mach/ddr.h>
DECLARE_GLOBAL_DATA_PTR;
int initdram(void)
{
ddr_tap_tuning();
gd->ram_size = get_ram_size((void *)KSEG1, SZ_256M);
return 0;
}