diff options
author | Vladimir Oltean <vladimir.oltean@nxp.com> | 2021-05-24 16:14:21 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-05-24 23:59:04 +0300 |
commit | 1bf658eefe38cc26801b5861bbb6dbf3259ba8c1 (patch) | |
tree | 2523bc067febd258525ee169bb7d1c40c992bb41 /drivers/net/dsa/sja1105/sja1105_static_config.h | |
parent | 38fbe91f2287c696f290d9115901aa435f7166a8 (diff) | |
download | linux-1bf658eefe38cc26801b5861bbb6dbf3259ba8c1.tar.xz |
net: dsa: sja1105: allow the frame buffer size to be customized
The shared frame buffer of the SJA1110 is larger than that of SJA1105,
which is natural due to the fact that there are more ports.
Introduce yet another property in struct sja1105_info which encodes the
maximum number of 128 byte blocks that can be used for frame buffers.
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/sja1105/sja1105_static_config.h')
-rw-r--r-- | drivers/net/dsa/sja1105/sja1105_static_config.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/dsa/sja1105/sja1105_static_config.h b/drivers/net/dsa/sja1105/sja1105_static_config.h index 9bc783a2bbea..4ddb06bd8e92 100644 --- a/drivers/net/dsa/sja1105/sja1105_static_config.h +++ b/drivers/net/dsa/sja1105/sja1105_static_config.h @@ -115,7 +115,7 @@ enum sja1105_blk_idx { #define SJA1105PQRS_MAX_CBS_COUNT 16 #define SJA1105_MAX_FRAME_MEMORY 929 -#define SJA1105_MAX_FRAME_MEMORY_RETAGGING 910 +#define SJA1105_FRAME_MEMORY_RETAGGING_OVERHEAD 19 #define SJA1105_VL_FRAME_MEMORY 100 #define SJA1105E_DEVICE_ID 0x9C00000Cull @@ -416,7 +416,8 @@ typedef enum { extern const char *sja1105_static_config_error_msg[]; sja1105_config_valid_t -sja1105_static_config_check_valid(const struct sja1105_static_config *config); +sja1105_static_config_check_valid(const struct sja1105_static_config *config, + int max_mem); void sja1105_static_config_pack(void *buf, struct sja1105_static_config *config); int sja1105_static_config_init(struct sja1105_static_config *config, |