summaryrefslogtreecommitdiff
path: root/common/spl
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2019-04-24 09:04:23 -0400
committerTom Rini <trini@konsulko.com>2019-04-24 09:04:23 -0400
commit3fbd2dce351ab5d40d3244f26bd713caa4f826e2 (patch)
tree4a8e5c2fd2dee4abed674da4ce0312af06f97bc1 /common/spl
parent8a94262435ca559a5e2dad79f2dc3c130e9047a8 (diff)
parent74a7e0018a97a0e7318c4c7a3b473fd9ebbb5ad1 (diff)
Merge branch '2019-04-22-master-imports'
- Add and enable brcmnand driver on a number of relevant platforms. Also add and enable LED drivers on more bcm platforms. - Various ARMv8 fixes/improvements, including extending PSCI functionality. - fs_loader improvments - Various FIT/SPL improvements - PCI bugfixes - Poplar platform ethernet support - MediaTek MMC improvements - Android boot improvements
Diffstat (limited to 'common/spl')
-rw-r--r--common/spl/spl_nand.c4
-rw-r--r--common/spl/spl_ymodem.c20
2 files changed, 23 insertions, 1 deletions
diff --git a/common/spl/spl_nand.c b/common/spl/spl_nand.c
index 6eb190f1ea..e2bcefb111 100644
--- a/common/spl/spl_nand.c
+++ b/common/spl/spl_nand.c
@@ -17,6 +17,10 @@ static int spl_nand_load_image(struct spl_image_info *spl_image,
{
nand_init();
+ printf("Loading U-Boot from 0x%08x (size 0x%08x) to 0x%08x\n",
+ CONFIG_SYS_NAND_U_BOOT_OFFS, CONFIG_SYS_NAND_U_BOOT_SIZE,
+ CONFIG_SYS_NAND_U_BOOT_DST);
+
nand_spl_load_image(CONFIG_SYS_NAND_U_BOOT_OFFS,
CONFIG_SYS_NAND_U_BOOT_SIZE,
(void *)CONFIG_SYS_NAND_U_BOOT_DST);
diff --git a/common/spl/spl_ymodem.c b/common/spl/spl_ymodem.c
index 25226e9a33..fa539ecd7a 100644
--- a/common/spl/spl_ymodem.c
+++ b/common/spl/spl_ymodem.c
@@ -89,7 +89,25 @@ static int spl_ymodem_load_image(struct spl_image_info *spl_image,
if (res <= 0)
goto end_stream;
- if (IS_ENABLED(CONFIG_SPL_LOAD_FIT) &&
+ if (IS_ENABLED(CONFIG_SPL_LOAD_FIT_FULL) &&
+ image_get_magic((struct image_header *)buf) == FDT_MAGIC) {
+ addr = CONFIG_SYS_LOAD_ADDR;
+ ih = (struct image_header *)addr;
+
+ memcpy((void *)addr, buf, res);
+ size += res;
+ addr += res;
+
+ while ((res = xyzModem_stream_read(buf, BUF_SIZE, &err)) > 0) {
+ memcpy((void *)addr, buf, res);
+ size += res;
+ addr += res;
+ }
+
+ ret = spl_parse_image_header(spl_image, ih);
+ if (ret)
+ return ret;
+ } else if (IS_ENABLED(CONFIG_SPL_LOAD_FIT) &&
image_get_magic((struct image_header *)buf) == FDT_MAGIC) {
struct spl_load_info load;
struct ymodem_fit_info info;