mirror of
https://github.com/torvalds/linux.git
synced 2026-05-25 15:41:52 +02:00
net: phy: mscc: use new phy_package_shared getters
Use the new getters for members of struct phy_package_shared. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Link: https://patch.msgid.link/61ee43ec-be20-4be1-bfad-d18d2a4fae2b@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
dc5a6164fe
commit
e0327e9f85
|
|
@ -17,6 +17,7 @@
|
|||
#include <linux/udp.h>
|
||||
#include <linux/unaligned.h>
|
||||
|
||||
#include "../phylib.h"
|
||||
#include "mscc.h"
|
||||
#include "mscc_ptp.h"
|
||||
|
||||
|
|
@ -645,11 +646,12 @@ static int __vsc85xx_gettime(struct ptp_clock_info *info, struct timespec64 *ts)
|
|||
{
|
||||
struct vsc85xx_ptp *ptp = container_of(info, struct vsc85xx_ptp, caps);
|
||||
struct phy_device *phydev = ptp->phydev;
|
||||
struct vsc85xx_shared_private *shared =
|
||||
(struct vsc85xx_shared_private *)phydev->shared->priv;
|
||||
struct vsc8531_private *priv = phydev->priv;
|
||||
struct vsc85xx_shared_private *shared;
|
||||
u32 val;
|
||||
|
||||
shared = phy_package_get_priv(phydev);
|
||||
|
||||
val = vsc85xx_ts_read_csr(phydev, PROCESSOR, MSCC_PHY_PTP_LTC_CTRL);
|
||||
val |= PTP_LTC_CTRL_SAVE_ENA;
|
||||
vsc85xx_ts_write_csr(phydev, PROCESSOR, MSCC_PHY_PTP_LTC_CTRL, val);
|
||||
|
|
@ -696,11 +698,12 @@ static int __vsc85xx_settime(struct ptp_clock_info *info,
|
|||
{
|
||||
struct vsc85xx_ptp *ptp = container_of(info, struct vsc85xx_ptp, caps);
|
||||
struct phy_device *phydev = ptp->phydev;
|
||||
struct vsc85xx_shared_private *shared =
|
||||
(struct vsc85xx_shared_private *)phydev->shared->priv;
|
||||
struct vsc8531_private *priv = phydev->priv;
|
||||
struct vsc85xx_shared_private *shared;
|
||||
u32 val;
|
||||
|
||||
shared = phy_package_get_priv(phydev);
|
||||
|
||||
vsc85xx_ts_write_csr(phydev, PROCESSOR, MSCC_PHY_PTP_LTC_LOAD_SEC_MSB,
|
||||
PTP_LTC_LOAD_SEC_MSB(ts->tv_sec));
|
||||
vsc85xx_ts_write_csr(phydev, PROCESSOR, MSCC_PHY_PTP_LTC_LOAD_SEC_LSB,
|
||||
|
|
@ -1580,8 +1583,7 @@ int vsc8584_ptp_probe(struct phy_device *phydev)
|
|||
|
||||
int vsc8584_ptp_probe_once(struct phy_device *phydev)
|
||||
{
|
||||
struct vsc85xx_shared_private *shared =
|
||||
(struct vsc85xx_shared_private *)phydev->shared->priv;
|
||||
struct vsc85xx_shared_private *shared = phy_package_get_priv(phydev);
|
||||
|
||||
/* Initialize shared GPIO lock */
|
||||
mutex_init(&shared->gpio_lock);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user