mirror of
https://github.com/torvalds/linux.git
synced 2026-06-03 03:53:37 +02:00
net: ethernet: renesas: rcar_gen4_ptp: Hide private data from users
The Gen4 PTP helper module is already used by RTSN and RSWITCH to support PTP clocks and will be used by RAVB too. Hide the Gen4 PTP private data structure to make sure none of the users poke at it. This will be more important for RAVB use-cases as more then one RAVB device will need to cooperate using one PTP clock source. Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Link: https://patch.msgid.link/20260201183745.1075399-5-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
5640afa058
commit
9c2f568eb2
|
|
@ -9,6 +9,7 @@
|
|||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/ptp_clock_kernel.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
#include "rcar_gen4_ptp.h"
|
||||
|
|
@ -23,6 +24,15 @@
|
|||
#define PTPGPTPTM10_REG 0x0054
|
||||
#define PTPGPTPTM20_REG 0x0058
|
||||
|
||||
struct rcar_gen4_ptp_private {
|
||||
void __iomem *addr;
|
||||
struct ptp_clock *clock;
|
||||
struct ptp_clock_info info;
|
||||
spinlock_t lock; /* For multiple registers access */
|
||||
s64 default_addend;
|
||||
bool initialized;
|
||||
};
|
||||
|
||||
#define ptp_to_priv(ptp) container_of(ptp, struct rcar_gen4_ptp_private, info)
|
||||
|
||||
static int rcar_gen4_ptp_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
|
||||
|
|
|
|||
|
|
@ -7,16 +7,7 @@
|
|||
#ifndef __RCAR_GEN4_PTP_H__
|
||||
#define __RCAR_GEN4_PTP_H__
|
||||
|
||||
#include <linux/ptp_clock_kernel.h>
|
||||
|
||||
struct rcar_gen4_ptp_private {
|
||||
void __iomem *addr;
|
||||
struct ptp_clock *clock;
|
||||
struct ptp_clock_info info;
|
||||
spinlock_t lock; /* For multiple registers access */
|
||||
s64 default_addend;
|
||||
bool initialized;
|
||||
};
|
||||
struct rcar_gen4_ptp_private;
|
||||
|
||||
int rcar_gen4_ptp_register(struct rcar_gen4_ptp_private *ptp_priv, u32 rate);
|
||||
int rcar_gen4_ptp_unregister(struct rcar_gen4_ptp_private *ptp_priv);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user