ptp_qoriq: fix register memory map

The 1588 timer on eTSEC Ethernet controller uses different
register memory map with DPAA Ethernet controller.
Now the new ENETC Ethernet controller uses same reigster
memory map with DPAA. To support ENETC, let's use register
memory map of DPAA/ENETC in default.

Signed-off-by: Yangbo Lu <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
Yangbo Lu 2019-02-12 12:24:01 +08:00 • committed by David S. Miller
commit d4e176870b
2 changed files with 15 additions and 14 deletions

View file

@ -504,11 +504,12 @@ int ptp_qoriq_init(struct ptp_qoriq *ptp_qoriq, void __iomem *base,
ptp_qoriq->write = qoriq_write_be;
}
if (of_device_is_compatible(node, "fsl,fman-ptp-timer")) {
ptp_qoriq->regs.ctrl_regs = base + FMAN_CTRL_REGS_OFFSET;
ptp_qoriq->regs.alarm_regs = base + FMAN_ALARM_REGS_OFFSET;
ptp_qoriq->regs.fiper_regs = base + FMAN_FIPER_REGS_OFFSET;
ptp_qoriq->regs.etts_regs = base + FMAN_ETTS_REGS_OFFSET;
/* The eTSEC uses differnt memory map with DPAA/ENETC */
if (of_device_is_compatible(node, "fsl,etsec-ptp")) {
ptp_qoriq->regs.ctrl_regs = base + ETSEC_CTRL_REGS_OFFSET;
ptp_qoriq->regs.alarm_regs = base + ETSEC_ALARM_REGS_OFFSET;
ptp_qoriq->regs.fiper_regs = base + ETSEC_FIPER_REGS_OFFSET;
ptp_qoriq->regs.etts_regs = base + ETSEC_ETTS_REGS_OFFSET;
} else {
ptp_qoriq->regs.ctrl_regs = base + CTRL_REGS_OFFSET;
ptp_qoriq->regs.alarm_regs = base + ALARM_REGS_OFFSET;