OSDN Git Service

drivers/perf: fsl_imx8_ddr: Correct the CLEAR bit definition
authorJoakim Zhang <qiangqing.zhang@nxp.com>
Tue, 25 Feb 2020 12:56:43 +0000 (20:56 +0800)
committerWill Deacon <will@kernel.org>
Mon, 2 Mar 2020 12:07:19 +0000 (12:07 +0000)
commit049d919168458ac54e7fad27cd156a958b042d2f
tree7a1fa34cf4825d70c3bbdef0c9b9d6760f0abe75
parentdcde237319e626d1ec3c9d8b7613032f0fd4663a
drivers/perf: fsl_imx8_ddr: Correct the CLEAR bit definition

When disabling a counter from ddr_perf_event_stop(), the counter value
is reset to 0 at the same time.

Preserve the counter value by performing a read-modify-write of the
PMU register and clearing only the enable bit.

Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
Signed-off-by: Will Deacon <will@kernel.org>
drivers/perf/fsl_imx8_ddr_perf.c