Revert "ARM64: zynqmp: Added broken-tuning property to SD, eMMC nodes"
[oweals/u-boot.git] / drivers / net / e1000.c
index 2f2185d8f188110e1b1b6d871686a311cd80349b..3332ad95d467696edc201be8bf860a4b13891afb 100644 (file)
@@ -5453,7 +5453,7 @@ e1000_initialize(bd_t * bis)
        for (i = 0; (devno = pci_find_devices(e1000_supported, i)) >= 0; i++) {
                /*
                 * These will never get freed due to errors, this allows us to
-                * perform SPI EEPROM programming from U-boot, for example.
+                * perform SPI EEPROM programming from U-Boot, for example.
                 */
                struct eth_device *nic = malloc(sizeof(*nic));
                struct e1000_hw *hw = malloc(sizeof(*hw));
@@ -5513,7 +5513,8 @@ static int do_e1000(cmd_tbl_t *cmdtp, int flag,
        struct udevice *dev;
        char name[30];
        int ret;
-#else
+#endif
+#if !defined(CONFIG_DM_ETH) || defined(CONFIG_E1000_SPI)
        struct e1000_hw *hw;
 #endif
        int cardnum;
@@ -5549,6 +5550,9 @@ static int do_e1000(cmd_tbl_t *cmdtp, int flag,
        }
 
 #ifdef CONFIG_E1000_SPI
+#ifdef CONFIG_DM_ETH
+       hw = dev_get_priv(dev);
+#endif
        /* Handle the "SPI" subcommand */
        if (!strcmp(argv[2], "spi"))
                return do_e1000_spi(cmdtp, hw, argc - 3, argv + 3);