common: Drop linux/delay.h from common header
[oweals/u-boot.git] / drivers / qe / uec_phy.c
index e26218be88afc64e41d35c0fd99b0927bf33824f..69c22dd5e26177c18288b4b7a24933a70af8477d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright (C) 2005,2010-2011 Freescale Semiconductor, Inc.
  *
@@ -6,25 +7,20 @@
  * Description: UCC GETH Driver -- PHY handling
  *             Driver for UEC on QE
  *             Based on 8260_io/fcc_enet.c
- *
- * This program is free software; you can redistribute it and/or modify it
- * under  the terms of the GNU General  Public License as published by the
- * Free Software Foundation;  either version 2 of the  License, or (at your
- * option) any later version.
- *
  */
 
-#include "common.h"
-#include "net.h"
-#include "malloc.h"
-#include "asm/errno.h"
-#include "asm/immap_qe.h"
-#include "asm/io.h"
-#include "qe.h"
+#include <common.h>
+#include <net.h>
+#include <malloc.h>
+#include <linux/delay.h>
+#include <linux/errno.h>
+#include <linux/immap_qe.h>
+#include <asm/io.h>
 #include "uccf.h"
 #include "uec.h"
 #include "uec_phy.h"
 #include "miiphy.h"
+#include <fsl_qe.h>
 #include <phy.h>
 
 #define ugphy_printk(format, arg...)  \
@@ -85,7 +81,7 @@
 #endif
 
 struct fixed_phy_port {
-       char name[NAMESIZE];    /* ethernet port name */
+       char name[16];  /* ethernet port name */
        unsigned int speed;     /* specified speed 10,100 or 1000 */
        unsigned int duplex;    /* specified duplex FULL or HALF */
 };
@@ -880,7 +876,7 @@ void marvell_phy_interface_mode(struct eth_device *dev, phy_interface_t type,
                        uec_phy_write(mii_info, 0x04, 0x01e1);
                        uec_phy_write(mii_info, 0x00, 0x9140);
                        uec_phy_write(mii_info, 0x00, 0x1000);
-                       udelay (100000);
+                       mdelay(100);
                        uec_phy_write(mii_info, 0x00, 0x2900);
                        uec_phy_write(mii_info, 0x14, 0x0cd2);
                        uec_phy_write(mii_info, 0x00, 0xa100);
@@ -889,13 +885,13 @@ void marvell_phy_interface_mode(struct eth_device *dev, phy_interface_t type,
                        uec_phy_write(mii_info, 0x04, 0x05e1);
                        uec_phy_write(mii_info, 0x00, 0xa100);
                        uec_phy_write(mii_info, 0x00, 0x2100);
-                       udelay (1000000);
+                       mdelay(1000);
                } else if (speed == SPEED_10) {
                        uec_phy_write(mii_info, 0x14, 0x8e40);
                        uec_phy_write(mii_info, 0x1b, 0x800b);
                        uec_phy_write(mii_info, 0x14, 0x0c82);
                        uec_phy_write(mii_info, 0x00, 0x8100);
-                       udelay (1000000);
+                       mdelay(1000);
                }
        }