mirror of
https://github.com/torvalds/linux.git
synced 2026-05-29 01:23:56 +02:00
Merge branch 'tja1103-improvewmentsa'
Vladimir Oltean says: ==================== Fixes and improvements to TJA1103 PHY driver This series contains: - an erratum workaround for the TJA1103 PHY integrated in SJA1110 - an adaptation of the driver so it prints less unnecessary information when probing on SJA1110 - a PTP RX timestamping bug fix and a clarification patch Targeting net-next since the PHY support is currently in net-next only. Changes in v3: Added one more patch which improves the readability of nxp_c45_reconstruct_ts. Changes in v2: Added a comment to the hardware workaround procedure. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
0b703008b5
|
|
@ -325,7 +325,7 @@ static void nxp_c45_reconstruct_ts(struct timespec64 *ts,
|
|||
{
|
||||
ts->tv_nsec = hwts->nsec;
|
||||
if ((ts->tv_sec & TS_SEC_MASK) < (hwts->sec & TS_SEC_MASK))
|
||||
ts->tv_sec -= BIT(2);
|
||||
ts->tv_sec -= TS_SEC_MASK + 1;
|
||||
ts->tv_sec &= ~TS_SEC_MASK;
|
||||
ts->tv_sec |= hwts->sec & TS_SEC_MASK;
|
||||
}
|
||||
|
|
@ -427,8 +427,8 @@ static long nxp_c45_do_aux_work(struct ptp_clock_info *ptp)
|
|||
nxp_c45_process_txts(priv, &hwts);
|
||||
}
|
||||
|
||||
nxp_c45_ptp_gettimex64(&priv->caps, &ts, NULL);
|
||||
while ((skb = skb_dequeue(&priv->rx_queue)) != NULL) {
|
||||
nxp_c45_ptp_gettimex64(&priv->caps, &ts, NULL);
|
||||
ts_raw = __be32_to_cpu(NXP_C45_SKB_CB(skb)->header->reserved2);
|
||||
hwts.sec = ts_raw >> 30;
|
||||
hwts.nsec = ts_raw & GENMASK(29, 0);
|
||||
|
|
@ -1035,6 +1035,12 @@ static int nxp_c45_config_init(struct phy_device *phydev)
|
|||
return ret;
|
||||
}
|
||||
|
||||
/* Bug workaround for SJA1110 rev B: enable write access
|
||||
* to MDIO_MMD_PMAPMD
|
||||
*/
|
||||
phy_write_mmd(phydev, MDIO_MMD_VEND1, 0x01F8, 1);
|
||||
phy_write_mmd(phydev, MDIO_MMD_VEND1, 0x01F9, 2);
|
||||
|
||||
phy_set_bits_mmd(phydev, MDIO_MMD_VEND1, VEND1_PHY_CONFIG,
|
||||
PHY_CONFIG_AUTO);
|
||||
|
||||
|
|
@ -1090,7 +1096,7 @@ static int nxp_c45_probe(struct phy_device *phydev)
|
|||
VEND1_PORT_ABILITIES);
|
||||
ptp_ability = !!(ptp_ability & PTP_ABILITY);
|
||||
if (!ptp_ability) {
|
||||
phydev_info(phydev, "the phy does not support PTP");
|
||||
phydev_dbg(phydev, "the phy does not support PTP");
|
||||
goto no_ptp_support;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user