diff options
author | Daniel Machon <daniel.machon@microchip.com> | 2024-10-04 16:19:40 +0300 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2024-10-08 13:07:01 +0300 |
commit | 4b67bcb9094e74890483e55ea2aaf2d57c4df843 (patch) | |
tree | 434d68225618a8fb14dca4aa6da16da260fe170d /drivers/net/ethernet/microchip/sparx5/sparx5_pgid.c | |
parent | a0dd8906824b1131ad21d2d689d54628917ce8d1 (diff) | |
download | linux-4b67bcb9094e74890483e55ea2aaf2d57c4df843.tar.xz |
net: sparx5: add is_sparx5 macro and use it throughout
We dont want to ops out each time a function needs to do some platform
specifics. In particular we have a few places, where it would be
convenient to just branch out on the platform type. Add the function
is_sparx5() and, initially, use it for:
- register writes that should only be done on Sparx5 (QSYS_CAL_CTRL,
CLKGEN_LCPLL1_CORE_CLK).
- function calls that should only be done on Sparx5
(ethtool_op_get_ts_info())
- register writes that are chip-exclusive (MASK_CFG1/2, PGID_CFG1/2,
these are replicated for n_ports >32 on Sparx5).
The is_sparx5() function simply checks the target chip type, to
determine if this is a Sparx5 SKU or not.
Reviewed-by: Steen Hegelund <Steen.Hegelund@microchip.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Daniel Machon <daniel.machon@microchip.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'drivers/net/ethernet/microchip/sparx5/sparx5_pgid.c')
0 files changed, 0 insertions, 0 deletions