2 * Copyright (C) 2012 Stefan Roese <sr@denx.de>
4 * See file CREDITS for list of people who contributed to this
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation; either version 2 of
10 * the License, or (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
21 void spl_nor_load_image(void)
24 * Loading of the payload to SDRAM is done with skipping of
25 * the mkimage header in this SPL NOR driver
27 spl_image.flags |= SPL_COPY_PAYLOAD_ONLY;
29 if (spl_start_uboot()) {
31 * Load real U-Boot from its location in NOR flash to its
32 * defined location in SDRAM
34 spl_parse_image_header(
35 (const struct image_header *)CONFIG_SYS_UBOOT_BASE);
37 memcpy((void *)spl_image.load_addr,
38 (void *)(CONFIG_SYS_UBOOT_BASE +
39 sizeof(struct image_header)),
43 * Load Linux from its location in NOR flash to its defined
46 spl_parse_image_header(
47 (const struct image_header *)CONFIG_SYS_OS_BASE);
49 memcpy((void *)spl_image.load_addr,
50 (void *)(CONFIG_SYS_OS_BASE +
51 sizeof(struct image_header)),
55 * Copy DT blob (fdt) to SDRAM. Passing pointer to flash
56 * doesn't work (16 KiB should be enough for DT)
58 memcpy((void *)CONFIG_SYS_SPL_ARGS_ADDR,
59 (void *)(CONFIG_SYS_FDT_BASE),