mb/lowrisc/nexys4ddr: Read RAM information from the config string

Change-Id: I9147eca0b536b6267d58f6e8baa37b6950b35160
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-on: https://review.coreboot.org/17710
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
This commit is contained in:
Jonathan Neuschäfer 2016-12-04 08:49:38 +01:00 committed by Ronald G. Minnich
parent c978886e7b
commit b1de92ee04
1 changed files with 5 additions and 5 deletions

View File

@ -14,17 +14,17 @@
*/
#include <cbmem.h>
#include <commonlib/configstring.h>
#include <device/device.h>
#include <symbols.h>
static void mainboard_enable(device_t dev)
{
/*
* TODO: Get this size from the hardware-supplied configuration string.
*/
const size_t ram_size = 1*GiB;
uintptr_t ram_base;
size_t ram_size;
ram_resource(dev, 0, (uintptr_t)_dram / KiB, ram_size / KiB);
query_mem(configstring(), &ram_base, &ram_size);
ram_resource(dev, 0, ram_base / KiB, ram_size / KiB);
cbmem_initialize_empty();
}