colibri_imx6: fix video stdout in default environment
[oweals/u-boot.git] / examples / standalone / smc91111_eeprom.c
index afecbb12771a146b510505450cf954bfd61d07f9..bf7e93064309f2ef6b8fbf8bedc133da0a9b01b1 100644 (file)
@@ -1,18 +1,18 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * (C) Copyright 2004
  * Robin Getz rgetz@blacfin.uclinux.org
  *
- * SPDX-License-Identifier:    GPL-2.0+
- *
  * Heavily borrowed from the following peoples GPL'ed software:
  *  - Wolfgang Denk, DENX Software Engineering, wd@denx.de
- *       Das U-boot
+ *       Das U-Boot
  *  - Ladislav Michl ladis@linux-mips.org
  *       A rejected patch on the U-Boot mailing list
  */
 
 #include <common.h>
 #include <exports.h>
+#include <linux/delay.h>
 #include "../drivers/net/smc91111.h"
 
 #ifndef SMC91111_EEPROM_INIT
@@ -32,7 +32,7 @@ void print_MAC (struct eth_device *dev);
 int read_eeprom_reg (struct eth_device *dev, int reg);
 void print_macaddr (struct eth_device *dev);
 
-int smc91111_eeprom (int argc, char * const argv[])
+int smc91111_eeprom(int argc, char *const argv[])
 {
        int c, i, j, done, line, reg, value, start, what;
        char input[50];
@@ -238,7 +238,7 @@ void copy_from_eeprom (struct eth_device *dev)
                CTL_RELOAD, CTL_REG);
        i = 100;
        while ((SMC_inw (dev, CTL_REG) & CTL_RELOAD) && --i)
-               udelay (100);
+               udelay(100);
        if (i == 0) {
                printf ("Timeout Refreshing EEPROM registers\n");
        } else {
@@ -319,7 +319,7 @@ int read_eeprom_reg (struct eth_device *dev, int reg)
                CTL_RELOAD, CTL_REG);
        timeout = 100;
        while ((SMC_inw (dev, CTL_REG) & CTL_RELOAD) && --timeout)
-               udelay (100);
+               udelay(100);
        if (timeout == 0) {
                printf ("Timeout Reading EEPROM register %02x\n", reg);
                return 0;
@@ -342,7 +342,7 @@ int write_eeprom_reg (struct eth_device *dev, int value, int reg)
                CTL_STORE, CTL_REG);
        timeout = 100;
        while ((SMC_inw (dev, CTL_REG) & CTL_STORE) && --timeout)
-               udelay (100);
+               udelay(100);
        if (timeout == 0) {
                printf ("Timeout Writing EEPROM register %02x\n", reg);
                return 0;