]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: mv88e6xxx: add G1 helper for ageing time
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>
Tue, 19 Jul 2016 00:45:39 +0000 (20:45 -0400)
committerDavid S. Miller <davem@davemloft.net>
Wed, 20 Jul 2016 02:42:02 +0000 (19:42 -0700)
commit64d7278ec0dd9367278877ac626751208b5bf715
treec5c7d60622932c703731d6f60767212ce3c708a7
parentd853c5a028a83305ed632fc5299b3915c8f63d25
net: dsa: mv88e6xxx: add G1 helper for ageing time

All Marvell switch chips from (88E6060 to 88E6390) have a ATU Control
register containing bits 11:4 to configure an ATU Age Time quotient.

However the coefficient used to calculate the ATU Age Time vary with the
models. E.g. 88E606088E6352 and 88E6390 use respectively 16, 15 and
3.75 seconds.

Add a age_time_coeff to the info structure to handle this and a Global 1
helper to set the default age time of 5 minutes in the setup code.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/mv88e6xxx/chip.c
drivers/net/dsa/mv88e6xxx/mv88e6xxx.h