]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
net: dsa: mv88e6xxx: introduce support for two chips using direct smi addressing
authorRasmus Villemoes <rasmus.villemoes@prevas.dk>
Tue, 4 Jun 2019 07:34:24 +0000 (07:34 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 5 Jun 2019 03:07:56 +0000 (20:07 -0700)
commitf30a19b828c645cdde1e7a7733dce1cab8bcb25a
treeb08ef587db6259666dbb41c55e3ae0f598668851
parentdf63b0d95ec59f47df3a8beaeb75557c4bc49c00
net: dsa: mv88e6xxx: introduce support for two chips using direct smi addressing

The 88e6250 (as well as 6220, 6071, 6070, 6020) do not support
multi-chip (indirect) addressing. However, one can still have two of
them on the same mdio bus, since the device only uses 16 of the 32
possible addresses, either addresses 0x00-0x0F or 0x10-0x1F depending
on the ADDR4 pin at reset [since ADDR4 is internally pulled high, the
latter is the default].

In order to prepare for supporting the 88e6250 and friends, introduce
mv88e6xxx_info::dual_chip to allow having a non-zero sw_addr while
still using direct addressing.

Reviewed-by: Vivien Didelot <vivien.didelot@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/mv88e6xxx/chip.h
drivers/net/dsa/mv88e6xxx/smi.c