X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=board%2Fimgtec%2Fboston%2Fddr.c;h=241b3846687ad5d1058b9e82cced83966eb8e16c;hb=67c4e9f815eb75ba5c1f86213eded93c4e06e64b;hp=ceffef61efb39f665437339fec0a208f14bfa322;hpb=ad8783cb1cb258b71d81800f72cd64eb44081653;p=oweals%2Fu-boot.git diff --git a/board/imgtec/boston/ddr.c b/board/imgtec/boston/ddr.c index ceffef61ef..241b384668 100644 --- a/board/imgtec/boston/ddr.c +++ b/board/imgtec/boston/ddr.c @@ -1,20 +1,25 @@ +// SPDX-License-Identifier: GPL-2.0 /* * Copyright (C) 2016 Imagination Technologies - * - * SPDX-License-Identifier: GPL-2.0 */ #include +#include #include #include "boston-regs.h" -phys_size_t initdram(int board_type) +DECLARE_GLOBAL_DATA_PTR; + +int dram_init(void) { u32 ddrconf0 = __raw_readl((uint32_t *)BOSTON_PLAT_DDRCONF0); - return (phys_size_t)(ddrconf0 & BOSTON_PLAT_DDRCONF0_SIZE) << 30; + gd->ram_size = (phys_size_t)(ddrconf0 & BOSTON_PLAT_DDRCONF0_SIZE) << + 30; + + return 0; } ulong board_get_usable_ram_top(ulong total_size)