mirror of
https://github.com/torvalds/linux.git
synced 2026-04-30 04:22:32 -04:00
For AM65x SR2.0 it's required to enable IEP1 in raw 64bit mode which is used by PRU FW to monitor the link and apply w/a for 10M link issue. Note. No public errata available yet. Without this w/a the PRU FW will stuck if link state changes under TX traffic pressure. Hence, add support for 10M full duplex for AM65x SR2.0: - add new IEP API to enable IEP, but without PTP support - add pdata quirk_10m_link_issue to enable 10M link issue w/a. Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com> Reviewed-by: Roger Quadros <rogerq@kernel.org> Reviewed-by: Simon Horman <horms@kernel.org> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: MD Danish Anwar <danishanwar@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
42 lines
1.4 KiB
C
42 lines
1.4 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/* Texas Instruments ICSSG Industrial Ethernet Peripheral (IEP) Driver
|
|
*
|
|
* Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/
|
|
*
|
|
*/
|
|
|
|
#ifndef __NET_TI_ICSS_IEP_H
|
|
#define __NET_TI_ICSS_IEP_H
|
|
|
|
#include <linux/mutex.h>
|
|
#include <linux/ptp_clock_kernel.h>
|
|
#include <linux/regmap.h>
|
|
|
|
struct icss_iep;
|
|
extern const struct icss_iep_clockops prueth_iep_clockops;
|
|
|
|
/* Firmware specific clock operations */
|
|
struct icss_iep_clockops {
|
|
void (*settime)(void *clockops_data, u64 ns);
|
|
void (*adjtime)(void *clockops_data, s64 delta);
|
|
u64 (*gettime)(void *clockops_data, struct ptp_system_timestamp *sts);
|
|
int (*perout_enable)(void *clockops_data,
|
|
struct ptp_perout_request *req, int on,
|
|
u64 *cmp);
|
|
int (*extts_enable)(void *clockops_data, u32 index, int on);
|
|
};
|
|
|
|
struct icss_iep *icss_iep_get(struct device_node *np);
|
|
struct icss_iep *icss_iep_get_idx(struct device_node *np, int idx);
|
|
void icss_iep_put(struct icss_iep *iep);
|
|
int icss_iep_init(struct icss_iep *iep, const struct icss_iep_clockops *clkops,
|
|
void *clockops_data, u32 cycle_time_ns);
|
|
int icss_iep_exit(struct icss_iep *iep);
|
|
int icss_iep_get_count_low(struct icss_iep *iep);
|
|
int icss_iep_get_count_hi(struct icss_iep *iep);
|
|
int icss_iep_get_ptp_clock_idx(struct icss_iep *iep);
|
|
void icss_iep_init_fw(struct icss_iep *iep);
|
|
void icss_iep_exit_fw(struct icss_iep *iep);
|
|
|
|
#endif /* __NET_TI_ICSS_IEP_H */
|