aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>2016-09-29 12:21:59 -0400
committerDavid S. Miller <davem@davemloft.net>2016-09-30 01:26:00 -0400
commitc08026aba70a97925512266d29429dbd62df497d (patch)
tree94918ca4e0542b24d2cc668a985c145669ed19da
parentb4e47c0fb94923781addbb4616fa82fd825ac7ec (diff)
net: dsa: mv88e6xxx: rename mv88e6xxx_ops
The mv88e6xxx_ops is used to describe how to access the chip registers. It can be through SMI (via an MDIO bus), or via another interface such as crafted remote management frames. The correct BUS operations structure is chosen at runtime, depending on the chip address and connectivity. We will need the mv88e6xxx_ops name for future chip-wide operation structure, thus rename mv88e6xxx_ops to more explicit mv88e6xxx_bus_ops. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/dsa/mv88e6xxx/chip.c10
-rw-r--r--drivers/net/dsa/mv88e6xxx/mv88e6xxx.h8
2 files changed, 9 insertions, 9 deletions
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
index d805661af3cc..ad31d3ed3aca 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -98,7 +98,7 @@ static int mv88e6xxx_smi_single_chip_write(struct mv88e6xxx_chip *chip,
98 return 0; 98 return 0;
99} 99}
100 100
101static const struct mv88e6xxx_ops mv88e6xxx_smi_single_chip_ops = { 101static const struct mv88e6xxx_bus_ops mv88e6xxx_smi_single_chip_ops = {
102 .read = mv88e6xxx_smi_single_chip_read, 102 .read = mv88e6xxx_smi_single_chip_read,
103 .write = mv88e6xxx_smi_single_chip_write, 103 .write = mv88e6xxx_smi_single_chip_write,
104}; 104};
@@ -180,7 +180,7 @@ static int mv88e6xxx_smi_multi_chip_write(struct mv88e6xxx_chip *chip,
180 return 0; 180 return 0;
181} 181}
182 182
183static const struct mv88e6xxx_ops mv88e6xxx_smi_multi_chip_ops = { 183static const struct mv88e6xxx_bus_ops mv88e6xxx_smi_multi_chip_ops = {
184 .read = mv88e6xxx_smi_multi_chip_read, 184 .read = mv88e6xxx_smi_multi_chip_read,
185 .write = mv88e6xxx_smi_multi_chip_write, 185 .write = mv88e6xxx_smi_multi_chip_write,
186}; 186};
@@ -515,7 +515,7 @@ static int mv88e6xxx_phy_ppu_write(struct mv88e6xxx_chip *chip, int addr,
515 return err; 515 return err;
516} 516}
517 517
518static const struct mv88e6xxx_ops mv88e6xxx_phy_ppu_ops = { 518static const struct mv88e6xxx_bus_ops mv88e6xxx_phy_ppu_ops = {
519 .read = mv88e6xxx_phy_ppu_read, 519 .read = mv88e6xxx_phy_ppu_read,
520 .write = mv88e6xxx_phy_ppu_write, 520 .write = mv88e6xxx_phy_ppu_write,
521}; 521};
@@ -3479,12 +3479,12 @@ static struct mv88e6xxx_chip *mv88e6xxx_alloc_chip(struct device *dev)
3479 return chip; 3479 return chip;
3480} 3480}
3481 3481
3482static const struct mv88e6xxx_ops mv88e6xxx_g2_smi_phy_ops = { 3482static const struct mv88e6xxx_bus_ops mv88e6xxx_g2_smi_phy_ops = {
3483 .read = mv88e6xxx_g2_smi_phy_read, 3483 .read = mv88e6xxx_g2_smi_phy_read,
3484 .write = mv88e6xxx_g2_smi_phy_write, 3484 .write = mv88e6xxx_g2_smi_phy_write,
3485}; 3485};
3486 3486
3487static const struct mv88e6xxx_ops mv88e6xxx_phy_ops = { 3487static const struct mv88e6xxx_bus_ops mv88e6xxx_phy_ops = {
3488 .read = mv88e6xxx_read, 3488 .read = mv88e6xxx_read,
3489 .write = mv88e6xxx_write, 3489 .write = mv88e6xxx_write,
3490}; 3490};
diff --git a/drivers/net/dsa/mv88e6xxx/mv88e6xxx.h b/drivers/net/dsa/mv88e6xxx/mv88e6xxx.h
index ee7873aaf127..b9ef769311d9 100644
--- a/drivers/net/dsa/mv88e6xxx/mv88e6xxx.h
+++ b/drivers/net/dsa/mv88e6xxx/mv88e6xxx.h
@@ -648,7 +648,7 @@ struct mv88e6xxx_vtu_entry {
648 u8 data[DSA_MAX_PORTS]; 648 u8 data[DSA_MAX_PORTS];
649}; 649};
650 650
651struct mv88e6xxx_ops; 651struct mv88e6xxx_bus_ops;
652 652
653struct mv88e6xxx_priv_port { 653struct mv88e6xxx_priv_port {
654 struct net_device *bridge_dev; 654 struct net_device *bridge_dev;
@@ -669,14 +669,14 @@ struct mv88e6xxx_chip {
669 /* The MII bus and the address on the bus that is used to 669 /* The MII bus and the address on the bus that is used to
670 * communication with the switch 670 * communication with the switch
671 */ 671 */
672 const struct mv88e6xxx_ops *smi_ops; 672 const struct mv88e6xxx_bus_ops *smi_ops;
673 struct mii_bus *bus; 673 struct mii_bus *bus;
674 int sw_addr; 674 int sw_addr;
675 675
676 /* Handles automatic disabling and re-enabling of the PHY 676 /* Handles automatic disabling and re-enabling of the PHY
677 * polling unit. 677 * polling unit.
678 */ 678 */
679 const struct mv88e6xxx_ops *phy_ops; 679 const struct mv88e6xxx_bus_ops *phy_ops;
680 struct mutex ppu_mutex; 680 struct mutex ppu_mutex;
681 int ppu_disabled; 681 int ppu_disabled;
682 struct work_struct ppu_work; 682 struct work_struct ppu_work;
@@ -705,7 +705,7 @@ struct mv88e6xxx_chip {
705 struct mii_bus *mdio_bus; 705 struct mii_bus *mdio_bus;
706}; 706};
707 707
708struct mv88e6xxx_ops { 708struct mv88e6xxx_bus_ops {
709 int (*read)(struct mv88e6xxx_chip *chip, int addr, int reg, u16 *val); 709 int (*read)(struct mv88e6xxx_chip *chip, int addr, int reg, u16 *val);
710 int (*write)(struct mv88e6xxx_chip *chip, int addr, int reg, u16 val); 710 int (*write)(struct mv88e6xxx_chip *chip, int addr, int reg, u16 val);
711}; 711};