mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-13 15:03:58 +03:00
Merge tag 'spl-2023-10-rc2' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request for spl-2023-10-rc2 SPL: * use CONFIG_SPL_FS_LOAD_PAYLOAD_NAME when booting from NVMe * initialize PCI before booting
This commit is contained in:
@@ -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 */
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user