From c6db965f67c01c9ac6570eed690103f3ea30b3c4 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 25 Jan 2016 14:58:42 -0700 Subject: dm: Remove device_probe_child() This function is not used as the use case for it did not eventuate. Remove it to avoid confusion. Signed-off-by: Simon Glass Reviewed-by: Tom Rini Reviewed-by: Bin Meng --- include/dm/device-internal.h | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'include') diff --git a/include/dm/device-internal.h b/include/dm/device-internal.h index 9388870..b348ad5 100644 --- a/include/dm/device-internal.h +++ b/include/dm/device-internal.h @@ -66,19 +66,6 @@ int device_bind_by_name(struct udevice *parent, bool pre_reloc_only, int device_probe(struct udevice *dev); /** - * device_probe() - Probe a child device, activating it - * - * Activate a device so that it is ready for use. All its parents are probed - * first. The child is provided with parent data if parent_priv is not NULL. - * - * @dev: Pointer to device to probe - * @parent_priv: Pointer to parent data. If non-NULL then this is provided to - * the child. - * @return 0 if OK, -ve on error - */ -int device_probe_child(struct udevice *dev, void *parent_priv); - -/** * device_remove() - Remove a device, de-activating it * * De-activate a device so that it is no longer ready for use. All its -- cgit v1.1 From 3483b75d94716191b354d046b4ed3f322500a3ee Mon Sep 17 00:00:00 2001 From: Stephen Warren Date: Tue, 26 Jan 2016 11:10:12 -0700 Subject: distro bootcmd: make net boot only optionally start USB Currently, the distro boot commands always enumerate USB devices before performing network operations. However, depending on the board and end- user configuration, network devices may not be attached to USB, and so enumerating USB may not be necessary. Enhance the scripts to make this step optional, so that the user can decrease boot time if they don't need USB. This change is performed by moving the "usb start" invocation into a standalone variable. If the user desires, they can replace that variable's value with some no-op command such as "true" instead. Booting from a USB storage device always needs to enumerate USB devices, so this action is still hard-coded. Signed-off-by: Stephen Warren Reviewed-by: Simon Glass --- include/config_distro_bootcmd.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h index 66264ce..c027d86 100644 --- a/include/config_distro_bootcmd.h +++ b/include/config_distro_bootcmd.h @@ -140,15 +140,16 @@ #endif #ifdef CONFIG_CMD_USB -#define BOOTENV_RUN_USB_INIT "usb start; " +#define BOOTENV_RUN_NET_USB_START "run boot_net_usb_start; " #define BOOTENV_SHARED_USB \ + "boot_net_usb_start=usb start\0" \ "usb_boot=" \ - BOOTENV_RUN_USB_INIT \ + "usb start; " \ BOOTENV_SHARED_BLKDEV_BODY(usb) #define BOOTENV_DEV_USB BOOTENV_DEV_BLKDEV #define BOOTENV_DEV_NAME_USB BOOTENV_DEV_NAME_BLKDEV #else -#define BOOTENV_RUN_USB_INIT +#define BOOTENV_RUN_NET_USB_START #define BOOTENV_SHARED_USB #define BOOTENV_DEV_USB \ BOOT_TARGET_DEVICES_references_USB_without_CONFIG_CMD_USB @@ -159,7 +160,7 @@ #if defined(CONFIG_CMD_DHCP) #define BOOTENV_DEV_DHCP(devtypeu, devtypel, instance) \ "bootcmd_dhcp=" \ - BOOTENV_RUN_USB_INIT \ + BOOTENV_RUN_NET_USB_START \ "if dhcp ${scriptaddr} ${boot_script_dhcp}; then " \ "source ${scriptaddr}; " \ "fi\0" @@ -175,7 +176,7 @@ #if defined(CONFIG_CMD_DHCP) && defined(CONFIG_CMD_PXE) #define BOOTENV_DEV_PXE(devtypeu, devtypel, instance) \ "bootcmd_pxe=" \ - BOOTENV_RUN_USB_INIT \ + BOOTENV_RUN_NET_USB_START \ "dhcp; " \ "if pxe get; then " \ "pxe boot; " \ -- cgit v1.1 From 986691fb97bc245be517a9db1297cfa71dd865cf Mon Sep 17 00:00:00 2001 From: Stephen Warren Date: Tue, 26 Jan 2016 11:10:13 -0700 Subject: 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 Reviewed-by: Simon Glass --- include/config_distro_bootcmd.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include') diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h index c027d86..37c6b43 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 \ -- cgit v1.1