summaryrefslogtreecommitdiffstats
path: root/commands/miitool.c
diff options
context:
space:
mode:
Diffstat (limited to 'commands/miitool.c')
-rw-r--r--commands/miitool.c25
1 files changed, 6 insertions, 19 deletions
diff --git a/commands/miitool.c b/commands/miitool.c
index a87d567ace..24e383736a 100644
--- a/commands/miitool.c
+++ b/commands/miitool.c
@@ -1,10 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0-only
+// SPDX-FileCopyrightText: © 2012 Antony Pavlov <antonynpavlov@gmail.com>
+
/*
- * Copyright (C) 2012 Antony Pavlov <antonynpavlov@gmail.com>
- *
- * This file is part of barebox.
- * See file CREDITS for list of people who contributed to this
- * project.
- *
* This program is based on Donald Becker's "mii-diag" and
* David A. Hinds' "mii-tool".
*
@@ -13,16 +10,6 @@
*
* mii-diag is written/copyright 1997-2000 by Donald Becker
* <becker@scyld.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
*/
#include <common.h>
@@ -110,10 +97,10 @@ static int show_basic_mii(struct mii_bus *mii, struct phy_device *phydev,
/* Some bits in the BMSR are latched, but we can't rely on being
the only reader, so only the current values are meaningful */
- mii->read(mii, phydev->addr, MII_BMSR);
+ mdiobus_read(mii, phydev->addr, MII_BMSR);
for (i = 0; i < 32; i++)
- mii_val[i] = mii->read(mii, phydev->addr, i);
+ mii_val[i] = mdiobus_read(mii, phydev->addr, i);
printf((mii->parent->id) < 0 ? "%s: %s: " : "%s: %s%d: ",
phydev->cdev.name, mii->parent->name, mii->parent->id);
@@ -230,7 +217,7 @@ static int show_basic_mii(struct mii_bus *mii, struct phy_device *phydev,
return 0;
}
-static void mdiobus_show(struct device_d *dev, const char *phydevname,
+static void mdiobus_show(struct device *dev, const char *phydevname,
int verbose)
{
struct mii_bus *mii = to_mii_bus(dev);