From: Chin Liang See <clsee@altera.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] watchdog disable for socfpga
Date: Fri, 12 Sep 2014 01:10:22 -0500 [thread overview]
Message-ID: <1410502222.1904.1.camel@clsee-VirtualBox.altera.com> (raw)
In-Reply-To: <20140909120328.GA20662@amd>
Hi Pavel,
On Tue, 2014-09-09 at 14:03 +0200, ZY - pavel wrote:
> This adds watchdog disable. It is neccessary for running Linux kernel.
>
> Signed-off-by: Pavel Machek <pavel@denx.de>
>
> diff --git a/arch/arm/cpu/armv7/socfpga/reset_manager.c b/arch/arm/cpu/armv7/socfpga/reset_manager.c
> index e320c01..5503059 100644
> --- a/arch/arm/cpu/armv7/socfpga/reset_manager.c
> +++ b/arch/arm/cpu/armv7/socfpga/reset_manager.c
> @@ -14,6 +14,19 @@ DECLARE_GLOBAL_DATA_PTR;
> static const struct socfpga_reset_manager *reset_manager_base =
> (void *)SOCFPGA_RSTMGR_ADDRESS;
>
> +#define RSTMGR_PERMODRST_L4WD0_LSB 6
Would suggest to put this into header file.
Thanks
Chin Liang
> +
> +/* Disable the watchdog (toggle reset to watchdog) */
> +void watchdog_disable(void)
> +{
> + /* assert reset for watchdog */
> + setbits_le32(&reset_manager_base->per_mod_reset,
> + (1<<RSTMGR_PERMODRST_L4WD0_LSB));
> + /* deassert watchdog from reset (watchdog in not running state) */
> + clrbits_le32(&reset_manager_base->per_mod_reset,
> + (1<<RSTMGR_PERMODRST_L4WD0_LSB));
> +}
> +
> /*
> * Write the reset manager register to cause reset
> */
> diff --git a/arch/arm/include/asm/arch-socfpga/reset_manager.h b/arch/arm/include/asm/arch-socfpga/reset_manager.h
> index 3e95476..eb95c5b 100644
> --- a/arch/arm/include/asm/arch-socfpga/reset_manager.h
> +++ b/arch/arm/include/asm/arch-socfpga/reset_manager.h
> @@ -10,6 +10,8 @@
> void reset_cpu(ulong addr);
> void reset_deassert_peripherals_handoff(void);
>
> +void watchdog_disable(void);
> +
> struct socfpga_reset_manager {
> u32 status;
> u32 ctrl;
>
next prev parent reply other threads:[~2014-09-12 6:10 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-06 0:22 [U-Boot] Mainline u-boot SPL for socfpga Charles Manning
2014-05-08 10:24 ` Chin Liang See
2014-05-11 22:19 ` Charles Manning
2014-05-14 16:42 ` Pavel Machek
2014-05-14 19:01 ` Charles Manning
2014-05-16 8:42 ` Chin Liang See
2014-05-27 12:40 ` Pavel Machek
2014-05-27 12:50 ` [U-Boot] [PATCH] generic board " Pavel Machek
2014-06-02 5:48 ` Chin Liang See
2014-09-09 8:45 ` Albert ARIBAUD
2014-09-09 11:25 ` [U-Boot] [PATCHv2] " Pavel Machek
2014-09-09 12:03 ` [U-Boot] [PATCH] watchdog disable " Pavel Machek
2014-09-09 12:05 ` [U-Boot] [PATCH] base addresses for more subsystems Pavel Machek
2014-09-09 12:26 ` [U-Boot] [PATCH] cleanup drivers/net/phy/micrel.c Pavel Machek
2014-09-15 6:44 ` Chin Liang See
2014-09-12 6:25 ` [U-Boot] [PATCH] base addresses for more subsystems Chin Liang See
2014-09-09 12:08 ` [U-Boot] [PATCH] fix compilation of socfpga_dw_mmc Pavel Machek
2014-09-09 12:16 ` Marek Vasut
2014-09-09 12:20 ` [U-Boot] [PATCH] watchdog disable for socfpga Marek Vasut
2014-09-09 12:30 ` Pavel Machek
2014-09-09 12:31 ` Marek Vasut
2014-09-09 13:09 ` Pavel Machek
2014-09-09 13:46 ` Marek Vasut
2014-09-12 6:17 ` Chin Liang See
2014-09-12 6:10 ` Chin Liang See [this message]
2014-09-12 6:17 ` Marek Vasut
2014-09-12 5:53 ` [U-Boot] [PATCHv2] generic board " Chin Liang See
2014-06-02 5:54 ` [U-Boot] Mainline u-boot SPL " Chin Liang See
2014-06-03 8:49 ` Pavel Machek
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=1410502222.1904.1.camel@clsee-VirtualBox.altera.com \
--to=clsee@altera.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox