clocksource: Fix clocksource_mmio_readX_down
authorXiubo Li <Li.Xiubo@freescale.com>
Wed, 23 Apr 2014 02:12:00 +0000 (10:12 +0800)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Fri, 23 May 2014 07:19:40 +0000 (09:19 +0200)
For some clocksource devices, for example, the registers are 32-bit, while
the lower 16-bit is used for timer counting(And reading the upper 16-bit
will return 0).

For example, when the counter value is 0x00001111, and then the
~readl_relaxed(to_mmio_clksrc(c)->reg) will return the value of 0xFFFFEEEE,
but it should be 0x0000EEEE.

So just using the c->mask to mask the unused bits.

Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
drivers/clocksource/mmio.c

Simple merge