Daniel Lezcano
adbaf52541
clocksource/drivers/atmel-st: Convert init function to return error
...
The init functions do not return any error. They behave as the following:
- panic, thus leading to a kernel crash while another timer may work and
make the system boot up correctly
or
- print an error and let the caller unaware if the state of the system
Change that by converting the init functions to return an error conforming
to the CLOCKSOURCE_OF_RET prototype.
Proper error handling (rollback, errno value) will be changed later case
by case, thus this change just return back an error or success in the init
function.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org >
2016-06-28 10:19:29 +02:00
Alexandre Belloni
216ab8f155
clocksource: atmel-st: get and use slow clock
...
The current slow clock rate is hardcoded. Properly get the slow clock
and use its rate.
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com >
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org >
2015-10-06 12:25:11 +02:00
Viresh Kumar
8ab282305f
clockevents/drivers/atmel-st: Migrate to new 'set-state' interface
...
Migrate atmel-st 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: Nicolas Ferre <nicolas.ferre@atmel.com >
Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com >
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com >
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org >
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org >
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com >
Tested-by: Alexandre Belloni <alexandre.belloni@free-electrons.com >
2015-08-10 11:40:44 +02:00
Alexandre Belloni
0afb46b248
clocksource: atmel-st: remove mach/hardware dependency
...
Remove the mach/hardware dependency to prepare the driver for multiplatform
support.
Also switch from setup_irq() to request_irq()
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com >
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org >
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com >
2015-03-16 17:03:07 +01:00
Alexandre Belloni
adf2edfd60
clocksource: atmel-st: use syscon/regmap
...
The register range from the system timer is also used by the watchdog driver.
Use a regmap to handle concurrent accesses.
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com >
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com >
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org >
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com >
2015-03-16 17:03:06 +01:00
Alexandre Belloni
b53cdd0322
ARM: at91: time: move the system timer driver to drivers/clocksource
...
Import at91rm9200_time.c from mach-at91 as timer-atmel-st.c. Further cleanup is
required to get rid of the mach-at91 headers.
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com >
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com >
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org >
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com >
2015-03-16 17:03:05 +01:00