diff options
author | Tom Rini | 2019-07-11 18:09:38 -0400 |
---|---|---|
committer | Tom Rini | 2019-07-11 18:09:38 -0400 |
commit | 68deea2308141c26707da44654b273d7b072ab0d (patch) | |
tree | 1af260ebb9b053457bd6bf388510fa0475c3be16 /common | |
parent | 79b8d3c285f4f1c2ee4b27367f2ca3ecb76ed9ce (diff) | |
parent | cc66ebdeeca5c4ed095bbd521b748bb009d99728 (diff) |
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-marvell
- SPL SATA enhancements to allow booting from RAW SATA device
needed for Clearfog (Baruch)
- Enable SATA booting on Clearfog (Baruch)
- Misc changes to Turris Omnia (Marek)
- Enable CMD_BOOTZ and increase SYS_BOOTM_LEN on crs305-1g-4s
(Luka)
- Enable FIT support for db-xc3-24g4xg (Chris)
- Enable DM_SPI on Keymile Kirkwood board with necessary changes
for this (Pascal)
- Set 38x and 39x AVS on lower frequency (Baruch)
Diffstat (limited to 'common')
-rw-r--r-- | common/spl/spl_sata.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/common/spl/spl_sata.c b/common/spl/spl_sata.c index adfce1d527f..f0af9f38d19 100644 --- a/common/spl/spl_sata.c +++ b/common/spl/spl_sata.c @@ -17,13 +17,23 @@ #include <fat.h> #include <image.h> +#ifndef CONFIG_SYS_SATA_FAT_BOOT_PARTITION +#define CONFIG_SYS_SATA_FAT_BOOT_PARTITION 1 +#endif + +#ifndef CONFIG_SPL_FS_LOAD_PAYLOAD_NAME +#define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot.img" +#endif + static int spl_sata_load_image(struct spl_image_info *spl_image, struct spl_boot_device *bootdev) { - int err; + int err = 0; struct blk_desc *stor_dev; +#if !defined(CONFIG_DM_SCSI) && !defined(CONFIG_AHCI) err = init_sata(CONFIG_SPL_SATA_BOOT_DEVICE); +#endif if (err) { #ifdef CONFIG_SPL_LIBCOMMON_SUPPORT printf("spl: sata init failed: err - %d\n", err); @@ -43,9 +53,13 @@ static int spl_sata_load_image(struct spl_image_info *spl_image, CONFIG_SYS_SATA_FAT_BOOT_PARTITION)) #endif { - err = spl_load_image_fat(spl_image, stor_dev, + err = -ENOSYS; + + if (IS_ENABLED(CONFIG_SPL_FS_FAT)) { + err = spl_load_image_fat(spl_image, stor_dev, CONFIG_SYS_SATA_FAT_BOOT_PARTITION, - CONFIG_SPL_FS_LOAD_PAYLOAD_NAME); + CONFIG_SPL_FS_LOAD_PAYLOAD_NAME); + } } if (err) { puts("Error loading sata device\n"); |