net: dsa: mv88e6xxx: add MV88E6097 switch
authorStefan Eichenberger <eichest@gmail.com>
Tue, 22 Nov 2016 16:47:21 +0000 (17:47 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 24 Nov 2016 20:28:45 +0000 (15:28 -0500)
Add support for the MV88E6097 switch. The change was tested on an Armada
based platform with a MV88E6097 switch.

Signed-off-by: Stefan Eichenberger <stefan.eichenberger@netmodule.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/mv88e6xxx/chip.c
drivers/net/dsa/mv88e6xxx/mv88e6xxx.h

index bada6465af59975539ad0397a63376c8d76a7b9a..b14b3d5099c809604680b08d10536f61a54f2e23 100644 (file)
@@ -3209,6 +3209,19 @@ static const struct mv88e6xxx_ops mv88e6095_ops = {
        .stats_get_stats = mv88e6095_stats_get_stats,
 };
 
+static const struct mv88e6xxx_ops mv88e6097_ops = {
+       .set_switch_mac = mv88e6xxx_g2_set_switch_mac,
+       .phy_read = mv88e6xxx_g2_smi_phy_read,
+       .phy_write = mv88e6xxx_g2_smi_phy_write,
+       .port_set_link = mv88e6xxx_port_set_link,
+       .port_set_duplex = mv88e6xxx_port_set_duplex,
+       .port_set_speed = mv88e6185_port_set_speed,
+       .stats_snapshot = mv88e6xxx_g1_stats_snapshot,
+       .stats_get_sset_count = mv88e6095_stats_get_sset_count,
+       .stats_get_strings = mv88e6095_stats_get_strings,
+       .stats_get_stats = mv88e6095_stats_get_stats,
+};
+
 static const struct mv88e6xxx_ops mv88e6123_ops = {
        /* MV88E6XXX_FAMILY_6165 */
        .set_switch_mac = mv88e6xxx_g2_set_switch_mac,
@@ -3580,6 +3593,19 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
                .ops = &mv88e6095_ops,
        },
 
+       [MV88E6097] = {
+               .prod_num = PORT_SWITCH_ID_PROD_NUM_6097,
+               .family = MV88E6XXX_FAMILY_6097,
+               .name = "Marvell 88E6097/88E6097F",
+               .num_databases = 4096,
+               .num_ports = 11,
+               .port_base_addr = 0x10,
+               .global1_addr = 0x1b,
+               .age_time_coeff = 15000,
+               .flags = MV88E6XXX_FLAGS_FAMILY_6097,
+               .ops = &mv88e6097_ops,
+       },
+
        [MV88E6123] = {
                .prod_num = PORT_SWITCH_ID_PROD_NUM_6123,
                .family = MV88E6XXX_FAMILY_6165,
index 9298faa5878b9f193c6c142363eb1c6eba72cff0..ab52c3772c7879b49e2dc8311ad97466c8bd228b 100644 (file)
@@ -81,6 +81,7 @@
 #define PORT_SWITCH_ID         0x03
 #define PORT_SWITCH_ID_PROD_NUM_6085   0x04a
 #define PORT_SWITCH_ID_PROD_NUM_6095   0x095
+#define PORT_SWITCH_ID_PROD_NUM_6097   0x099
 #define PORT_SWITCH_ID_PROD_NUM_6131   0x106
 #define PORT_SWITCH_ID_PROD_NUM_6320   0x115
 #define PORT_SWITCH_ID_PROD_NUM_6123   0x121
 enum mv88e6xxx_model {
        MV88E6085,
        MV88E6095,
+       MV88E6097,
        MV88E6123,
        MV88E6131,
        MV88E6161,