projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
drivers: net: keystone_net: drop non dm code
[oweals/u-boot.git]
/
cmd
/
mdio.c
diff --git
a/cmd/mdio.c
b/cmd/mdio.c
index fb13d050752a7f2abeb615101e76046257477fe5..184868063abdab7a6a1cbd6d084ebeb20af81f67 100644
(file)
--- a/
cmd/mdio.c
+++ b/
cmd/mdio.c
@@
-1,8
+1,7
@@
+// SPDX-License-Identifier: GPL-2.0+
/*
* (C) Copyright 2011 Freescale Semiconductor, Inc
* Andy Fleming
/*
* (C) Copyright 2011 Freescale Semiconductor, Inc
* Andy Fleming
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
/*
*/
/*
@@
-14,7
+13,6
@@
#include <miiphy.h>
#include <phy.h>
#include <miiphy.h>
#include <phy.h>
-
static char last_op[2];
static uint last_data;
static uint last_addr_lo;
static char last_op[2];
static uint last_data;
static uint last_addr_lo;
@@
-27,12
+25,12
@@
static uint last_reg_hi;
static int extract_range(char *input, int *plo, int *phi)
{
char *end;
static int extract_range(char *input, int *plo, int *phi)
{
char *end;
- *plo = simple_strtol(input, &end,
0
);
+ *plo = simple_strtol(input, &end,
16
);
if (end == input)
return -1;
if ((*end == '-') && *(++end))
if (end == input)
return -1;
if ((*end == '-') && *(++end))
- *phi = simple_strtol(end, NULL,
0
);
+ *phi = simple_strtol(end, NULL,
16
);
else if (*end == '\0')
*phi = *plo;
else
else if (*end == '\0')
*phi = *plo;
else
@@
-79,7
+77,7
@@
static int mdio_read_ranges(struct phy_device *phydev, struct mii_dev *bus,
printf("Reading from bus %s\n", bus->name);
for (addr = addrlo; addr <= addrhi; addr++) {
printf("Reading from bus %s\n", bus->name);
for (addr = addrlo; addr <= addrhi; addr++) {
- printf("PHY at address %
d
:\n", addr);
+ printf("PHY at address %
x
:\n", addr);
for (devad = devadlo; devad <= devadhi; devad++) {
for (reg = reglo; reg <= reghi; reg++) {
for (devad = devadlo; devad <= devadhi; devad++) {
for (reg = reglo; reg <= reghi; reg++) {
@@
-243,13
+241,13
@@
static int do_mdio(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
case 'r':
if (pos > 1)
if (extract_reg_range(argv[pos--], &devadlo, &devadhi,
case 'r':
if (pos > 1)
if (extract_reg_range(argv[pos--], &devadlo, &devadhi,
- ®lo, ®hi))
+
®lo, ®hi))
return -1;
default:
if (pos > 1)
return -1;
default:
if (pos > 1)
- if (extract_phy_range(&
(argv[2])
, pos - 1, &bus,
- &phydev, &addrlo, &addrhi))
+ if (extract_phy_range(&
argv[2]
, pos - 1, &bus,
+
&phydev, &addrlo, &addrhi))
return -1;
break;
return -1;
break;