Commit Graph

8 Commits (43b8774dc409ea5d9369b978e2e7bc79289f0522)

Author SHA1 Message Date
Paul Mundt c2a25e8197 clocksource: Deprecate clock string across the SH drivers.
We want to get rid of the clock string from platform data entirely,
depending on the clkdev-based clock lookup to do the right thing for us
instead.

This converts all of the SH drivers to request their associated function
clocks directly, and if there is no match for that then we fall back on
the legacy lookup while warning about it. After all of the outstanding
CPUs have been converted to clkdev lookups the clock string will be
killed off completely.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-03-29 16:55:43 +09:00
Paul Mundt 214a607a4f clocksource: Use dev_name() universally across the SH drivers.
There is no need to copy in the name from the sh timer config now that
dev_name() is available early. We prefer the dev_name() variant for
consistent naming.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-03-10 16:26:25 +09:00
Paul Mundt da64c2a8de clocksource: Fix up a registration/IRQ race in the sh drivers.
All of the SH clocksource drivers follow the scheme that the IRQ is setup
prior to registering the clockevent. The interrupt handler in the
clockevent cases looks to the event handler function pointer being filled
in by the registration code, permitting us to get in to situations where
asserted IRQs step in to the handler before registration has had a chance
to complete and hitting a NULL pointer deref.

In practice this is not an issue for most platforms, but some of them
with fairly special loaders (or that are chain-loading from another
kernel) may enter in to this situation. This fixes up the oops reported
by Rafael on hp6xx.

Reported-and-tested-by: Rafael Ignacio Zurita <rafaelignacio.zurita@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-02-25 16:37:46 +09:00
Shin-ichiro KAWASAKI 6f4b67b8ff clocksource: sh_tmu: Make undefined TCOR behaviour less undefined.
Avoid undocumented vague TMU behavior when zero value is set to TCOR.

This primarily fixes up issues encountered under qemu with a zero-length
period, while the hardware itself is fairly ambivalent one way or the
other.

Signed-off-by: Shin-ichiro KAWASAKI <kawasaki@juno.dti.ne.jp>
Acked-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-06-24 21:08:11 +09:00
Magnus Damm be890a1a95 sh: turn off irqs when disabling CMT/TMU timers
Modify the CMT and TMU drivers to disable interrupts when
disabling the timer. Only using start/stop bits is not
enough.

This fixes a bootup hang on Migo-R when the CMT is replaced
by TMU for clockevents but the CMT keeps on delivering irqs
even though the timer start bit is off.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-06-17 15:39:56 +09:00
Paul Mundt e7fad451f0 clocksource: Drop unused irqaction.mask from SH drivers.
The irqaction.mask is legacy code that is wholly unused and going away,
so simply drop its use in the SH drivers completely.

Fixes up build failures in -next.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-06-14 21:18:24 +09:00
Paul Mundt 46a12f7426 sh: Consolidate MTU2/CMT/TMU timer platform data.
All of the SH timers use a roughly identical structure for platform data,
which presently is broken out for each block. Consolidate all of these
definitions, as there is no reason for them to be broken out in the first
place.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-03 17:57:17 +09:00
Magnus Damm 9570ef2042 clocksource: SuperH TMU Timer driver
This patch adds a TMU driver for the SuperH architecture.

The TMU driver is a platform driver with early platform
support to allow using a TMU channel as clockevent or
clocksource during system bootup or later.

Clocksource or clockevent can be selected.
Both periodic and oneshot clockevents are supported.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-05-03 17:41:15 +09:00