clocksource/drivers/arm_arch_timer: Fix CNTPCT_LO and CNTVCT_LO value
authorYang Guo <guoyang2@huawei.com>
Tue, 27 Sep 2022 03:32:21 +0000 (11:32 +0800)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Tue, 27 Sep 2022 09:30:53 +0000 (11:30 +0200)
CNTPCT_LO and CNTVCT_LO are defined by mistake in commit '8b82c4f883a7',
so fix them according to the Arm ARM DDI 0487I.a, Table I2-4
"CNTBaseN memory map" as follows:

Offset    Register      Type Description
0x000     CNTPCT[31:0]  RO   Physical Count register.
0x004     CNTPCT[63:32] RO
0x008     CNTVCT[31:0]  RO   Virtual Count register.
0x00C     CNTVCT[63:32] RO

Fixes: 8b82c4f883a7 ("clocksource/drivers/arm_arch_timer: Move MMIO timer programming over to CVAL")
Cc: stable@vger.kernel.org
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Acked-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Yang Guo <guoyang2@huawei.com>
Signed-off-by: Shaokun Zhang <zhangshaokun@hisilicon.com>
Link: https://lore.kernel.org/r/20220927033221.49589-1-zhangshaokun@hisilicon.com
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
drivers/clocksource/arm_arch_timer.c

index ff935efb6a8853b44adc28c7a9b4ad2aeac4de25..a7ff77550e1737e291ef07ffc5ef1ebc83509d99 100644 (file)
@@ -44,8 +44,8 @@
 #define CNTACR_RWVT    BIT(4)
 #define CNTACR_RWPT    BIT(5)
 
-#define CNTVCT_LO      0x00
-#define CNTPCT_LO      0x08
+#define CNTPCT_LO      0x00
+#define CNTVCT_LO      0x08
 #define CNTFRQ         0x10
 #define CNTP_CVAL_LO   0x20
 #define CNTP_CTL       0x2c