]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: mv88e6xxx: rework Switch MAC setter
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>
Tue, 19 Jul 2016 00:45:34 +0000 (20:45 -0400)
committerDavid S. Miller <davem@davemloft.net>
Wed, 20 Jul 2016 02:42:01 +0000 (19:42 -0700)
commit42a824f115d8f15ef238dad1b89f28175b86e64d
treeffce44956ea29eba239b488a4c6822fdc37a0af2
parent2b5b8ec7179e11268036ac1451bcdeb726c2ee92
net: dsa: mv88e6xxx: rework Switch MAC setter

Switches such as 88E6185 as 3 Switch MAC registers in Global 1. Newer
chips such as 88E6352 have freed these registers in favor of an indirect
access in a Switch MAC/WoL/WoF register in Global 2.

Explicit this difference with G1 and G2 helpers and flags.

Also, note that this indirect access is a single-register which doesn't
require to wait for the operation to complete (like Switch MAC, Trunk
Mapping, etc.), in contrary to multi-registers indirect accesses with
several operations and a busy bit.

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