All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zixun LI <admin@hifiphile.com>
To: Eugen Hristev <eugen.hristev@linaro.org>, Tom Rini <trini@konsulko.com>
Cc: Zixun LI <admin@hifiphile.com>, u-boot@lists.denx.de
Subject: [PATCH 4/7] arm: at91: wdt: Add SAM9X60 register definition
Date: Mon, 31 Mar 2025 21:15:13 +0200	[thread overview]
Message-ID: <20250331191520.1805001-5-admin@hifiphile.com> (raw)
In-Reply-To: <20250331191520.1805001-1-admin@hifiphile.com>

SAM9X60 has different watchdog register definition.

Signed-off-by: Zixun LI <admin@hifiphile.com>
---
 arch/arm/mach-at91/include/mach/at91_wdt.h | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-at91/include/mach/at91_wdt.h b/arch/arm/mach-at91/include/mach/at91_wdt.h
index a5accbae521..9ba5283123b 100644
--- a/arch/arm/mach-at91/include/mach/at91_wdt.h
+++ b/arch/arm/mach-at91/include/mach/at91_wdt.h
@@ -33,14 +33,22 @@ struct at91_wdt_priv {
 
 /* Watchdog Mode Register*/
 #define AT91_WDT_MR			0X04
-#define AT91_WDT_MR_WDV(x)		(x & 0xfff)
+#define AT91_WDT_MR_WDV(x)		((x) & 0xfff)
+#define AT91_SAM9X60_MR_PERIODRST	0x00000010
 #define AT91_WDT_MR_WDFIEN		0x00001000
+#define AT91_SAM9X60_MR_WDDIS		0x00001000
 #define AT91_WDT_MR_WDRSTEN		0x00002000
 #define AT91_WDT_MR_WDRPROC		0x00004000
 #define AT91_WDT_MR_WDDIS		0x00008000
-#define AT91_WDT_MR_WDD(x)		((x & 0xfff) << 16)
+#define AT91_WDT_MR_WDD(x)		(((x) & 0xfff) << 16)
 #define AT91_WDT_MR_WDDBGHLT		0x10000000
+#define AT91_SAM9X60_MR_WDIDLEHLT	0x10000000
 #define AT91_WDT_MR_WDIDLEHLT		0x20000000
+#define AT91_SAM9X60_MR_WDDBGHLT	0x20000000
+
+/* Watchdog Window Level Register */
+#define AT91_SAM9X60_WLR		0x0c
+#define AT91_SAM9X60_WLR_COUNTER(x)	((x) & 0xfff)
 
 /* Hardware timeout in seconds */
 #define WDT_MAX_TIMEOUT		16
-- 
2.49.0


  parent reply	other threads:[~2025-03-31 19:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20250331191520.1805001-1-admin@hifiphile.com>
2025-03-31 19:15 ` [PATCH 1/7] arm: at91: wdt: Remove unused at91_wdt struct Zixun LI
2025-04-02 21:00   ` [PATCH 0/7] watchdog: at91sam9_wdt driver enhancement Zixun LI
2025-04-10 10:28   ` [PATCH 1/7] arm: at91: wdt: Remove unused at91_wdt struct Eugen Hristev
2025-04-10 16:42     ` Zixun LI
2025-03-31 19:15 ` [PATCH 2/7] arm: at91: wdt: Rename regval in priv data to mr Zixun LI
2025-03-31 19:15 ` [PATCH 3/7] watchdog: at91sam9_wdt: Rename priv to wdt Zixun LI
2025-03-31 19:15 ` Zixun LI [this message]
2025-03-31 19:15 ` [PATCH 5/7] watchdog: at91sam9_wdt: Add SAM9X60 support Zixun LI
2025-03-31 19:15 ` [PATCH 6/7] ARM: dts: sam9x60: Add watchdog DT node Zixun LI
2025-03-31 19:15 ` [PATCH 7/7] ARM: dts: at91: sam9x60-curiosity: Enable watchdog node Zixun LI

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=20250331191520.1805001-5-admin@hifiphile.com \
    --to=admin@hifiphile.com \
    --cc=eugen.hristev@linaro.org \
    --cc=trini@konsulko.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.