net: dsa: mv88e6xxx: add SMI init helper
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>
Mon, 20 Jun 2016 17:14:07 +0000 (13:14 -0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 21 Jun 2016 07:58:29 +0000 (03:58 -0400)
commit4a70c4ab4fa49c07cbec519dfb9f9f90d2fec8d5
treeb2625670a76b599b45f930bf05f9ef834704d968
parent469d729f2a701e78d12b936bf0df63b8acae73c9
net: dsa: mv88e6xxx: add SMI init helper

Add an helper function to isolate SMI specific assignments and checks.

This function will later help choosing the different SMI accesses based
of the compatible info.

Since the chip structure is already allocated in the legacy probe, use
the mv88e6xxx_reg_read access routine instead of __mv88e6xxx_reg_read.

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.c