diff options
author | Paul Burton <paul.burton@imgtec.com> | 2016-09-08 07:47:39 +0100 |
---|---|---|
committer | Daniel Schwierzeck <daniel.schwierzeck@gmail.com> | 2016-09-21 16:24:36 +0200 |
commit | ad8783cb1cb258b71d81800f72cd64eb44081653 (patch) | |
tree | feb7ad4960dc78fa6db22dd8c862b2b0d8bf93d9 /board/imgtec/boston/ddr.c | |
parent | dd7c749474e0976cfc7e78dc9032d7fa8b9b9632 (diff) | |
download | u-boot-imx-ad8783cb1cb258b71d81800f72cd64eb44081653.zip u-boot-imx-ad8783cb1cb258b71d81800f72cd64eb44081653.tar.gz u-boot-imx-ad8783cb1cb258b71d81800f72cd64eb44081653.tar.bz2 |
boston: Introduce support for the MIPS Boston development board
This patch introduces support for building U-Boot to run on the MIPS
Boston development board. This is a board built around an FPGA & an
Intel EG20T Platform Controller Hub, used largely as part of the
development of new CPUs and their software support. It is essentially
the successor to the older MIPS Malta board.
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Diffstat (limited to 'board/imgtec/boston/ddr.c')
-rw-r--r-- | board/imgtec/boston/ddr.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/board/imgtec/boston/ddr.c b/board/imgtec/boston/ddr.c new file mode 100644 index 0000000..ceffef6 --- /dev/null +++ b/board/imgtec/boston/ddr.c @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2016 Imagination Technologies + * + * SPDX-License-Identifier: GPL-2.0 + */ + +#include <common.h> + +#include <asm/io.h> + +#include "boston-regs.h" + +phys_size_t initdram(int board_type) +{ + u32 ddrconf0 = __raw_readl((uint32_t *)BOSTON_PLAT_DDRCONF0); + + return (phys_size_t)(ddrconf0 & BOSTON_PLAT_DDRCONF0_SIZE) << 30; +} + +ulong board_get_usable_ram_top(ulong total_size) +{ + DECLARE_GLOBAL_DATA_PTR; + + if (gd->ram_top < CONFIG_SYS_SDRAM_BASE) { + /* 2GB wrapped around to 0 */ + return CKSEG0ADDR(256 << 20); + } + + return min_t(unsigned long, gd->ram_top, CKSEG0ADDR(256 << 20)); +} |