summaryrefslogtreecommitdiff
path: root/include/config_distro_bootcmd.h
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2016-01-26 11:10:13 -0700
committerSimon Glass <sjg@chromium.org>2016-01-28 21:01:23 -0700
commit986691fb97bc245be517a9db1297cfa71dd865cf (patch)
tree36dde58b6269ef2844de3ee05282cde825297bb9 /include/config_distro_bootcmd.h
parent3483b75d94716191b354d046b4ed3f322500a3ee (diff)
downloadu-boot-986691fb97bc245be517a9db1297cfa71dd865cf.tar.gz
distro bootcmd: enumerate PCI before network operations
The PCI bus must be enumerated before PCI devices, such as Ethernet devices, are known to U-Boot. Enhance the distro boot commands to perform PCI enumeration when needed. Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/config_distro_bootcmd.h')
-rw-r--r--include/config_distro_bootcmd.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h
index c027d86439..37c6b438e2 100644
--- a/include/config_distro_bootcmd.h
+++ b/include/config_distro_bootcmd.h
@@ -139,6 +139,15 @@
BOOT_TARGET_DEVICES_references_IDE_without_CONFIG_CMD_IDE
#endif
+#if defined(CONFIG_CMD_PCI_ENUM) || defined(CONFIG_DM_PCI)
+#define BOOTENV_RUN_NET_PCI_ENUM "run boot_net_pci_enum; "
+#define BOOTENV_SHARED_PCI \
+ "boot_net_pci_enum=pci enum\0"
+#else
+#define BOOTENV_RUN_NET_PCI_ENUM
+#define BOOTENV_SHARED_PCI
+#endif
+
#ifdef CONFIG_CMD_USB
#define BOOTENV_RUN_NET_USB_START "run boot_net_usb_start; "
#define BOOTENV_SHARED_USB \
@@ -161,6 +170,7 @@
#define BOOTENV_DEV_DHCP(devtypeu, devtypel, instance) \
"bootcmd_dhcp=" \
BOOTENV_RUN_NET_USB_START \
+ BOOTENV_RUN_NET_PCI_ENUM \
"if dhcp ${scriptaddr} ${boot_script_dhcp}; then " \
"source ${scriptaddr}; " \
"fi\0"
@@ -177,6 +187,7 @@
#define BOOTENV_DEV_PXE(devtypeu, devtypel, instance) \
"bootcmd_pxe=" \
BOOTENV_RUN_NET_USB_START \
+ BOOTENV_RUN_NET_PCI_ENUM \
"dhcp; " \
"if pxe get; then " \
"pxe boot; " \
@@ -200,6 +211,7 @@
#define BOOTENV \
BOOTENV_SHARED_HOST \
BOOTENV_SHARED_MMC \
+ BOOTENV_SHARED_PCI \
BOOTENV_SHARED_USB \
BOOTENV_SHARED_SATA \
BOOTENV_SHARED_SCSI \