OSDN Git Service

net: mscc: ocelot: remove unneeded VCAP parameters for IS2
authorVladimir Oltean <vladimir.oltean@nxp.com>
Tue, 29 Sep 2020 22:27:27 +0000 (01:27 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 30 Sep 2020 01:26:24 +0000 (18:26 -0700)
Now that we are deriving these from the constants exposed by the
hardware, we can delete the static info we're keeping in the driver.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/ocelot/felix_vsc9959.c
drivers/net/dsa/ocelot/seville_vsc9953.c
drivers/net/ethernet/mscc/ocelot_vsc7514.c

index eef056b..738e618 100644 (file)
@@ -16,9 +16,6 @@
 #include <linux/pci.h>
 #include "felix.h"
 
-#define VSC9959_VCAP_IS2_CNT           1024
-#define VSC9959_VCAP_IS2_ENTRY_WIDTH   376
-#define VSC9959_VCAP_PORT_CNT          6
 #define VSC9959_TAS_GCL_ENTRY_MAX      63
 
 static const u32 vsc9959_ana_regmap[] = {
@@ -851,13 +848,6 @@ static struct vcap_props vsc9959_vcap_props[] = {
                .actions = vsc9959_vcap_is1_actions,
        },
        [VCAP_IS2] = {
-               .tg_width = 2,
-               .sw_count = 4,
-               .entry_count = VSC9959_VCAP_IS2_CNT,
-               .entry_width = VSC9959_VCAP_IS2_ENTRY_WIDTH,
-               .action_count = VSC9959_VCAP_IS2_CNT +
-                               VSC9959_VCAP_PORT_CNT + 2,
-               .action_width = 89,
                .action_type_width = 1,
                .action_table = {
                        [IS2_ACTION_TYPE_NORMAL] = {
@@ -869,8 +859,6 @@ static struct vcap_props vsc9959_vcap_props[] = {
                                .count = 4
                        },
                },
-               .counter_words = 4,
-               .counter_width = 32,
                .target = S2,
                .keys = vsc9959_vcap_is2_keys,
                .actions = vsc9959_vcap_is2_actions,
index 97e3a0f..579eb7f 100644 (file)
 #include <linux/iopoll.h>
 #include "felix.h"
 
-#define VSC9953_VCAP_IS2_CNT                   1024
-#define VSC9953_VCAP_IS2_ENTRY_WIDTH           376
-#define VSC9953_VCAP_PORT_CNT                  10
-
 #define MSCC_MIIM_CMD_OPR_WRITE                        BIT(1)
 #define MSCC_MIIM_CMD_OPR_READ                 BIT(2)
 #define MSCC_MIIM_CMD_WRDATA_SHIFT             4
@@ -841,13 +837,6 @@ static struct vcap_props vsc9953_vcap_props[] = {
                .actions = vsc9953_vcap_is1_actions,
        },
        [VCAP_IS2] = {
-               .tg_width = 2,
-               .sw_count = 4,
-               .entry_count = VSC9953_VCAP_IS2_CNT,
-               .entry_width = VSC9953_VCAP_IS2_ENTRY_WIDTH,
-               .action_count = VSC9953_VCAP_IS2_CNT +
-                               VSC9953_VCAP_PORT_CNT + 2,
-               .action_width = 101,
                .action_type_width = 1,
                .action_table = {
                        [IS2_ACTION_TYPE_NORMAL] = {
@@ -859,8 +848,6 @@ static struct vcap_props vsc9953_vcap_props[] = {
                                .count = 4
                        },
                },
-               .counter_words = 4,
-               .counter_width = 32,
                .target = S2,
                .keys = vsc9953_vcap_is2_keys,
                .actions = vsc9953_vcap_is2_actions,
index 36332bc..086cdde 100644 (file)
 #include "ocelot.h"
 
 #define IFH_EXTRACT_BITFIELD64(x, o, w) (((x) >> (o)) & GENMASK_ULL((w) - 1, 0))
-#define VSC7514_VCAP_IS2_CNT 64
-#define VSC7514_VCAP_IS2_ENTRY_WIDTH 376
-#define VSC7514_VCAP_IS2_ACTION_WIDTH 99
-#define VSC7514_VCAP_PORT_CNT 11
 
 static const u32 ocelot_ana_regmap[] = {
        REG(ANA_ADVLEARN,                               0x009000),
@@ -1000,13 +996,6 @@ static struct vcap_props vsc7514_vcap_props[] = {
                .actions = vsc7514_vcap_is1_actions,
        },
        [VCAP_IS2] = {
-               .tg_width = 2,
-               .sw_count = 4,
-               .entry_count = VSC7514_VCAP_IS2_CNT,
-               .entry_width = VSC7514_VCAP_IS2_ENTRY_WIDTH,
-               .action_count = VSC7514_VCAP_IS2_CNT +
-                               VSC7514_VCAP_PORT_CNT + 2,
-               .action_width = 99,
                .action_type_width = 1,
                .action_table = {
                        [IS2_ACTION_TYPE_NORMAL] = {
@@ -1018,8 +1007,6 @@ static struct vcap_props vsc7514_vcap_props[] = {
                                .count = 4
                        },
                },
-               .counter_words = 4,
-               .counter_width = 32,
                .target = S2,
                .keys = vsc7514_vcap_is2_keys,
                .actions = vsc7514_vcap_is2_actions,