Use the common FDT setup function that is now available in image. Move the FDT-specific code to a new bootm-fdt.c and remove unused headers from bootm.c. Signed-off-by: Simon Glass <sjg@chromium.org>master
parent
c19d13b030
commit
6caa195614
@ -0,0 +1,52 @@ |
|||||||
|
/*
|
||||||
|
* 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) |
||||||
|
* |
||||||
|
* See file CREDITS for list of people who contributed to this |
||||||
|
* project. |
||||||
|
* |
||||||
|
* This program is free software; you can redistribute it and/or |
||||||
|
* modify it under the terms of the GNU General Public License as |
||||||
|
* published by the Free Software Foundation; either version 2 of |
||||||
|
* the License, or (at your option) any later version. |
||||||
|
* |
||||||
|
* This program is distributed in the hope that it will be useful, |
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||||
|
* GNU General Public License for more details. |
||||||
|
* |
||||||
|
* You should have received a copy of the GNU General Public License |
||||||
|
* along with this program; if not, write to the Free Software |
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
||||||
|
* MA 02111-1307 USA |
||||||
|
*/ |
||||||
|
|
||||||
|
#include <common.h> |
||||||
|
#include <fdt_support.h> |
||||||
|
|
||||||
|
DECLARE_GLOBAL_DATA_PTR; |
||||||
|
|
||||||
|
int arch_fixup_memory_node(void *blob) |
||||||
|
{ |
||||||
|
bd_t *bd = gd->bd; |
||||||
|
int bank; |
||||||
|
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; |
||||||
|
} |
||||||
|
|
||||||
|
return fdt_fixup_memory_banks(blob, start, size, CONFIG_NR_DRAM_BANKS); |
||||||
|
} |
Loading…
Reference in new issue