> -----Original Message-----
> From: Zhang, Qi Z <[email protected]>
> Sent: Tuesday, August 10, 2021 10:51
> To: Yang, Qiming <[email protected]>
> Cc: Guo, Junfeng <[email protected]>; [email protected]; Zhang, Qi Z
> <[email protected]>; Keller, Jacob E <[email protected]>
> Subject: [PATCH 07/28] net/ice/base: add accessors to get/set the time
> reference
>
> The E822 device clock might come from a variety of different sources,
> called TIME_REFs. The firmware reports the current TIME_REF as part of
> its function capabilities, which the driver caches when it loads.
>
> Add an accessor function to look up the current TIME_REF from the
> capabilities. This reduces line length significantly and also avoids
> a tight coupling to the capabilities structure.
>
> In some cases, TIME_REF might change at run time. This can occur in the
> event that the CGU registers are updated. When this happens, its
> possible that the capabilities structure can be out of date until the
> capabilities are re-read.
>
> Add an setter function to update the TIME_REF when this occurs. The
> driver can call this function after updating the CGU to ensure that the
> TIME_REF in the capabilities structure is up to date, without needing to
> re-read the entire capabilities from firmware.
>
> Signed-off-by: Jacob Keller <[email protected]>
> Signed-off-by: Qi Zhang <[email protected]>
> ---
> drivers/net/ice/base/ice_ptp_hw.h | 25 +++++++++++++++++++++++++
> 1 file changed, 25 insertions(+)
>
> --
> 2.26.2
Acked-by: Junfeng Guo <[email protected]>
Regards,
Junfeng Guo