net: dsa: mv88e6xxx: refine SMI support
authorVivien Didelot <vivien.didelot@gmail.com>
Fri, 3 May 2019 23:28:22 +0000 (19:28 -0400)
committerDavid S. Miller <davem@davemloft.net>
Mon, 6 May 2019 04:50:22 +0000 (21:50 -0700)
commite7ba0fad9c534bb3c3a4c3ee8ec8f60b6a224161
treee360861239328a9b03886bdf18ac9d95c39e83b5
parent7e6a95d31b191d81639b089b6ff7a7995bcb4ac3
net: dsa: mv88e6xxx: refine SMI support

The Marvell SOHO switches have several ways to access the internal
registers. One of them being the System Management Interface (SMI),
using the MDC and MDIO pins, with direct and indirect variants.

In preparation for adding support for other register accesses, move
the SMI code into its own files. At the same time, refine the code
to make it clear that the indirect variant is implemented using the
direct variant accessing only two registers for command and data.

Signed-off-by: Vivien Didelot <vivien.didelot@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/mv88e6xxx/Makefile
drivers/net/dsa/mv88e6xxx/chip.c
drivers/net/dsa/mv88e6xxx/chip.h
drivers/net/dsa/mv88e6xxx/smi.c [new file with mode: 0644]
drivers/net/dsa/mv88e6xxx/smi.h [new file with mode: 0644]