mlxsw: Move fw flashing code into core.c
authorJiri Pirko <jiri@nvidia.com>
Tue, 15 Sep 2020 08:40:52 +0000 (11:40 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 15 Sep 2020 22:57:16 +0000 (15:57 -0700)
commitb79cb787ac70adcbef0f3680365a588380eedb6f
treebb1e438ae6ddac8bc1d880dad166a0b3935e66c1
parenteab1924a2d3a5bf0d45d06d630e3b47c2d81ce2d
mlxsw: Move fw flashing code into core.c

As the firmware flashing is not specific to Spectrum, move the code to
core.c and avoid one op call and 2 exported symbols. Also, this allows
to do flash before call of driver->init function and possibly do other
core calls in between.

Do some small renaming here and there on the way to be consistent with
the rest of core.c code.

Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/core.c
drivers/net/ethernet/mellanox/mlxsw/core.h
drivers/net/ethernet/mellanox/mlxsw/spectrum.c
drivers/net/ethernet/mellanox/mlxsw/spectrum.h