History log of /drivers/watchdog/sp805_wdt.c
Revision Date Author Comments
fb35a5ad5b4b2c3806b52b0159f4d5a0ad205c0f 12-Mar-2012 Viresh Kumar <viresh.kumar@st.com> watchdog: sp805: Use devm routines

sp805 driver currently uses normal kzalloc, ioremap, etc routines. This patch
replaces these routines with devm_kzalloc and devm_request_mem_region etc, so
that we don't need to handle freeing of resources for error cases and module
removal routine.

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
d2e8919bcfb63b662945d0e5cb9338f0f2229d10 12-Mar-2012 Viresh Kumar <viresh.kumar@st.com> watchdog: sp805: replace readl/writel with lighter _relaxed variants

readl/writel versions for ARM contain memory barrier instruction for
synchronizing DMA buffers. These are not required at least on this
module. So use lighter _relaxed variants.

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
bfae14b679063d85f10579bbfd532db58b122e29 12-Mar-2012 Viresh Kumar <viresh.kumar@st.com> watchdog: sp805: Fix documentation style comment

@ was missing before variables names, in their description. Also adev is
mentioned as dev in comment. Fix both these issues.

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
86a1e1896c2710402e29a875d8d830244274244d 05-Mar-2012 Wim Van Sebroeck <wim@iguana.be> watchdog: nowayout is bool

nowayout is actually a boolean value.
So make it bool for all watchdog device drivers.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
16ac4abe0d0ea0a8d42d6a2a7de2a4a00bbf5b40 24-Feb-2012 Viresh Kumar <viresh.kumar@st.com> watchdog: sp805_wdt: add pm callbacks to support standby/S2R/hibernation

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
9e5ed094c89e55fbf11d2e81d60be98eb12346c0 15-Mar-2012 viresh kumar <viresh.kumar@st.com> ARM: 7362/1: AMBA: Add module_amba_driver() helper macro for amba_driver

For simple modules that contain a single amba_driver without any
additional setup code then ends up being a block of duplicated
boilerplate. This patch adds a new macro, module_amba_driver(),
which replaces the module_init()/module_exit() registrations with
template functions.

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
bb558dac6776386a4d6994540a009231dcf53ee1 19-Dec-2011 Nick Bowler <nbowler@elliptictech.com> watchdog: sp805: Fix section mismatch in ID table.

The AMBA ID table is marked as __initdata, yet it is referenced by the
driver struct which is not. This causes a (somewhat unhelpful) section
mismatch warning:

WARNING: drivers/watchdog/sp805_wdt.o(.data+0x4c): Section mismatch in
reference from the variable sp805_wdt_driver to the (unknown
reference) .init.data:(unknown)

Fix this by removing the annotation.

Signed-off-by: Nick Bowler <nbowler@elliptictech.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
17885b05b31c0d310f859982d2a56f167274547e 05-Oct-2011 Dave Martin <dave.martin@linaro.org> watchdog: sp805: Enable module alias autogeneration for AMBA drivers

Signed-off-by: Dave Martin <dave.martin@linaro.org>
081d83a3393f65adc94fc4240b9926be3054f9dc 15-Jul-2011 Nick Bowler <nbowler@elliptictech.com> watchdog: sp805: Flush posted writes in enable/disable.

There are no reads in these functions, so if MMIO writes are posted,
the writes in enable/disable may not have completed by the time these
functions return. If the functions run from different CPUs, it's
in theory possible for the writes to be interleaved, which would be
disastrous for this driver.

At the very least, we need an mmiowb() before releasing the lock, but
since it seems desirable for the watchdog timer to be actually stopped
or reset when these functions return, read the lock register to force
the writes out.

Signed-off-by: Nick Bowler <nbowler@elliptictech.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
da3e515024ba32aaf0d524518ce39a8fb77332cd 15-Jul-2011 Nick Bowler <nbowler@elliptictech.com> watchdog: sp805: Don't write 0 to the load value register.

At least on the Versatile Express' V2M, calling wdt_disable followed by
wdt_enable, for instance by running the following sequence:

echo V > /dev/watchdog; echo V > /dev/watchdog

results in an immediate reset. The wdt_disable function writes 0 to the
load register; while the watchdog interrupts are disabled at this point,
this special value is defined to trigger an interrupt immediately. It
appears that in this instance, the reset happens when the interrupts
are subsequently enabled by wdt_enable.

Putting in a short delay after writing a new load value in wdt_enable
solves the issue, but it seems cleaner to simply never write 0 to the
load register at all: according to the hardware docs, writing 0 to the
control register suffices to stop the counter, and the write of 0 to
the load register is questionable anyway since this register resets to
0xffffffff.

Signed-off-by: Nick Bowler <nbowler@elliptictech.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
25985edcedea6396277003854657b5f3cb31a628 31-Mar-2011 Lucas De Marchi <lucas.demarchi@profusion.mobi> Fix common misspellings

Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
aa25afad2ca60d19457849ea75e9c31236f4e174 19-Feb-2011 Russell King <rmk+kernel@arm.linux.org.uk> ARM: amba: make probe() functions take const id tables

Make Primecell driver probe functions take a const pointer to their
ID tables. Drivers should never modify their ID tables in their
probe handler.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
4a370278e1041d4c62719bcd773e9c620e775901 04-Aug-2010 Viresh KUMAR <viresh.kumar@st.com> watchdog: Adding support for ARM Primecell SP805 Watchdog

Technical Reference Manual can be found at:
http://infocenter.arm.com/help/topic/com.arm.doc.ddi0270b/DDI0270.pdf

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>