aboutsummaryrefslogtreecommitdiff
path: root/drivers/clocksource/timer-stm32.c
AgeCommit message (Collapse)AuthorFilesLines
2015-08-10clockevents/drivers/stm32: Migrate to new 'set-state' interfaceViresh Kumar1-13/+17
Migrate stm32 driver to the new 'set-state' interface provided by clockevents core, the earlier 'set-mode' interface is marked obsolete now. This also enables us to implement callbacks for new states of clockevent devices, for example: ONESHOT_STOPPED. Cc: Maxime Coquelin <[email protected]> Signed-off-by: Viresh Kumar <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]> Tested-by: Maxime Coquelin <[email protected]> Acked-by: Maxime Coquelin <[email protected]>
2015-06-02clockevents/drivers/timer-stm32: Fix build warning spotted by kbuild test robotMaxime Coquelin1-2/+2
This patch fixes below warning spotted by kbuild test robot when building with ARCH=powerpc: drivers/clocksource/timer-stm32.c: In function 'stm32_clockevent_init': >> drivers/clocksource/timer-stm32.c:140:9: warning: large integer implicitly truncated to unsigned type [-Woverflow] writel_relaxed(~0UL, data->base + TIM_ARR); The fix consists in using 0U instead of 0UL. Reported-by: kbuild test robot <[email protected]> Signed-off-by: Maxime Coquelin <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]>
2015-06-02clockevents/drivers: Add STM32 Timer driverMaxime Coquelin1-0/+184
STM32 MCUs feature 16 and 32 bits general purpose timers with prescalers. The drivers detects whether the time is 16 or 32 bits, and applies a 1024 prescaler value if it is 16 bits. Reviewed-by: Linus Walleij <[email protected]> Tested-by: Chanwoo Choi <[email protected]> Signed-off-by: Maxime Coquelin <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]>