diff options
author | Marek Vasut <marex@denx.de> | 2019-06-26 01:43:39 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-06-27 20:00:31 +0200 |
commit | 77972783fde317f10ad69f9cd2f6387c704f9581 (patch) | |
tree | 4ddb0f08a682b8e6f1dc8a14e4e23a61684bd5f1 /drivers/net/dsa | |
parent | Merge branch 'net-aquantia-implement-vlan-offloads' (diff) | |
download | linux-77972783fde317f10ad69f9cd2f6387c704f9581.tar.xz linux-77972783fde317f10ad69f9cd2f6387c704f9581.zip |
net: dsa: microchip: Remove ksz_{read,write}24()
These functions and callbacks are never used, remove them.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Tristram Ha <Tristram.Ha@microchip.com>
Cc: Woojung Huh <Woojung.Huh@microchip.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa')
-rw-r--r-- | drivers/net/dsa/microchip/ksz9477_spi.c | 25 | ||||
-rw-r--r-- | drivers/net/dsa/microchip/ksz_common.h | 22 | ||||
-rw-r--r-- | drivers/net/dsa/microchip/ksz_priv.h | 2 |
3 files changed, 0 insertions, 49 deletions
diff --git a/drivers/net/dsa/microchip/ksz9477_spi.c b/drivers/net/dsa/microchip/ksz9477_spi.c index 75178624d3f5..e7118319c192 100644 --- a/drivers/net/dsa/microchip/ksz9477_spi.c +++ b/drivers/net/dsa/microchip/ksz9477_spi.c @@ -73,37 +73,12 @@ static int ksz_spi_write(struct ksz_device *dev, u32 reg, void *data, return ksz9477_spi_write_reg(spi, reg, dev->txbuf, len); } -static int ksz_spi_read24(struct ksz_device *dev, u32 reg, u32 *val) -{ - int ret; - - *val = 0; - ret = ksz_spi_read(dev, reg, (u8 *)val, 3); - if (!ret) { - *val = be32_to_cpu(*val); - /* convert to 24bit */ - *val >>= 8; - } - - return ret; -} - -static int ksz_spi_write24(struct ksz_device *dev, u32 reg, u32 value) -{ - /* make it to big endian 24bit from MSB */ - value <<= 8; - value = cpu_to_be32(value); - return ksz_spi_write(dev, reg, &value, 3); -} - static const struct ksz_io_ops ksz9477_spi_ops = { .read8 = ksz_spi_read8, .read16 = ksz_spi_read16, - .read24 = ksz_spi_read24, .read32 = ksz_spi_read32, .write8 = ksz_spi_write8, .write16 = ksz_spi_write16, - .write24 = ksz_spi_write24, .write32 = ksz_spi_write32, .get = ksz_spi_get, .set = ksz_spi_set, diff --git a/drivers/net/dsa/microchip/ksz_common.h b/drivers/net/dsa/microchip/ksz_common.h index 21cd794e18f1..1781539c3a81 100644 --- a/drivers/net/dsa/microchip/ksz_common.h +++ b/drivers/net/dsa/microchip/ksz_common.h @@ -61,17 +61,6 @@ static inline int ksz_read16(struct ksz_device *dev, u32 reg, u16 *val) return ret; } -static inline int ksz_read24(struct ksz_device *dev, u32 reg, u32 *val) -{ - int ret; - - mutex_lock(&dev->reg_mutex); - ret = dev->ops->read24(dev, reg, val); - mutex_unlock(&dev->reg_mutex); - - return ret; -} - static inline int ksz_read32(struct ksz_device *dev, u32 reg, u32 *val) { int ret; @@ -105,17 +94,6 @@ static inline int ksz_write16(struct ksz_device *dev, u32 reg, u16 value) return ret; } -static inline int ksz_write24(struct ksz_device *dev, u32 reg, u32 value) -{ - int ret; - - mutex_lock(&dev->reg_mutex); - ret = dev->ops->write24(dev, reg, value); - mutex_unlock(&dev->reg_mutex); - - return ret; -} - static inline int ksz_write32(struct ksz_device *dev, u32 reg, u32 value) { int ret; diff --git a/drivers/net/dsa/microchip/ksz_priv.h b/drivers/net/dsa/microchip/ksz_priv.h index c615d2a81dd5..5ef6153bd2cc 100644 --- a/drivers/net/dsa/microchip/ksz_priv.h +++ b/drivers/net/dsa/microchip/ksz_priv.h @@ -105,11 +105,9 @@ struct ksz_device { struct ksz_io_ops { int (*read8)(struct ksz_device *dev, u32 reg, u8 *value); int (*read16)(struct ksz_device *dev, u32 reg, u16 *value); - int (*read24)(struct ksz_device *dev, u32 reg, u32 *value); int (*read32)(struct ksz_device *dev, u32 reg, u32 *value); int (*write8)(struct ksz_device *dev, u32 reg, u8 value); int (*write16)(struct ksz_device *dev, u32 reg, u16 value); - int (*write24)(struct ksz_device *dev, u32 reg, u32 value); int (*write32)(struct ksz_device *dev, u32 reg, u32 value); int (*get)(struct ksz_device *dev, u32 reg, void *data, size_t len); int (*set)(struct ksz_device *dev, u32 reg, void *data, size_t len); |