From: Pavel Machek <pavel@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] watchdog disable for socfpga
Date: Tue, 9 Sep 2014 14:03:28 +0200 [thread overview]
Message-ID: <20140909120328.GA20662@amd> (raw)
In-Reply-To: <20140909112533.GA15404@amd>
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
+
+/* 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;
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
next prev parent reply other threads:[~2014-09-09 12:03 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 ` Pavel Machek [this message]
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
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=20140909120328.GA20662@amd \
--to=pavel@denx.de \
--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.