Commit graph

12 commits

Author SHA1 Message Date
Yoshinori Sato d33f250af4 clocksource/drivers/h8300: Use ioread / iowrite
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2015-12-16 17:20:13 +01:00
Yoshinori Sato 2f445e0aa0 clocksource/drivers/h8300: Fix timer not overflow case
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2015-12-16 11:33:31 +01:00
Yoshinori Sato 2a0ff87774 clocksource/drivers/h8300: Change to overflow interrupt
Counter overflow detection use for overflow interrupt

Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2015-12-16 11:33:22 +01:00
Daniel Lezcano 751605152b h8300: Rename ctlr_out/in[bwl] to raw_read/write[bwl]
For the sake of consistency, let rename all ctrl_out/in calls to the write/read
calls so we have the same API consistent with the other architectures hence
open the door for the increasing of the test compilation coverage.

The unsigned long coercive cast is removed because all variables are set to
the right type "void __iomem *".

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2015-12-15 10:12:03 +01:00
Daniel Lezcano 05de7ed679 clocksource/drivers/h8300_timer16: Remove pointless lock
The lock in the timer16_clocksource_read is not needed, remove it.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2015-12-15 09:42:28 +01:00
Daniel Lezcano 5019c90232 clocksource/drivers/h8300_timer16: Fix irq return value check
The function irq_of_parse_and_map returns zero in case of failure.

Fix the return code test to check against zero.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2015-12-15 09:42:26 +01:00
Daniel Lezcano 903e5fd3f8 clocksource/drivers/h8300_timer16: Remove unused fields in timer16_priv
The fields are not used in the code, remove them.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2015-12-15 09:42:25 +01:00
Daniel Lezcano 8b24e8d717 clocksource/drivers/h8300_timer16: Remove unused macros
The macros are no longer used in the code, remove them.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2015-12-15 09:42:23 +01:00
Daniel Lezcano 8cbade5271 clocksource/drivers/h8300_timer16: Remove pointless headers
The headers are not needed, remove them.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2015-12-15 09:42:21 +01:00
Yoshinori Sato 4633f4cac8 clocksource/drivers/h8300: Cleanup startup and remove module code.
Remove some legacy code and replace it by the clksrc-of code.

Do some cleanup and code consolidation.

Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2015-12-15 09:42:02 +01:00
Alexey Klimov ba49af35be clocksource/drivers/h8300_*: Remove unneeded memset()s
Memory for timer16_priv, timer8_priv and tpu_priv structs is
allocated by devm_kzalloc() in corresponding probe functions
of drivers.
No need to zero it one more time.

Signed-off-by: Alexey Klimov <alexey.klimov@linaro.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2015-10-15 17:42:02 +02:00
Yoshinori Sato 618b902d8c h8300: clocksource
h8300_timer8: 8bit clockevent device
h8300_timer16 / h8300_tpu: 16bit clocksource

Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
2015-06-23 13:35:55 +09:00