mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-12 16:07:30 +00:00
dd09f7e73c
The way the PSCI DT update happens currently means we pull in <asm/armv7.h> everywhere, including on ARMv8 and that in turn brings in <asm/io.h> for some non-PSCI related things that header needs to deal with. To fix this, we rework the hook slightly. A good portion of arch/arm/cpu/armv7/virt-dt.c is common looking and I hope that when PSCI is needed on ARMv8 we can re-use this by and large. So rename the current hook to psci_update_dt(), move the prototype to <asm/psci.h> and add an #ifdef that will make re-use later easier. Reported-by: York Sun <yorksun@freescale.com> Cc: Marc Zyngier <marc.zyngier@arm.com> Cc: York Sun <yorksun@freescale.com> Cc: Ian Campbell <ijc@hellion.org.uk> Cc: Hans de Goede <hdegoede@redhat.com> Cc: Albert ARIBAUD <albert.u.boot@aribaud.net> Signed-off-by: Tom Rini <trini@konsulko.com> Acked-by: York Sun <yorksun@freescale.com>
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/psci.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 = psci_update_dt(blob);
|
|
#endif
|
|
return ret;
|
|
}
|