diff options
Diffstat (limited to 'common/spl/spl_ram.c')
| -rw-r--r-- | common/spl/spl_ram.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/common/spl/spl_ram.c b/common/spl/spl_ram.c index 71b7a8374bb..0c501cf02f2 100644 --- a/common/spl/spl_ram.c +++ b/common/spl/spl_ram.c @@ -27,6 +27,11 @@ static ulong spl_ram_load_read(struct spl_load_info *load, ulong sector, if (IS_ENABLED(CONFIG_SPL_LOAD_FIT)) { addr = IF_ENABLED_INT(CONFIG_SPL_LOAD_FIT, CONFIG_SPL_LOAD_FIT_ADDRESS); + +#ifdef CONFIG_SPL_PCI_DFU + if (spl_boot_device() == BOOT_DEVICE_PCIE) + addr = CONFIG_SPL_PCI_DFU_SPL_LOAD_FIT_ADDRESS; +#endif } addr += sector; if (CONFIG_IS_ENABLED(IMAGE_PRE_LOAD)) @@ -47,6 +52,11 @@ static int spl_ram_load_image(struct spl_image_info *spl_image, if (IS_ENABLED(CONFIG_SPL_LOAD_FIT)) { addr = IF_ENABLED_INT(CONFIG_SPL_LOAD_FIT, CONFIG_SPL_LOAD_FIT_ADDRESS); + +#ifdef CONFIG_SPL_PCI_DFU + if (spl_boot_device() == BOOT_DEVICE_PCIE) + addr = CONFIG_SPL_PCI_DFU_SPL_LOAD_FIT_ADDRESS; +#endif } if (CONFIG_IS_ENABLED(IMAGE_PRE_LOAD)) { @@ -64,6 +74,11 @@ static int spl_ram_load_image(struct spl_image_info *spl_image, spl_dfu_cmd(0, "dfu_alt_info_ram", "ram", "0"); #endif +#if CONFIG_IS_ENABLED(PCI_DFU) + if (bootdev->boot_device == BOOT_DEVICE_PCIE) + spl_dfu_cmd(0, "dfu_alt_info_ram", "ram", "0"); +#endif + if (IS_ENABLED(CONFIG_SPL_LOAD_FIT) && image_get_magic(header) == FDT_MAGIC) { struct spl_load_info load; @@ -102,3 +117,6 @@ SPL_LOAD_IMAGE_METHOD("RAM", 0, BOOT_DEVICE_RAM, spl_ram_load_image); #if CONFIG_IS_ENABLED(DFU) SPL_LOAD_IMAGE_METHOD("DFU", 0, BOOT_DEVICE_DFU, spl_ram_load_image); #endif +#if CONFIG_IS_ENABLED(PCI_DFU) +SPL_LOAD_IMAGE_METHOD("PCIE", 0, BOOT_DEVICE_PCIE, spl_ram_load_image); +#endif |
