public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Sonic Zhang <sonic.adi@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v4 10/11] blackfin: bf60x: add hw watchdog support
Date: Thu, 21 Feb 2013 19:06:48 +0800	[thread overview]
Message-ID: <1361444809-22035-11-git-send-email-sonic.adi@gmail.com> (raw)
In-Reply-To: <1361444809-22035-1-git-send-email-sonic.adi@gmail.com>

From: Bob Liu <lliubbo@gmail.com>

Signed-off-by: Bob Liu <lliubbo@gmail.com>
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
---
Changes in v4: None
Changes in v3: None
Changes in v2: None

 arch/blackfin/cpu/initcode.c  |   13 +++++++++++++
 arch/blackfin/cpu/start.S     |    2 ++
 include/configs/bf609-ezkit.h |    1 +
 3 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/arch/blackfin/cpu/initcode.c b/arch/blackfin/cpu/initcode.c
index a717148..ce9a435 100644
--- a/arch/blackfin/cpu/initcode.c
+++ b/arch/blackfin/cpu/initcode.c
@@ -461,8 +461,21 @@ program_early_devices(ADI_BOOT_DATA *bs, uint *sdivB, uint *divB, uint *vcoB)
 	 */
 	if (CONFIG_BFIN_BOOT_MODE != BFIN_BOOT_BYPASS) {
 		serial_putc('e');
+#ifdef __ADSPBF60x__
+		bfin_write_SEC_GCTL(0x2);
+		SSYNC();
+		bfin_write_SEC_FCTL(0xc1);
+		bfin_write_SEC_SCTL(2, bfin_read_SEC_SCTL(2) | 0x6);
+
+		bfin_write_SEC_CCTL(0x2);
+		SSYNC();
+		bfin_write_SEC_GCTL(0x1);
+		bfin_write_SEC_CCTL(0x1);
+#endif
 		bfin_write_WDOG_CNT(MSEC_TO_SCLK(CONFIG_HW_WATCHDOG_TIMEOUT_INITCODE));
+#if CONFIG_BFIN_BOOT_MODE != BFIN_BOOT_UART
 		bfin_write_WDOG_CTL(0);
+#endif
 		serial_putc('f');
 	}
 #endif
diff --git a/arch/blackfin/cpu/start.S b/arch/blackfin/cpu/start.S
index 90b4d1a..7155fc8 100644
--- a/arch/blackfin/cpu/start.S
+++ b/arch/blackfin/cpu/start.S
@@ -65,6 +65,7 @@ ENTRY(_start)
 	p5.h = HI(COREMMR_BASE);
 
 #ifdef CONFIG_HW_WATCHDOG
+#ifndef __ADSPBF60x__
 # ifndef CONFIG_HW_WATCHDOG_TIMEOUT_START
 #  define CONFIG_HW_WATCHDOG_TIMEOUT_START 5000
 # endif
@@ -78,6 +79,7 @@ ENTRY(_start)
 	/* fire up the watchdog - R0.L above needs to be 0x0000 */
 	W[p4 + (WDOG_CTL - SYSMMR_BASE)] = r0;
 #endif
+#endif
 
 	/* Turn on the serial for debugging the init process */
 	serial_early_init
diff --git a/include/configs/bf609-ezkit.h b/include/configs/bf609-ezkit.h
index 6dffab8..02149fa 100644
--- a/include/configs/bf609-ezkit.h
+++ b/include/configs/bf609-ezkit.h
@@ -63,6 +63,7 @@
 #define CONFIG_SYS_MONITOR_LEN	(768 * 1024)
 #define CONFIG_SYS_MALLOC_LEN	(512 * 1024)
 
+#define CONFIG_HW_WATCHDOG
 /*
  * Network Settings
  */
-- 
1.7.0.4

  parent reply	other threads:[~2013-02-21 11:06 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-21 11:06 [U-Boot] [PATCH v4 0/11] Add BF60x processor support to Blackfin architecture Sonic Zhang
2013-02-21 11:06 ` [U-Boot] [PATCH v4 01/11] blackfin: bf60x: new processor header files Sonic Zhang
2013-02-21 11:06 ` [U-Boot] [PATCH v4 02/11] blackfin: bf60x: Port blackfin core architecture code to boot on bf60x Sonic Zhang
2013-02-21 11:06 ` [U-Boot] [PATCH v4 03/11] blackfin: bf60x: add serial support Sonic Zhang
2013-02-21 11:06 ` [U-Boot] [PATCH v4 04/11] blackfin: bf60x: add dma support Sonic Zhang
2013-02-21 11:06 ` [U-Boot] [PATCH v4 05/11] blackfin: bf60x: support big cplb page Sonic Zhang
2013-02-21 11:06 ` [U-Boot] [PATCH v4 06/11] blackfin: bf60x: add gpio support Sonic Zhang
2013-02-21 11:06 ` [U-Boot] [PATCH v4 07/11] blackfin: bf60x: add board and headers files to support bf609 Sonic Zhang
2013-02-21 11:06 ` [U-Boot] [PATCH v4 08/11] blackfin: bf60x: add rsi/sdh support Sonic Zhang
2013-02-21 11:06 ` [U-Boot] [PATCH v4 09/11] blackfin: add bf6xx spi driver Sonic Zhang
2013-02-21 11:06 ` Sonic Zhang [this message]
2013-02-21 11:06 ` [U-Boot] [PATCH v4 11/11] blackfin: bf60x: add resume from hibernate Sonic Zhang
2013-02-28 21:22 ` [U-Boot] [PATCH v4 0/11] Add BF60x processor support to Blackfin architecture Tom Rini
2013-03-01  2:10   ` Sonic Zhang
2013-03-01 14:16     ` Tom Rini

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=1361444809-22035-11-git-send-email-sonic.adi@gmail.com \
    --to=sonic.adi@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox