mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
remove unused soc id enum. This is not needed anymore as we use different compatible str and associated static initialized data struct bug 5175333 Signed-off-by: Sheetal Tigadoli <stigadoli@nvidia.com> Change-Id: Ia6cd5cb8ab22f3c06373ea686e7a4f962e3b366e Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3337822 Reviewed-by: Vijay Mishra <vijaym@nvidia.com> GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com> Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com> Reviewed-by: svcacv <svcacv@nvidia.com> Reviewed-by: Kiran Kumar Bobbu <kbobbu@nvidia.com>
57 lines
2.5 KiB
C
57 lines
2.5 KiB
C
// SPDX-License-Identifier: GPL-2.0-only
|
|
// SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
|
|
|
#ifndef __NVPPS_COMMON_H__
|
|
#define __NVPPS_COMMON_H__
|
|
|
|
#include <linux/device.h>
|
|
#include <asm/arch_timer.h>
|
|
#include <linux/platform/tegra/ptp-notifier.h>
|
|
|
|
struct soc_dev_data;
|
|
|
|
/*
|
|
* chip specific ops
|
|
* @ptp_tsc_sync_cfg_fn: function pointer for PTP-TSC sync related TSC HW configuration
|
|
* @ptp_tsc_synchronize_fn: function pointer for triggering PTP-TSC synchronization
|
|
* @ptp_tsc_get_is_locked_fn: function pointer to get PTP-TSC sync status, return boolean true if PTP & TSC are synced else return boolean false
|
|
* @ptp_tsc_suspend_sync_fn: function pointer for suspending PTP-TSC synchronization
|
|
* @ptp_tsc_resume_sync_fn: function pointer for resuming PTP-TSC synchronization
|
|
* @get_monotonic_tsc_ts_fn: function pointer to get TSC monotonic timestamp in TSC Cycles, This API can be called in isr context
|
|
* @get_tsc_res_ns_fn: function pointer to get TSC resolution in nanoseconds
|
|
* @get_ptp_tsc_concurrent_ts_ns_fn: function pointer to get PTP-TSC concurrent timestamps in nanosecs, This API can be called in isr context
|
|
* @get_ptp_ts_ns_fn: function pointer to get PTP timestamp in nanoseconds, This API can be called in isr context
|
|
*/
|
|
struct chip_ops {
|
|
int32_t (*ptp_tsc_sync_cfg_fn)(struct soc_dev_data *soc_data);
|
|
void (*ptp_tsc_synchronize_fn)(struct soc_dev_data *soc_data);
|
|
bool (*ptp_tsc_get_is_locked_fn)(struct soc_dev_data *soc_data);
|
|
int32_t (*ptp_tsc_suspend_sync_fn)(struct soc_dev_data *soc_data);
|
|
int32_t (*ptp_tsc_resume_sync_fn)(struct soc_dev_data *soc_data);
|
|
int32_t (*get_monotonic_tsc_ts_fn)(struct soc_dev_data *soc_data, uint64_t *tsc_ts);
|
|
int32_t (*get_tsc_res_ns_fn)(struct soc_dev_data *soc_data, uint64_t *tsc_res_ns);
|
|
int32_t (*get_ptp_ts_ns_fn)(struct device_node *mac_node, uint64_t *ptp_ts);
|
|
int32_t (*get_ptp_tsc_concurrent_ts_ns_fn)(struct device_node *mac_node, struct ptp_tsc_data *data);
|
|
};
|
|
|
|
struct soc_dev_data {
|
|
/* nvpps device */
|
|
struct device *dev;
|
|
/* chip specific ops */
|
|
const struct chip_ops *ops;
|
|
/* Variable to hold mmapped addr of TSC registers */
|
|
void __iomem *reg_map_base;
|
|
/* Variable to hold base pa of primary MAC interface */
|
|
uint64_t pri_mac_base_pa;
|
|
/* variable to hold configured lock threshold value
|
|
* which is to be programmed in the TSC register
|
|
*/
|
|
uint32_t lock_threshold_val;
|
|
/* variable which defines the number of the pulse per second of
|
|
* input signal, from MAC interface to TSC
|
|
*/
|
|
uint32_t pps_freq;
|
|
};
|
|
|
|
#endif /* __NVPPS_COMMON_H__ */
|