* struct eth_uclass_priv - The structure attached to the uclass itself
*
* @current: The Ethernet device that the network functions are using
+ * @no_bootdevs: true to skip binding Ethernet bootdevs (this is a negative flag
+ * so that the default value enables it)
*/
struct eth_uclass_priv {
struct udevice *current;
+ bool no_bootdevs;
};
/* eth_errno - This stores the most recent failure code from DM functions */
return uclass_get_priv(uc);
}
+void eth_set_enable_bootdevs(bool enable)
+{
+ struct eth_uclass_priv *priv = eth_get_uclass_priv();
+
+ if (priv)
+ priv->no_bootdevs = !enable;
+}
+
void eth_set_current_to_next(void)
{
struct eth_uclass_priv *uc_priv;
static int eth_post_bind(struct udevice *dev)
{
+ struct eth_uclass_priv *priv = uclass_get_priv(dev->uclass);
int ret;
if (strchr(dev->name, ' ')) {
#ifdef CONFIG_DM_ETH_PHY
eth_phy_binds_nodes(dev);
#endif
- if (CONFIG_IS_ENABLED(BOOTDEV_ETH)) {
+ if (CONFIG_IS_ENABLED(BOOTDEV_ETH) && !priv->no_bootdevs) {
ret = bootdev_setup_for_dev(dev, "eth_bootdev");
if (ret)
return log_msg_ret("bootdev", ret);