]> Git Repo - u-boot.git/blame - board/imgtec/boston/dt.c
common: Drop asm/global_data.h from common header
[u-boot.git] / board / imgtec / boston / dt.c
CommitLineData
83d290c5 1// SPDX-License-Identifier: GPL-2.0
d2b12a57
PB
2/*
3 * Copyright (C) 2016 Imagination Technologies
d2b12a57
PB
4 */
5
6#include <common.h>
7#include <fdt_support.h>
401d1c4f 8#include <asm/global_data.h>
d2b12a57 9
b75d8dc5 10int ft_board_setup(void *blob, struct bd_info *bd)
d2b12a57
PB
11{
12 DECLARE_GLOBAL_DATA_PTR;
13 u64 mem_start[2], mem_size[2];
14 int mem_regions;
15
16 mem_start[0] = 0;
17 mem_size[0] = min_t(u64, 256llu << 20, gd->ram_size);
18 mem_regions = 1;
19
20 if (gd->ram_size > mem_size[0]) {
21 mem_start[1] = 0x80000000 + mem_size[0];
22 mem_size[1] = gd->ram_size - mem_size[0];
23 mem_regions++;
24 }
25
26 return fdt_fixup_memory_banks(blob, mem_start, mem_size, mem_regions);
27}
This page took 0.122496 seconds and 4 git commands to generate.