]>
git.ipfire.org Git - thirdparty/u-boot.git/blob - common/spl/spl_nor.c
2 * Copyright (C) 2012 Stefan Roese <sr@denx.de>
4 * SPDX-License-Identifier: GPL-2.0+
10 void spl_nor_load_image(void)
13 * Loading of the payload to SDRAM is done with skipping of
14 * the mkimage header in this SPL NOR driver
16 spl_image
.flags
|= SPL_COPY_PAYLOAD_ONLY
;
18 if (spl_start_uboot()) {
20 * Load real U-Boot from its location in NOR flash to its
21 * defined location in SDRAM
23 spl_parse_image_header(
24 (const struct image_header
*)CONFIG_SYS_UBOOT_BASE
);
26 memcpy((void *)spl_image
.load_addr
,
27 (void *)(CONFIG_SYS_UBOOT_BASE
+
28 sizeof(struct image_header
)),
32 * Load Linux from its location in NOR flash to its defined
35 spl_parse_image_header(
36 (const struct image_header
*)CONFIG_SYS_OS_BASE
);
38 memcpy((void *)spl_image
.load_addr
,
39 (void *)(CONFIG_SYS_OS_BASE
+
40 sizeof(struct image_header
)),
44 * Copy DT blob (fdt) to SDRAM. Passing pointer to flash
45 * doesn't work (16 KiB should be enough for DT)
47 memcpy((void *)CONFIG_SYS_SPL_ARGS_ADDR
,
48 (void *)(CONFIG_SYS_FDT_BASE
),