net: dsa: sja1105: Build PTP support in main DSA driver
As Arnd Bergmann pointed out in commit 78fe8a28fb
("net: dsa: sja1105:
fix ptp link error"), there is no point in having PTP support as a
separate loadable kernel module.
So remove the exported symbols and make sja1105.ko contain PTP support
or not based on CONFIG_NET_DSA_SJA1105_PTP.
Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
Acked-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
c881e10e3f
commit
3d64ea387c
@@ -77,7 +77,6 @@ int sja1105_get_ts_info(struct dsa_switch *ds, int port,
|
||||
info->phc_index = ptp_clock_index(priv->clock);
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(sja1105_get_ts_info);
|
||||
|
||||
int sja1105et_ptp_cmd(const void *ctx, const void *data)
|
||||
{
|
||||
@@ -95,7 +94,6 @@ int sja1105et_ptp_cmd(const void *ctx, const void *data)
|
||||
return sja1105_spi_send_packed_buf(priv, SPI_WRITE, regs->ptp_control,
|
||||
buf, SJA1105_SIZE_PTP_CMD);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(sja1105et_ptp_cmd);
|
||||
|
||||
int sja1105pqrs_ptp_cmd(const void *ctx, const void *data)
|
||||
{
|
||||
@@ -113,7 +111,6 @@ int sja1105pqrs_ptp_cmd(const void *ctx, const void *data)
|
||||
return sja1105_spi_send_packed_buf(priv, SPI_WRITE, regs->ptp_control,
|
||||
buf, SJA1105_SIZE_PTP_CMD);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(sja1105pqrs_ptp_cmd);
|
||||
|
||||
/* The switch returns partial timestamps (24 bits for SJA1105 E/T, which wrap
|
||||
* around in 0.135 seconds, and 32 bits for P/Q/R/S, wrapping around in 34.35
|
||||
@@ -146,7 +143,6 @@ u64 sja1105_tstamp_reconstruct(struct sja1105_private *priv, u64 now,
|
||||
|
||||
return ts_reconstructed;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(sja1105_tstamp_reconstruct);
|
||||
|
||||
/* Reads the SPI interface for an egress timestamp generated by the switch
|
||||
* for frames sent using management routes.
|
||||
@@ -219,7 +215,6 @@ int sja1105_ptpegr_ts_poll(struct sja1105_private *priv, int port, u64 *ts)
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(sja1105_ptpegr_ts_poll);
|
||||
|
||||
int sja1105_ptp_reset(struct sja1105_private *priv)
|
||||
{
|
||||
@@ -240,7 +235,6 @@ int sja1105_ptp_reset(struct sja1105_private *priv)
|
||||
|
||||
return rc;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(sja1105_ptp_reset);
|
||||
|
||||
static int sja1105_ptp_gettime(struct ptp_clock_info *ptp,
|
||||
struct timespec64 *ts)
|
||||
@@ -387,7 +381,6 @@ int sja1105_ptp_clock_register(struct sja1105_private *priv)
|
||||
|
||||
return sja1105_ptp_reset(priv);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(sja1105_ptp_clock_register);
|
||||
|
||||
void sja1105_ptp_clock_unregister(struct sja1105_private *priv)
|
||||
{
|
||||
@@ -397,8 +390,3 @@ void sja1105_ptp_clock_unregister(struct sja1105_private *priv)
|
||||
ptp_clock_unregister(priv->clock);
|
||||
priv->clock = NULL;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(sja1105_ptp_clock_unregister);
|
||||
|
||||
MODULE_AUTHOR("Vladimir Oltean <olteanv@gmail.com>");
|
||||
MODULE_DESCRIPTION("SJA1105 PHC Driver");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
|
Reference in New Issue
Block a user