From: Siarhei Siamashka <siarhei.siamashka@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 5/5] sunxi: Fix reset hang on sun5i
Date: Wed, 23 Jul 2014 21:59:27 +0300 [thread overview]
Message-ID: <20140723215927.6cf0e1fa@i7> (raw)
In-Reply-To: <1402692952-24296-6-git-send-email-hdegoede@redhat.com>
On Fri, 13 Jun 2014 22:55:52 +0200
Hans de Goede <hdegoede@redhat.com> wrote:
> Do the same as the Linux kernel does, this fixes the SoC hanging on reset
> about 50% of the time.
>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> Acked-by: Ian Campbell <ijc@hellion.org.uk>
> ---
> arch/arm/cpu/armv7/sunxi/board.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/cpu/armv7/sunxi/board.c b/arch/arm/cpu/armv7/sunxi/board.c
> index 024c8c1..2898833 100644
> --- a/arch/arm/cpu/armv7/sunxi/board.c
> +++ b/arch/arm/cpu/armv7/sunxi/board.c
> @@ -75,7 +75,11 @@ void reset_cpu(ulong addr)
> /* Set the watchdog for its shortest interval (.5s) and wait */
> writel(WDT_MODE_RESET_EN | WDT_MODE_EN, &wdog->mode);
> writel(WDT_CTRL_KEY | WDT_CTRL_RESTART, &wdog->ctl);
> - while (1);
> +
> + while (1) {
> + /* sun5i sometimes gets stuck without this */
> + writel(WDT_MODE_RESET_EN | WDT_MODE_EN, &wdog->mode);
> + }
> }
>
> /* do some early init */
This should be perhaps combined with
http://patchwork.ozlabs.org/patch/357363/ (probably the best place)
or
http://patchwork.ozlabs.org/patch/357365/ (ugh, too much code there)
in order to have bug free code after every commit instead of fixing
the problem after the fact.
--
Best regards,
Siarhei Siamashka
prev parent reply other threads:[~2014-07-23 18:59 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-13 20:55 [U-Boot] [PATCH v2 0/5] sunxi: i2c and pmic support Hans de Goede
2014-06-13 20:55 ` [U-Boot] [PATCH v2 1/5] mvtwsi: convert to CONFIG_SYS_I2C framework Hans de Goede
2014-07-06 13:28 ` Ian Campbell
2014-06-13 20:55 ` [U-Boot] [PATCH v2 2/5] sunxi: Add i2c support Hans de Goede
2014-06-13 20:55 ` [U-Boot] [PATCH v2 3/5] sunxi: Add axp209 pmic support Hans de Goede
2014-07-16 21:48 ` Ian Campbell
2014-07-17 10:37 ` Hans de Goede
2014-07-17 19:14 ` Ian Campbell
2014-07-18 10:04 ` Hans de Goede
2014-07-18 13:51 ` Ian Campbell
2014-07-23 18:49 ` Siarhei Siamashka
2014-06-13 20:55 ` [U-Boot] [PATCH v2 4/5] sunxi: Add axp152 " Hans de Goede
2014-06-13 20:55 ` [U-Boot] [PATCH v2 5/5] sunxi: Fix reset hang on sun5i Hans de Goede
2014-07-23 18:59 ` Siarhei Siamashka [this message]
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=20140723215927.6cf0e1fa@i7 \
--to=siarhei.siamashka@gmail.com \
--cc=u-boot@lists.denx.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.