Commit 1e562c81 authored by Yangbo Lu's avatar Yangbo Lu Committed by David S. Miller

ptp_qoriq: make structure/function names more consistent

Strings containing "ptp_qoriq" or "qoriq_ptp" which were used for
structure/function names were complained by users. Let's just use
the unique "ptp_qoriq" to make these names more consistent.
This patch is just to unify the names using "ptp_qoriq". It hasn't
changed any functions.
Signed-off-by: default avatarYangbo Lu <yangbo.lu@nxp.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4ea7b0cf
...@@ -501,7 +501,7 @@ static int dpaa_get_ts_info(struct net_device *net_dev, ...@@ -501,7 +501,7 @@ static int dpaa_get_ts_info(struct net_device *net_dev,
struct device_node *mac_node = dev->of_node; struct device_node *mac_node = dev->of_node;
struct device_node *fman_node = NULL, *ptp_node = NULL; struct device_node *fman_node = NULL, *ptp_node = NULL;
struct platform_device *ptp_dev = NULL; struct platform_device *ptp_dev = NULL;
struct qoriq_ptp *ptp = NULL; struct ptp_qoriq *ptp = NULL;
info->phc_index = -1; info->phc_index = -1;
......
...@@ -1492,7 +1492,7 @@ static int gfar_get_ts_info(struct net_device *dev, ...@@ -1492,7 +1492,7 @@ static int gfar_get_ts_info(struct net_device *dev,
struct gfar_private *priv = netdev_priv(dev); struct gfar_private *priv = netdev_priv(dev);
struct platform_device *ptp_dev; struct platform_device *ptp_dev;
struct device_node *ptp_node; struct device_node *ptp_node;
struct qoriq_ptp *ptp = NULL; struct ptp_qoriq *ptp = NULL;
info->phc_index = -1; info->phc_index = -1;
......
This diff is collapsed.
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
static int ptp_qoriq_fiper1_lpbk_get(void *data, u64 *val) static int ptp_qoriq_fiper1_lpbk_get(void *data, u64 *val)
{ {
struct qoriq_ptp *qoriq_ptp = data; struct ptp_qoriq *ptp_qoriq = data;
struct qoriq_ptp_registers *regs = &qoriq_ptp->regs; struct ptp_qoriq_registers *regs = &ptp_qoriq->regs;
u32 ctrl; u32 ctrl;
ctrl = qoriq_read(&regs->ctrl_regs->tmr_ctrl); ctrl = qoriq_read(&regs->ctrl_regs->tmr_ctrl);
...@@ -19,8 +19,8 @@ static int ptp_qoriq_fiper1_lpbk_get(void *data, u64 *val) ...@@ -19,8 +19,8 @@ static int ptp_qoriq_fiper1_lpbk_get(void *data, u64 *val)
static int ptp_qoriq_fiper1_lpbk_set(void *data, u64 val) static int ptp_qoriq_fiper1_lpbk_set(void *data, u64 val)
{ {
struct qoriq_ptp *qoriq_ptp = data; struct ptp_qoriq *ptp_qoriq = data;
struct qoriq_ptp_registers *regs = &qoriq_ptp->regs; struct ptp_qoriq_registers *regs = &ptp_qoriq->regs;
u32 ctrl; u32 ctrl;
ctrl = qoriq_read(&regs->ctrl_regs->tmr_ctrl); ctrl = qoriq_read(&regs->ctrl_regs->tmr_ctrl);
...@@ -38,8 +38,8 @@ DEFINE_DEBUGFS_ATTRIBUTE(ptp_qoriq_fiper1_fops, ptp_qoriq_fiper1_lpbk_get, ...@@ -38,8 +38,8 @@ DEFINE_DEBUGFS_ATTRIBUTE(ptp_qoriq_fiper1_fops, ptp_qoriq_fiper1_lpbk_get,
static int ptp_qoriq_fiper2_lpbk_get(void *data, u64 *val) static int ptp_qoriq_fiper2_lpbk_get(void *data, u64 *val)
{ {
struct qoriq_ptp *qoriq_ptp = data; struct ptp_qoriq *ptp_qoriq = data;
struct qoriq_ptp_registers *regs = &qoriq_ptp->regs; struct ptp_qoriq_registers *regs = &ptp_qoriq->regs;
u32 ctrl; u32 ctrl;
ctrl = qoriq_read(&regs->ctrl_regs->tmr_ctrl); ctrl = qoriq_read(&regs->ctrl_regs->tmr_ctrl);
...@@ -50,8 +50,8 @@ static int ptp_qoriq_fiper2_lpbk_get(void *data, u64 *val) ...@@ -50,8 +50,8 @@ static int ptp_qoriq_fiper2_lpbk_get(void *data, u64 *val)
static int ptp_qoriq_fiper2_lpbk_set(void *data, u64 val) static int ptp_qoriq_fiper2_lpbk_set(void *data, u64 val)
{ {
struct qoriq_ptp *qoriq_ptp = data; struct ptp_qoriq *ptp_qoriq = data;
struct qoriq_ptp_registers *regs = &qoriq_ptp->regs; struct ptp_qoriq_registers *regs = &ptp_qoriq->regs;
u32 ctrl; u32 ctrl;
ctrl = qoriq_read(&regs->ctrl_regs->tmr_ctrl); ctrl = qoriq_read(&regs->ctrl_regs->tmr_ctrl);
...@@ -67,35 +67,35 @@ static int ptp_qoriq_fiper2_lpbk_set(void *data, u64 val) ...@@ -67,35 +67,35 @@ static int ptp_qoriq_fiper2_lpbk_set(void *data, u64 val)
DEFINE_DEBUGFS_ATTRIBUTE(ptp_qoriq_fiper2_fops, ptp_qoriq_fiper2_lpbk_get, DEFINE_DEBUGFS_ATTRIBUTE(ptp_qoriq_fiper2_fops, ptp_qoriq_fiper2_lpbk_get,
ptp_qoriq_fiper2_lpbk_set, "%llu\n"); ptp_qoriq_fiper2_lpbk_set, "%llu\n");
void ptp_qoriq_create_debugfs(struct qoriq_ptp *qoriq_ptp) void ptp_qoriq_create_debugfs(struct ptp_qoriq *ptp_qoriq)
{ {
struct dentry *root; struct dentry *root;
root = debugfs_create_dir(dev_name(qoriq_ptp->dev), NULL); root = debugfs_create_dir(dev_name(ptp_qoriq->dev), NULL);
if (IS_ERR(root)) if (IS_ERR(root))
return; return;
if (!root) if (!root)
goto err_root; goto err_root;
qoriq_ptp->debugfs_root = root; ptp_qoriq->debugfs_root = root;
if (!debugfs_create_file_unsafe("fiper1-loopback", 0600, root, if (!debugfs_create_file_unsafe("fiper1-loopback", 0600, root,
qoriq_ptp, &ptp_qoriq_fiper1_fops)) ptp_qoriq, &ptp_qoriq_fiper1_fops))
goto err_node; goto err_node;
if (!debugfs_create_file_unsafe("fiper2-loopback", 0600, root, if (!debugfs_create_file_unsafe("fiper2-loopback", 0600, root,
qoriq_ptp, &ptp_qoriq_fiper2_fops)) ptp_qoriq, &ptp_qoriq_fiper2_fops))
goto err_node; goto err_node;
return; return;
err_node: err_node:
debugfs_remove_recursive(root); debugfs_remove_recursive(root);
qoriq_ptp->debugfs_root = NULL; ptp_qoriq->debugfs_root = NULL;
err_root: err_root:
dev_err(qoriq_ptp->dev, "failed to initialize debugfs\n"); dev_err(ptp_qoriq->dev, "failed to initialize debugfs\n");
} }
void ptp_qoriq_remove_debugfs(struct qoriq_ptp *qoriq_ptp) void ptp_qoriq_remove_debugfs(struct ptp_qoriq *ptp_qoriq)
{ {
debugfs_remove_recursive(qoriq_ptp->debugfs_root); debugfs_remove_recursive(ptp_qoriq->debugfs_root);
qoriq_ptp->debugfs_root = NULL; ptp_qoriq->debugfs_root = NULL;
} }
...@@ -49,7 +49,7 @@ struct etts_regs { ...@@ -49,7 +49,7 @@ struct etts_regs {
u32 tmr_etts2_l; /* Timestamp of general purpose external trigger */ u32 tmr_etts2_l; /* Timestamp of general purpose external trigger */
}; };
struct qoriq_ptp_registers { struct ptp_qoriq_registers {
struct ctrl_regs __iomem *ctrl_regs; struct ctrl_regs __iomem *ctrl_regs;
struct alarm_regs __iomem *alarm_regs; struct alarm_regs __iomem *alarm_regs;
struct fiper_regs __iomem *fiper_regs; struct fiper_regs __iomem *fiper_regs;
...@@ -136,9 +136,9 @@ struct qoriq_ptp_registers { ...@@ -136,9 +136,9 @@ struct qoriq_ptp_registers {
#define DEFAULT_FIPER1_PERIOD 1000000000 #define DEFAULT_FIPER1_PERIOD 1000000000
#define DEFAULT_FIPER2_PERIOD 100000 #define DEFAULT_FIPER2_PERIOD 100000
struct qoriq_ptp { struct ptp_qoriq {
void __iomem *base; void __iomem *base;
struct qoriq_ptp_registers regs; struct ptp_qoriq_registers regs;
spinlock_t lock; /* protects regs */ spinlock_t lock; /* protects regs */
struct ptp_clock *clock; struct ptp_clock *clock;
struct ptp_clock_info caps; struct ptp_clock_info caps;
...@@ -172,12 +172,12 @@ static inline void qoriq_write(unsigned __iomem *addr, u32 val) ...@@ -172,12 +172,12 @@ static inline void qoriq_write(unsigned __iomem *addr, u32 val)
} }
#ifdef CONFIG_DEBUG_FS #ifdef CONFIG_DEBUG_FS
void ptp_qoriq_create_debugfs(struct qoriq_ptp *qoriq_ptp); void ptp_qoriq_create_debugfs(struct ptp_qoriq *ptp_qoriq);
void ptp_qoriq_remove_debugfs(struct qoriq_ptp *qoriq_ptp); void ptp_qoriq_remove_debugfs(struct ptp_qoriq *ptp_qoriq);
#else #else
static inline void ptp_qoriq_create_debugfs(struct qoriq_ptp *qoriq_ptp) static inline void ptp_qoriq_create_debugfs(struct ptp_qoriq *ptp_qoriq)
{ } { }
static inline void ptp_qoriq_remove_debugfs(struct qoriq_ptp *qoriq_ptp) static inline void ptp_qoriq_remove_debugfs(struct ptp_qoriq *ptp_qoriq)
{ } { }
#endif #endif
......
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