* (C) Copyright 2011 Freescale Semiconductor, Inc
* Andy Fleming
*
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * 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.
- *
- * 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.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
+ * SPDX-License-Identifier: GPL-2.0+
*/
/*
return 0;
}
-int mdio_write_ranges(struct mii_dev *bus, int addrlo,
- int addrhi, int devadlo, int devadhi,
- int reglo, int reghi, unsigned short data)
+static int mdio_write_ranges(struct mii_dev *bus, int addrlo,
+ int addrhi, int devadlo, int devadhi,
+ int reglo, int reghi, unsigned short data)
{
int addr, devad, reg;
int err = 0;
return err;
}
-int mdio_read_ranges(struct mii_dev *bus, int addrlo,
- int addrhi, int devadlo, int devadhi,
- int reglo, int reghi)
+static int mdio_read_ranges(struct mii_dev *bus, int addrlo,
+ int addrhi, int devadlo, int devadhi,
+ int reglo, int reghi)
{
int addr, devad, reg;
for (devad = devadlo; devad <= devadhi; devad++) {
for (reg = reglo; reg <= reghi; reg++) {
- u16 val;
- val = bus->read(bus, addr, devad, reg);
+ int val;
+ val = bus->read(bus, addr, devad, reg);
if (val < 0) {
printf("Error\n");
}
/* The register will be in the form [a[-b].]x[-y] */
-int extract_reg_range(char *input, int *devadlo, int *devadhi,
- int *reglo, int *reghi)
+static int extract_reg_range(char *input, int *devadlo, int *devadhi,
+ int *reglo, int *reghi)
{
char *regstr;
return extract_range(regstr, reglo, reghi);
}
-int extract_phy_range(char *const argv[], int argc, struct mii_dev **bus,
- int *addrlo, int *addrhi)
+static int extract_phy_range(char *const argv[], int argc, struct mii_dev **bus,
+ int *addrlo, int *addrhi)
{
struct phy_device *phydev;
struct mii_dev *bus;
if (argc < 2)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
/*
* We use the last specified parameters, unless new ones are