For simplicity and backward compatibility automatically run 'pci enum'
via preboot when PCI is enabled. As preboot is already used for the
USB keyboard support this rework how CONFIG_PREBOOT is set to allow
combining several commands.

Signed-off-by: Alban Bedel <alban.be...@avionic-design.de>
---
 include/configs/tegra-common-post.h | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/include/configs/tegra-common-post.h 
b/include/configs/tegra-common-post.h
index b206ce4bf93c..eff4c760797d 100644
--- a/include/configs/tegra-common-post.h
+++ b/include/configs/tegra-common-post.h
@@ -42,9 +42,10 @@
 #ifdef CONFIG_USB_KEYBOARD
 #define STDIN_KBD_USB ",usbkbd"
 #define CONFIG_SYS_USB_EVENT_POLL
-#define CONFIG_PREBOOT                 "usb start"
+#define PREBOOT_USB "usb start;"
 #else
 #define STDIN_KBD_USB ""
+#define PREBOOT_USB ""
 #endif
 
 #ifdef CONFIG_LCD
@@ -89,6 +90,12 @@
 #define INITRD_HIGH "ffffffff"
 #endif
 
+#ifdef CONFIG_PCI
+#define PREBOOT_PCI "pci enum;"
+#else
+#define PREBOOT_PCI ""
+#endif
+
 #define CONFIG_EXTRA_ENV_SETTINGS \
        TEGRA_DEVICE_SETTINGS \
        MEM_LAYOUT_ENV_SETTINGS \
@@ -102,6 +109,10 @@
 #define CONFIG_TEGRA_SPI
 #endif
 
+#if defined(CONFIG_USB_KEYBOARD) || defined(CONFIG_PCI)
+#define CONFIG_PREBOOT PREBOOT_USB PREBOOT_PCI
+#endif
+
 /* overrides for SPL build here */
 #ifdef CONFIG_SPL_BUILD
 
-- 
2.9.2

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to