Commit 180f539d authored by Yangbo Lu's avatar Yangbo Lu Committed by David S. Miller

net: dpaa2: rename rtc as ptp in dpaa2-ptp driver

In dpaa2-ptp driver, it's odd to use rtc in names of
some functions and structures except these dprtc APIs.
This patch is to use ptp instead of rtc in names.
Signed-off-by: default avatarYangbo Lu <yangbo.lu@nxp.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 58b1e729
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
#include "dpaa2-ptp.h" #include "dpaa2-ptp.h"
struct ptp_dpaa2_priv { struct ptp_dpaa2_priv {
struct fsl_mc_device *rtc_mc_dev; struct fsl_mc_device *ptp_mc_dev;
struct ptp_clock *clock; struct ptp_clock *clock;
struct ptp_clock_info caps; struct ptp_clock_info caps;
u32 freq_comp; u32 freq_comp;
...@@ -23,7 +23,7 @@ static int ptp_dpaa2_adjfreq(struct ptp_clock_info *ptp, s32 ppb) ...@@ -23,7 +23,7 @@ static int ptp_dpaa2_adjfreq(struct ptp_clock_info *ptp, s32 ppb)
{ {
struct ptp_dpaa2_priv *ptp_dpaa2 = struct ptp_dpaa2_priv *ptp_dpaa2 =
container_of(ptp, struct ptp_dpaa2_priv, caps); container_of(ptp, struct ptp_dpaa2_priv, caps);
struct fsl_mc_device *mc_dev = ptp_dpaa2->rtc_mc_dev; struct fsl_mc_device *mc_dev = ptp_dpaa2->ptp_mc_dev;
struct device *dev = &mc_dev->dev; struct device *dev = &mc_dev->dev;
u64 adj; u64 adj;
u32 diff, tmr_add; u32 diff, tmr_add;
...@@ -53,7 +53,7 @@ static int ptp_dpaa2_adjtime(struct ptp_clock_info *ptp, s64 delta) ...@@ -53,7 +53,7 @@ static int ptp_dpaa2_adjtime(struct ptp_clock_info *ptp, s64 delta)
{ {
struct ptp_dpaa2_priv *ptp_dpaa2 = struct ptp_dpaa2_priv *ptp_dpaa2 =
container_of(ptp, struct ptp_dpaa2_priv, caps); container_of(ptp, struct ptp_dpaa2_priv, caps);
struct fsl_mc_device *mc_dev = ptp_dpaa2->rtc_mc_dev; struct fsl_mc_device *mc_dev = ptp_dpaa2->ptp_mc_dev;
struct device *dev = &mc_dev->dev; struct device *dev = &mc_dev->dev;
s64 now; s64 now;
int err = 0; int err = 0;
...@@ -78,7 +78,7 @@ static int ptp_dpaa2_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts) ...@@ -78,7 +78,7 @@ static int ptp_dpaa2_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts)
{ {
struct ptp_dpaa2_priv *ptp_dpaa2 = struct ptp_dpaa2_priv *ptp_dpaa2 =
container_of(ptp, struct ptp_dpaa2_priv, caps); container_of(ptp, struct ptp_dpaa2_priv, caps);
struct fsl_mc_device *mc_dev = ptp_dpaa2->rtc_mc_dev; struct fsl_mc_device *mc_dev = ptp_dpaa2->ptp_mc_dev;
struct device *dev = &mc_dev->dev; struct device *dev = &mc_dev->dev;
u64 ns; u64 ns;
u32 remainder; u32 remainder;
...@@ -100,7 +100,7 @@ static int ptp_dpaa2_settime(struct ptp_clock_info *ptp, ...@@ -100,7 +100,7 @@ static int ptp_dpaa2_settime(struct ptp_clock_info *ptp,
{ {
struct ptp_dpaa2_priv *ptp_dpaa2 = struct ptp_dpaa2_priv *ptp_dpaa2 =
container_of(ptp, struct ptp_dpaa2_priv, caps); container_of(ptp, struct ptp_dpaa2_priv, caps);
struct fsl_mc_device *mc_dev = ptp_dpaa2->rtc_mc_dev; struct fsl_mc_device *mc_dev = ptp_dpaa2->ptp_mc_dev;
struct device *dev = &mc_dev->dev; struct device *dev = &mc_dev->dev;
u64 ns; u64 ns;
int err = 0; int err = 0;
...@@ -129,7 +129,7 @@ static struct ptp_clock_info ptp_dpaa2_caps = { ...@@ -129,7 +129,7 @@ static struct ptp_clock_info ptp_dpaa2_caps = {
.settime64 = ptp_dpaa2_settime, .settime64 = ptp_dpaa2_settime,
}; };
static int rtc_probe(struct fsl_mc_device *mc_dev) static int dpaa2_ptp_probe(struct fsl_mc_device *mc_dev)
{ {
struct device *dev = &mc_dev->dev; struct device *dev = &mc_dev->dev;
struct ptp_dpaa2_priv *ptp_dpaa2; struct ptp_dpaa2_priv *ptp_dpaa2;
...@@ -153,7 +153,7 @@ static int rtc_probe(struct fsl_mc_device *mc_dev) ...@@ -153,7 +153,7 @@ static int rtc_probe(struct fsl_mc_device *mc_dev)
goto err_free_mcp; goto err_free_mcp;
} }
ptp_dpaa2->rtc_mc_dev = mc_dev; ptp_dpaa2->ptp_mc_dev = mc_dev;
err = dprtc_get_freq_compensation(mc_dev->mc_io, 0, err = dprtc_get_freq_compensation(mc_dev->mc_io, 0,
mc_dev->mc_handle, &tmr_add); mc_dev->mc_handle, &tmr_add);
...@@ -187,7 +187,7 @@ static int rtc_probe(struct fsl_mc_device *mc_dev) ...@@ -187,7 +187,7 @@ static int rtc_probe(struct fsl_mc_device *mc_dev)
return err; return err;
} }
static int rtc_remove(struct fsl_mc_device *mc_dev) static int dpaa2_ptp_remove(struct fsl_mc_device *mc_dev)
{ {
struct ptp_dpaa2_priv *ptp_dpaa2; struct ptp_dpaa2_priv *ptp_dpaa2;
struct device *dev = &mc_dev->dev; struct device *dev = &mc_dev->dev;
...@@ -204,26 +204,26 @@ static int rtc_remove(struct fsl_mc_device *mc_dev) ...@@ -204,26 +204,26 @@ static int rtc_remove(struct fsl_mc_device *mc_dev)
return 0; return 0;
} }
static const struct fsl_mc_device_id rtc_match_id_table[] = { static const struct fsl_mc_device_id dpaa2_ptp_match_id_table[] = {
{ {
.vendor = FSL_MC_VENDOR_FREESCALE, .vendor = FSL_MC_VENDOR_FREESCALE,
.obj_type = "dprtc", .obj_type = "dprtc",
}, },
{} {}
}; };
MODULE_DEVICE_TABLE(fslmc, rtc_match_id_table); MODULE_DEVICE_TABLE(fslmc, dpaa2_ptp_match_id_table);
static struct fsl_mc_driver rtc_drv = { static struct fsl_mc_driver dpaa2_ptp_drv = {
.driver = { .driver = {
.name = KBUILD_MODNAME, .name = KBUILD_MODNAME,
.owner = THIS_MODULE, .owner = THIS_MODULE,
}, },
.probe = rtc_probe, .probe = dpaa2_ptp_probe,
.remove = rtc_remove, .remove = dpaa2_ptp_remove,
.match_id_table = rtc_match_id_table, .match_id_table = dpaa2_ptp_match_id_table,
}; };
module_fsl_mc_driver(rtc_drv); module_fsl_mc_driver(dpaa2_ptp_drv);
MODULE_LICENSE("GPL v2"); MODULE_LICENSE("GPL v2");
MODULE_DESCRIPTION("DPAA2 PTP Clock Driver"); MODULE_DESCRIPTION("DPAA2 PTP Clock Driver");
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment