linux-imx/include/linux/fsl/ptp_netc.h
Wei Fang 9eb53327f2 LF-10640-6 ptp: add NETC PTP driver support for i.MX95
The i.MX95 NETC's Timer is different from the LS1028A NETC's Timer. In
addition to swapping the offsets of the upper 32-bit register and the
lower 32-bit register and adding ALRAM and FIPER control registers,
there are some main registers (such as the TMR_CTRL and TMR_ADD) that
are used in different ways even though they have the same functionality.

Yes, we can reuse the PTP driver of LS1028A and make some modifications
to support i.MX95 NETC's Timer, but this will undoubtedly increase the
complexity of the code and make the driver difficult to maintain. So we
have added a new driver named ptp_netc to support NETC Timer of i.MX95
and future i.MX SoCs such as i.MX943, i.MX952, etc.

Signed-off-by: Wei Fang <wei.fang@nxp.com>
Acked-by: Clark Wang <xiaoning.wang@nxp.com>
2023-11-22 10:13:31 +08:00

19 lines
436 B
C

/* SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) */
/* Copyright 2023 NXP
* Copyright (c) 2023 Wei Fang <wei.fang@nxp.com>
*/
#ifndef _PTP_NETC_H
#define _PTP_NETC_H
#if IS_ENABLED(CONFIG_PTP_1588_CLOCK_NETC)
int netc_timer_get_phc_index(int domain, unsigned int bus, unsigned int devfn);
#else
static inline int netc_timer_get_phc_index(int domain, unsigned int bus,
unsigned int devfn)
{
return -1;
}
#endif
#endif