ice: Use PSM clock frequency to calculate RL profiles
authorBen Shelton <benjamin.h.shelton@intel.com>
Sat, 21 Nov 2020 00:39:33 +0000 (16:39 -0800)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Tue, 9 Feb 2021 00:27:01 +0000 (16:27 -0800)
commit4f8a14976aa4b3304e83ff9b4e0a466a3131df3c
tree2cedd9bfe03e46459e0aa8b5ff1396a8471e6548
parentb126bd6bcd6710aa984104e979a5c930f44561b4
ice: Use PSM clock frequency to calculate RL profiles

The core clock frequency is currently hardcoded at 446 MHz for the RL
profile calculations. This causes issues since not all devices use that
clock frequency. Read the GLGEN_CLKSTAT_SRC register to determine which PSM
clock frequency is selected.  This ensures that the rate limiter profile
calculations will be correct.

Signed-off-by: Ben Shelton <benjamin.h.shelton@intel.com>
Tested-by: Tony Brelinski <tonyx.brelinski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_common.c
drivers/net/ethernet/intel/ice/ice_hw_autogen.h
drivers/net/ethernet/intel/ice/ice_sched.c
drivers/net/ethernet/intel/ice/ice_sched.h
drivers/net/ethernet/intel/ice/ice_type.h