diff options
author | Tom Rini <trini@konsulko.com> | 2023-07-30 17:14:22 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-07-30 17:14:22 -0400 |
commit | 6aab91a8daf298e22f1dcf7937bc3dd09a29bb08 (patch) | |
tree | 772d0829c3ec68135a399efb229b29f964fc920b | |
parent | a36d59ba99a19c777d896d4c70e75975654e2831 (diff) | |
parent | 7d4c8cfe2547596d07c51b2f38cde8d4c75f17fc (diff) | |
download | u-boot-WIP/30Jun2023.zip u-boot-WIP/30Jun2023.tar.gz u-boot-WIP/30Jun2023.tar.bz2 |
Merge tag 'spl-2023-10-rc2' of https://source.denx.de/u-boot/custodians/u-boot-efiWIP/30Jun2023
Pull request for spl-2023-10-rc2
SPL:
* use CONFIG_SPL_FS_LOAD_PAYLOAD_NAME when booting from NVMe
* initialize PCI before booting
-rw-r--r-- | common/spl/spl.c | 7 | ||||
-rw-r--r-- | common/spl/spl_blk_fs.c | 4 | ||||
-rw-r--r-- | common/spl/spl_nvme.c | 5 | ||||
-rw-r--r-- | disk/part.c | 8 | ||||
-rw-r--r-- | drivers/pci/Kconfig | 3 |
5 files changed, 16 insertions, 11 deletions
diff --git a/common/spl/spl.c b/common/spl/spl.c index f09bb97..0062f3f 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -800,6 +800,13 @@ void board_init_r(gd_t *dummy1, ulong dummy2) IS_ENABLED(CONFIG_SPL_ATF)) dram_init_banksize(); + if (CONFIG_IS_ENABLED(PCI)) { + ret = pci_init(); + if (ret) + puts(SPL_TPL_PROMPT "Cannot initialize PCI\n"); + /* Don't fail. We still can try other boot methods. */ + } + bootcount_inc(); /* Dump driver model states to aid analysis */ diff --git a/common/spl/spl_blk_fs.c b/common/spl/spl_blk_fs.c index d97adc4..16ecece 100644 --- a/common/spl/spl_blk_fs.c +++ b/common/spl/spl_blk_fs.c @@ -43,7 +43,7 @@ int spl_blk_load_image(struct spl_image_info *spl_image, struct spl_boot_device *bootdev, enum uclass_id uclass_id, int devnum, int partnum) { - const char *filename = CONFIG_SPL_PAYLOAD; + const char *filename = CONFIG_SPL_FS_LOAD_PAYLOAD_NAME; struct disk_partition part_info = {}; struct legacy_img_hdr *header; struct blk_desc *blk_desc; @@ -66,7 +66,7 @@ int spl_blk_load_image(struct spl_image_info *spl_image, } dev.ifname = blk_get_uclass_name(uclass_id); - snprintf(dev.dev_part_str, sizeof(dev.dev_part_str) - 1, "%d:%d", + snprintf(dev.dev_part_str, sizeof(dev.dev_part_str) - 1, "%x:%x", devnum, partnum); ret = fs_set_blk_dev(dev.ifname, dev.dev_part_str, FS_TYPE_ANY); if (ret) { diff --git a/common/spl/spl_nvme.c b/common/spl/spl_nvme.c index 2af63f1..c8774d6 100644 --- a/common/spl/spl_nvme.c +++ b/common/spl/spl_nvme.c @@ -7,7 +7,6 @@ #include <common.h> #include <spl.h> -#include <init.h> #include <nvme.h> static int spl_nvme_load_image(struct spl_image_info *spl_image, @@ -15,10 +14,6 @@ static int spl_nvme_load_image(struct spl_image_info *spl_image, { int ret; - ret = pci_init(); - if (ret < 0) - return ret; - ret = nvme_scan_namespace(); if (ret < 0) return ret; diff --git a/disk/part.c b/disk/part.c index 186ee96..eec02f5 100644 --- a/disk/part.c +++ b/disk/part.c @@ -508,9 +508,11 @@ int blk_get_device_part_str(const char *ifname, const char *dev_part_str, #endif /* If no dev_part_str, use bootdevice environment variable */ - if (!dev_part_str || !strlen(dev_part_str) || - !strcmp(dev_part_str, "-")) - dev_part_str = env_get("bootdevice"); + if (CONFIG_IS_ENABLED(ENV_SUPPORT)) { + if (!dev_part_str || !strlen(dev_part_str) || + !strcmp(dev_part_str, "-")) + dev_part_str = env_get("bootdevice"); + } /* If still no dev_part_str, it's an error */ if (!dev_part_str) { diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig index aca439d..93e6f50 100644 --- a/drivers/pci/Kconfig +++ b/drivers/pci/Kconfig @@ -41,7 +41,8 @@ config PCI_PNP Enable PCI memory and I/O space resource allocation and assignment. config SPL_PCI_PNP - bool "Enable Plug & Play support for PCI" + bool "Enable Plug & Play support for PCI in SPL" + depends on SPL_PCI help Enable PCI memory and I/O space resource allocation and assignment. |