net: dsa: bcm_sf2: Prepare for different register layouts
authorFlorian Fainelli <f.fainelli@gmail.com>
Fri, 20 Jan 2017 20:36:29 +0000 (12:36 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 22 Jan 2017 21:58:31 +0000 (16:58 -0500)
commita78e86ed586dba0808f765a9498f1fcd803f6ac6
tree5314cd7aa6e14c527fb7b0bb4a6172047d0caf7b
parent329b5c58f8b2833f330d64d5a2a1517a0c1e070e
net: dsa: bcm_sf2: Prepare for different register layouts

In preparation for supporting a new device with a slightly different
register layout, affecting the SWITCH_REG and SWITCH_CORE address
spaces, perform a few preparatory steps:

- allow matching the compatible string against a data description
- convert the SWITCH_REG register accesses into an indirection table
- prepare for supporting a SWITCH_CORE register alignment requirement

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/bcm_sf2.c
drivers/net/dsa/bcm_sf2.h
drivers/net/dsa/bcm_sf2_regs.h