mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-12-11 13:56:30 +00:00
e771a3d538
Generate the PSCI node in the device tree. Also add a reserve section for the "secure" code that lives in in normal RAM, so that the kernel knows it'd better not trip on it. Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
44 lines
1 KiB
C
44 lines
1 KiB
C
/*
|
|
* Copyright (c) 2013, Google Inc.
|
|
*
|
|
* Copyright (C) 2011
|
|
* Corscience GmbH & Co. KG - Simon Schwarz <schwarz@corscience.de>
|
|
* - Added prep subcommand support
|
|
* - Reorganized source - modeled after powerpc version
|
|
*
|
|
* (C) Copyright 2002
|
|
* Sysgo Real-Time Solutions, GmbH <www.elinos.com>
|
|
* Marius Groeger <mgroeger@sysgo.de>
|
|
*
|
|
* Copyright (C) 2001 Erik Mouw (J.A.K.Mouw@its.tudelft.nl)
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0+
|
|
*/
|
|
|
|
#include <common.h>
|
|
#include <fdt_support.h>
|
|
#include <asm/armv7.h>
|
|
|
|
DECLARE_GLOBAL_DATA_PTR;
|
|
|
|
int arch_fixup_fdt(void *blob)
|
|
{
|
|
bd_t *bd = gd->bd;
|
|
int bank, ret;
|
|
u64 start[CONFIG_NR_DRAM_BANKS];
|
|
u64 size[CONFIG_NR_DRAM_BANKS];
|
|
|
|
for (bank = 0; bank < CONFIG_NR_DRAM_BANKS; bank++) {
|
|
start[bank] = bd->bi_dram[bank].start;
|
|
size[bank] = bd->bi_dram[bank].size;
|
|
}
|
|
|
|
ret = fdt_fixup_memory_banks(blob, start, size, CONFIG_NR_DRAM_BANKS);
|
|
#if defined(CONFIG_ARMV7_NONSEC) || defined(CONFIG_ARMV7_VIRT)
|
|
if (ret)
|
|
return ret;
|
|
|
|
ret = armv7_update_dt(blob);
|
|
#endif
|
|
return ret;
|
|
}
|