net: dsa: microchip: ksz9477: cleanup the ksz9477_switch_detect
authorArun Ramadoss <arun.ramadoss@microchip.com>
Fri, 17 Jun 2022 08:42:45 +0000 (14:12 +0530)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 21 Jun 2022 13:26:44 +0000 (15:26 +0200)
commit27faa0aa85f6696d411bbbebaed9f0f723c2a175
tree9a9e9448e0f5c2a07e3efd8f0e5f3c6a633ff931
parent00bb2920cf6a6ed14100822f0e7feaf5e53a9795
net: dsa: microchip: ksz9477: cleanup the ksz9477_switch_detect

The ksz9477_switch_detect performs the detecting the chip id from the
location 0x00 and also check gigabit compatibility check & number of
ports based on the register global_options0. To prepare the common ksz
switch detect function, routine other than chip id read is moved to
ksz9477_switch_init.

Signed-off-by: Arun Ramadoss <arun.ramadoss@microchip.com>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/dsa/microchip/ksz9477.c