From 8aeea9e1106cad8992fadb3d84235cb5c93dd775 Mon Sep 17 00:00:00 2001 From: Alex Forencich Date: Mon, 30 Dec 2019 20:45:56 -0800 Subject: [PATCH] Add perout offset and stride defines --- modules/mqnic/mqnic_hw.h | 3 +++ modules/mqnic/mqnic_ptp.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/mqnic/mqnic_hw.h b/modules/mqnic/mqnic_hw.h index 0a057b9b2..5b8679a40 100644 --- a/modules/mqnic/mqnic_hw.h +++ b/modules/mqnic/mqnic_hw.h @@ -93,6 +93,9 @@ either expressed or implied, of The Regents of the University of California. #define MQNIC_PHC_REG_PTP_ADJ_COUNT 0x0058 #define MQNIC_PHC_REG_PTP_ADJ_ACTIVE 0x005C +#define MQNIC_PHC_PEROUT_OFFSET 0x60 +#define MQNIC_PHC_PEROUT_STRIDE 0x40 + #define MQNIC_PHC_REG_PEROUT_CTRL 0x0000 #define MQNIC_PHC_REG_PEROUT_STATUS 0x0004 #define MQNIC_PHC_REG_PEROUT_START_FNS 0x0010 diff --git a/modules/mqnic/mqnic_ptp.c b/modules/mqnic/mqnic_ptp.c index fb3cd546f..d46120efb 100644 --- a/modules/mqnic/mqnic_ptp.c +++ b/modules/mqnic/mqnic_ptp.c @@ -168,7 +168,7 @@ static int mqnic_phc_perout(struct ptp_clock_info *ptp, int on, struct ptp_perou return -EINVAL; } - hw_addr = mdev->phc_hw_addr + 0x60; + hw_addr = mdev->phc_hw_addr + MQNIC_PHC_PEROUT_OFFSET; if (!on) {