2 * Copyright (c) 2013, Google Inc.
6 * - Added prep subcommand support
7 * - Reorganized source - modeled after powerpc version
10 * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
15 * See file CREDITS for list of people who contributed to this
18 * This program is free software; you can redistribute it and/or
19 * modify it under the terms of the GNU General Public License as
20 * published by the Free Software Foundation; either version 2 of
21 * the License, or (at your option) any later version.
23 * This program is distributed in the hope that it will be useful,
24 * but WITHOUT ANY WARRANTY; without even the implied warranty of
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 * GNU General Public License for more details.
28 * You should have received a copy of the GNU General Public License
29 * along with this program; if not, write to the Free Software
30 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
35 #include <fdt_support.h>
37 DECLARE_GLOBAL_DATA_PTR;
39 int arch_fixup_memory_node(void *blob)
43 u64 start[CONFIG_NR_DRAM_BANKS];
44 u64 size[CONFIG_NR_DRAM_BANKS];
46 for (bank = 0; bank < CONFIG_NR_DRAM_BANKS; bank++) {
47 start[bank] = bd->bi_dram[bank].start;
48 size[bank] = bd->bi_dram[bank].size;
51 return fdt_fixup_memory_banks(blob, start, size, CONFIG_NR_DRAM_BANKS);