OSDN Git Service

clocksource/drivers/imx-tpm: Add different counter width support
authorAnson Huang <Anson.Huang@nxp.com>
Wed, 28 Mar 2018 03:22:38 +0000 (11:22 +0800)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Fri, 30 Mar 2018 20:44:11 +0000 (22:44 +0200)
commit0136c741ff40e03323419feec05fcd594f36a463
tree6ebe96d799a7077e52d060f7aa96741f9df5882b
parent506a7be93ff773d5d4cf75a59f342865605b4910
clocksource/drivers/imx-tpm: Add different counter width support

Different TPM modules have different width counters which is 16-bit or 32-bit,
the counter width can be read from TPM_PARAM register bit[23:16], this patch
adds dynamic check for counter width to support both 16-bit and 32-bit TPM
modules.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
drivers/clocksource/timer-imx-tpm.c