* [PATCH] watchdog: ks8695: sink registers into driver
@ 2012-09-11 5:48 Linus Walleij
[not found] ` <20120911104959.GF27604@spo001.leaseweb.com>
0 siblings, 1 reply; 3+ messages in thread
From: Linus Walleij @ 2012-09-11 5:48 UTC (permalink / raw)
To: linux-arm-kernel
Commit 70adc3f32adc2fb90b0107c020678588e4cf9f51
"ARM: ks8695: merge the timer header into the timer driver"
accidentally broke the ks8695 watchdog since it was using
the timer registers in watchdog mode.
Perform the same operation here: push the registers down
into the driver, so it is self-contained, and we can keep
depopulating the <mach/*> namespace.
Reported-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
Requesting an ACK from the watchdog maintainer so we can
merge this through the ARM SoC tree where the regression
was introduced.
And yes, the drive needs to take resources and ioremap(),
but that is another patch.
---
drivers/watchdog/ks8695_wdt.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/drivers/watchdog/ks8695_wdt.c b/drivers/watchdog/ks8695_wdt.c
index 59e75d9..c1a4d3b 100644
--- a/drivers/watchdog/ks8695_wdt.c
+++ b/drivers/watchdog/ks8695_wdt.c
@@ -24,7 +24,19 @@
#include <linux/io.h>
#include <linux/uaccess.h>
#include <mach/hardware.h>
-#include <mach/regs-timer.h>
+
+#define KS8695_TMR_OFFSET (0xF0000 + 0xE400)
+#define KS8695_TMR_VA (KS8695_IO_VA + KS8695_TMR_OFFSET)
+
+/*
+ * Timer registers
+ */
+#define KS8695_TMCON (0x00) /* Timer Control Register */
+#define KS8695_T0TC (0x08) /* Timer 0 Timeout Count Register */
+#define TMCON_T0EN (1 << 0) /* Timer 0 Enable */
+
+/* Timer0 Timeout Counter Register */
+#define T0TC_WATCHDOG (0xff) /* Enable watchdog mode */
#define WDT_DEFAULT_TIME 5 /* seconds */
#define WDT_MAX_TIME 171 /* seconds */
--
1.7.11.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] watchdog: ks8695: sink registers into driver
[not found] ` <20120911104959.GF27604@spo001.leaseweb.com>
@ 2012-09-11 17:52 ` Linus Walleij
2012-09-12 5:41 ` Olof Johansson
0 siblings, 1 reply; 3+ messages in thread
From: Linus Walleij @ 2012-09-11 17:52 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Sep 11, 2012 at 12:49 PM, Wim Van Sebroeck <wim@iguana.be> wrote:
> Hi Linus,
>> Commit 70adc3f32adc2fb90b0107c020678588e4cf9f51
>> "ARM: ks8695: merge the timer header into the timer driver"
>> accidentally broke the ks8695 watchdog since it was using
>> the timer registers in watchdog mode.
>>
>> Perform the same operation here: push the registers down
>> into the driver, so it is self-contained, and we can keep
>> depopulating the <mach/*> namespace.
>>
>> Reported-by: Olof Johansson <olof@lixom.net>
>> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
>> ---
>> Requesting an ACK from the watchdog maintainer so we can
>> merge this through the ARM SoC tree where the regression
>> was introduced.
>>
>> And yes, the drive needs to take resources and ioremap(),
>> but that is another patch.
>
> Acked-by: Wim Van Sebroeck <wim@iguana.be>
Thanks, Olof/Arnd: can you pick this single patch to the
ks8695/timer branch?
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] watchdog: ks8695: sink registers into driver
2012-09-11 17:52 ` Linus Walleij
@ 2012-09-12 5:41 ` Olof Johansson
0 siblings, 0 replies; 3+ messages in thread
From: Olof Johansson @ 2012-09-12 5:41 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Sep 11, 2012 at 10:52 AM, Linus Walleij
<linus.walleij@linaro.org> wrote:
> On Tue, Sep 11, 2012 at 12:49 PM, Wim Van Sebroeck <wim@iguana.be> wrote:
>
>> Hi Linus,
>>> Commit 70adc3f32adc2fb90b0107c020678588e4cf9f51
>>> "ARM: ks8695: merge the timer header into the timer driver"
>>> accidentally broke the ks8695 watchdog since it was using
>>> the timer registers in watchdog mode.
>>>
>>> Perform the same operation here: push the registers down
>>> into the driver, so it is self-contained, and we can keep
>>> depopulating the <mach/*> namespace.
>>>
>>> Reported-by: Olof Johansson <olof@lixom.net>
>>> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
>>> ---
>>> Requesting an ACK from the watchdog maintainer so we can
>>> merge this through the ARM SoC tree where the regression
>>> was introduced.
>>>
>>> And yes, the drive needs to take resources and ioremap(),
>>> but that is another patch.
>>
>> Acked-by: Wim Van Sebroeck <wim@iguana.be>
>
> Thanks, Olof/Arnd: can you pick this single patch to the
> ks8695/timer branch?
Done, thanks for the follow-up.
-Olof
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-09-12 5:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-11 5:48 [PATCH] watchdog: ks8695: sink registers into driver Linus Walleij
[not found] ` <20120911104959.GF27604@spo001.leaseweb.com>
2012-09-11 17:52 ` Linus Walleij
2012-09-12 5:41 ` Olof Johansson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).