summaryrefslogtreecommitdiff
path: root/drivers/ptp/ptp_qoriq_debugfs.c
diff options
context:
space:
mode:
authorYangbo Lu <yangbo.lu@nxp.com>2019-02-12 12:23:59 +0800
committerDavid S. Miller <davem@davemloft.net>2019-02-12 12:58:48 -0500
commitf038ddf25b80be90e1af9439935bdb66fdbf5e28 (patch)
tree654ca5a29e993efe5c95b3f7d587f4d4c6f3d0f9 /drivers/ptp/ptp_qoriq_debugfs.c
parentff54571a747bc1fc8e132ef9c512451ec6de3336 (diff)
ptp_qoriq: add little enadian support
There is QorIQ 1588 timer IP block on the new ENETC Ethernet controller. However it uses little endian mode which is different with before. This patch is to add little endian support for the driver by using "little-endian" dts node property. Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/ptp/ptp_qoriq_debugfs.c')
-rw-r--r--drivers/ptp/ptp_qoriq_debugfs.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/ptp/ptp_qoriq_debugfs.c b/drivers/ptp/ptp_qoriq_debugfs.c
index 3a70daf03727..e8dddcedf288 100644
--- a/drivers/ptp/ptp_qoriq_debugfs.c
+++ b/drivers/ptp/ptp_qoriq_debugfs.c
@@ -11,7 +11,7 @@ static int ptp_qoriq_fiper1_lpbk_get(void *data, u64 *val)
struct ptp_qoriq_registers *regs = &ptp_qoriq->regs;
u32 ctrl;
- ctrl = qoriq_read(&regs->ctrl_regs->tmr_ctrl);
+ ctrl = ptp_qoriq->read(&regs->ctrl_regs->tmr_ctrl);
*val = ctrl & PP1L ? 1 : 0;
return 0;
@@ -23,13 +23,13 @@ static int ptp_qoriq_fiper1_lpbk_set(void *data, u64 val)
struct ptp_qoriq_registers *regs = &ptp_qoriq->regs;
u32 ctrl;
- ctrl = qoriq_read(&regs->ctrl_regs->tmr_ctrl);
+ ctrl = ptp_qoriq->read(&regs->ctrl_regs->tmr_ctrl);
if (val == 0)
ctrl &= ~PP1L;
else
ctrl |= PP1L;
- qoriq_write(&regs->ctrl_regs->tmr_ctrl, ctrl);
+ ptp_qoriq->write(&regs->ctrl_regs->tmr_ctrl, ctrl);
return 0;
}
@@ -42,7 +42,7 @@ static int ptp_qoriq_fiper2_lpbk_get(void *data, u64 *val)
struct ptp_qoriq_registers *regs = &ptp_qoriq->regs;
u32 ctrl;
- ctrl = qoriq_read(&regs->ctrl_regs->tmr_ctrl);
+ ctrl = ptp_qoriq->read(&regs->ctrl_regs->tmr_ctrl);
*val = ctrl & PP2L ? 1 : 0;
return 0;
@@ -54,13 +54,13 @@ static int ptp_qoriq_fiper2_lpbk_set(void *data, u64 val)
struct ptp_qoriq_registers *regs = &ptp_qoriq->regs;
u32 ctrl;
- ctrl = qoriq_read(&regs->ctrl_regs->tmr_ctrl);
+ ctrl = ptp_qoriq->read(&regs->ctrl_regs->tmr_ctrl);
if (val == 0)
ctrl &= ~PP2L;
else
ctrl |= PP2L;
- qoriq_write(&regs->ctrl_regs->tmr_ctrl, ctrl);
+ ptp_qoriq->write(&regs->ctrl_regs->tmr_ctrl, ctrl);
return 0;
}