In preparation for properly supporting switches
beyond the 88E6171.
Signed-off-by: Claudio Leite lei...@staticky.com
---
target/linux/generic/config-3.14 | 2 +-
target/linux/generic/config-3.18 | 2 +-
.../linux/generic/files/drivers/net/phy/mvsw6171.c | 866 -
.../linux/generic/files/drivers/net/phy/mvsw6171.h | 230 --
.../linux/generic/files/drivers/net/phy/mvsw61xx.c | 866 +
.../linux/generic/files/drivers/net/phy/mvsw61xx.h | 230 ++
.../generic/patches-3.14/733-phy_mvsw6171.patch| 23 -
.../generic/patches-3.14/733-phy_mvsw61xx.patch| 23 +
.../generic/patches-3.18/733-phy_mvsw6171.patch| 23 -
.../generic/patches-3.18/733-phy_mvsw61xx.patch| 23 +
target/linux/kirkwood/config-3.14 | 2 +-
target/linux/kirkwood/config-3.18 | 2 +-
.../linux/kirkwood/patches-3.14/160-ea4500.patch | 2 +-
.../linux/kirkwood/patches-3.18/160-ea4500.patch | 2 +-
14 files changed, 1148 insertions(+), 1148 deletions(-)
delete mode 100644 target/linux/generic/files/drivers/net/phy/mvsw6171.c
delete mode 100644 target/linux/generic/files/drivers/net/phy/mvsw6171.h
create mode 100644 target/linux/generic/files/drivers/net/phy/mvsw61xx.c
create mode 100644 target/linux/generic/files/drivers/net/phy/mvsw61xx.h
delete mode 100644 target/linux/generic/patches-3.14/733-phy_mvsw6171.patch
create mode 100644 target/linux/generic/patches-3.14/733-phy_mvsw61xx.patch
delete mode 100644 target/linux/generic/patches-3.18/733-phy_mvsw6171.patch
create mode 100644 target/linux/generic/patches-3.18/733-phy_mvsw61xx.patch
diff --git a/target/linux/generic/config-3.14 b/target/linux/generic/config-3.14
index 7b6055a..d888954 100644
--- a/target/linux/generic/config-3.14
+++ b/target/linux/generic/config-3.14
@@ -2144,7 +2144,7 @@ CONFIG_MTD_SPLIT_SQUASHFS_ROOT=y
# CONFIG_MUTEX_SPIN_ON_OWNER is not set
# CONFIG_MV643XX_ETH is not set
# CONFIG_MVMDIO is not set
-# CONFIG_MVSW6171_PHY is not set
+# CONFIG_MVSW61XX_PHY is not set
# CONFIG_MVSWITCH_PHY is not set
# CONFIG_MWAVE is not set
# CONFIG_MWL8K is not set
diff --git a/target/linux/generic/config-3.18 b/target/linux/generic/config-3.18
index ce2ec5c..ab9d071 100644
--- a/target/linux/generic/config-3.18
+++ b/target/linux/generic/config-3.18
@@ -2244,7 +2244,7 @@ CONFIG_MTD_SPLIT_SQUASHFS_ROOT=y
# CONFIG_MUTEX_SPIN_ON_OWNER is not set
# CONFIG_MV643XX_ETH is not set
# CONFIG_MVMDIO is not set
-# CONFIG_MVSW6171_PHY is not set
+# CONFIG_MVSW61XX_PHY is not set
# CONFIG_MVSWITCH_PHY is not set
# CONFIG_MWAVE is not set
# CONFIG_MWL8K is not set
diff --git a/target/linux/generic/files/drivers/net/phy/mvsw6171.c
b/target/linux/generic/files/drivers/net/phy/mvsw6171.c
deleted file mode 100644
index 48bb3fc..000
--- a/target/linux/generic/files/drivers/net/phy/mvsw6171.c
+++ /dev/null
@@ -1,866 +0,0 @@
-/*
- * Marvell 88E6171 switch driver
- *
- * Copyright (c) 2014 Claudio Leite lei...@staticky.com
- *
- * Based on code (c) 2008 Felix Fietkau n...@openwrt.org
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License v2 as published by the
- * Free Software Foundation
- */
-
-#include linux/kernel.h
-#include linux/module.h
-#include linux/init.h
-#include linux/list.h
-#include linux/mii.h
-#include linux/phy.h
-#include linux/of.h
-#include linux/of_mdio.h
-#include linux/delay.h
-#include linux/switch.h
-#include linux/device.h
-#include linux/platform_device.h
-
-#include mvsw6171.h
-
-MODULE_DESCRIPTION(Marvell 88E6171 Switch driver);
-MODULE_AUTHOR(Claudio Leite lei...@staticky.com);
-MODULE_LICENSE(GPL v2);
-MODULE_ALIAS(platform:mvsw6171);
-
-/*
- * Register access is done through direct or indirect addressing,
- * depending on how the switch is physically connected.
- *
- * Direct addressing: all port and global registers directly
- * accessible via an address/register pair
- *
- * Indirect addressing: switch is mapped at a single address,
- * port and global registers accessible via a single command/data
- * register pair
- */
-
-static int
-mvsw6171_wait_mask_raw(struct mii_bus *bus, int addr,
- int reg, u16 mask, u16 val)
-{
- int i = 100;
- u16 r;
-
- do {
- r = bus-read(bus, addr, reg);
- if ((r mask) == val)
- return 0;
- } while (--i 0);
-
- return -ETIMEDOUT;
-}
-
-static u16
-r16(struct mii_bus *bus, bool indirect, int base_addr, int addr, int reg)
-{
- u16 ind_addr;
-
- if (!indirect)
- return bus-read(bus, addr, reg);
-
- /* Indirect read: First, make sure switch is free */
- mvsw6171_wait_mask_raw(bus, base_addr, MV_INDIRECT_REG_CMD,
- MV_INDIRECT_INPROGRESS, 0);
-
- /* Load address and request read */
- ind_addr = MV_INDIRECT_READ | (addr