net: dsa: mv88e6xxx: add a cascade port op
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>
Wed, 9 May 2018 15:38:49 +0000 (11:38 -0400)
committerDavid S. Miller <davem@davemloft.net>
Thu, 10 May 2018 20:12:31 +0000 (16:12 -0400)
commit02317e68369b0feecc18e791016d38a8e4df35f7
treec8741a3bcaa42c6d718851ec1976d674ca652b41
parent79a6fd232748c5ece3c20c04855d181d81bec348
net: dsa: mv88e6xxx: add a cascade port op

Only the 88E6185 family has bits 15:12 Cascade Port bits in the Global
Control 2 register. Hence inconsistent values are actually written in
this register for other families.

Add a .set_cascade_port operation to isolate the 88E6185 case, and call
it from the device mapping setup function.

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/chip.h
drivers/net/dsa/mv88e6xxx/global1.c
drivers/net/dsa/mv88e6xxx/global1.h