From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/4] ARM: sunxi: Add sunxi restart function via onchip watchdog
Date: Mon, 19 Nov 2012 15:55:53 +0000 [thread overview]
Message-ID: <201211191555.53378.arnd@arndb.de> (raw)
In-Reply-To: <1353323383-11827-4-git-send-email-sr@denx.de>
On Monday 19 November 2012, Stefan Roese wrote:
> Signed-off-by: Stefan Roese <sr@denx.de>
> Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
> Cc: Arnd Bergmann <arnd@arndb.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
> +void sunxi_restart(char mode, const char *cmd)
> +{
> + /* Use watchdog to reset system */
> +
> + /* Enable timer and set reset bit */
> + writel(3, timer_base + WATCH_DOG_MODE_REG);
> + writel(0xa57 << 1 | 1, timer_base + WATCH_DOG_CTRL_REG);
> +
> + while(1)
> + ;
> +}
> +
> static void __init sunxi_timer_init(void)
> {
> struct device_node *node;
We may have to revisit this if we get to the point where timer drivers
can be in loadable modules. We can't do that yet, so it's probably
better the way you wrote it than something else.
Arnd
next prev parent reply other threads:[~2012-11-19 15:55 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-19 11:09 [PATCH 1/4] ARM: sunxi: Restructure sunxi dts/dtsi files Stefan Roese
2012-11-19 11:09 ` [PATCH 2/4] ARM: sunxi: Add earlyprintk support for UART0 (sun4i) Stefan Roese
2012-11-19 15:22 ` Maxime Ripard
2012-11-19 15:53 ` Arnd Bergmann
2012-11-19 11:09 ` [PATCH 3/4] ARM: sunxi: Add sun4i and cubieboard support Stefan Roese
2012-11-19 15:22 ` Maxime Ripard
2012-11-19 15:53 ` Arnd Bergmann
2012-11-19 11:09 ` [PATCH 4/4] ARM: sunxi: Add sunxi restart function via onchip watchdog Stefan Roese
2012-11-19 15:43 ` Maxime Ripard
2012-11-19 16:13 ` Stefan Roese
2012-11-19 15:55 ` Arnd Bergmann [this message]
2012-11-19 15:22 ` [PATCH 1/4] ARM: sunxi: Restructure sunxi dts/dtsi files Maxime Ripard
2012-11-19 15:52 ` Arnd Bergmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201211191555.53378.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).