On 4/8/2025 3:30 AM, Milena Olech wrote:
> +static int idpf_ptp_read_src_clk_reg_mailbox(struct idpf_adapter *adapter,
> +                                          struct ptp_system_timestamp *sts,
> +                                          u64 *src_clk)
> +{
> +     struct idpf_ptp_dev_timers clk_time;
> +     int err;
> +
> +     /* Read the system timestamp pre PHC read */
> +     ptp_read_system_prets(sts);
> +
> +     err = idpf_ptp_get_dev_clk_time(adapter, &clk_time);
> +     if (err)
> +             return err;
> +
> +     /* Read the system timestamp post PHC read */
> +     ptp_read_system_postts(sts);
> +
> +     *src_clk = clk_time.dev_clk_time_ns;
> +
> +     return 0;
> +}
Not an objection, since its obvious using the direct register access is
preferable when it is available. This will result in a fair amount of
jitter since mailbox timing is unlikely to be consistent. We also cannot
have sts be filled in somehow by the host because it might not be
operating on the same system clock.

Reply via email to