All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sonic Zhang <sonic.adi@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 10/11] Blackfin: bf60x: add hw watchdog support
Date: Thu, 7 Feb 2013 15:47:37 +0800	[thread overview]
Message-ID: <1360223258-6945-11-git-send-email-sonic.adi@gmail.com> (raw)
In-Reply-To: <1360223258-6945-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>
---
 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 acfa475..5ee2203 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 a599127..0b5859f 100644
--- a/include/configs/bf609-ezkit.h
+++ b/include/configs/bf609-ezkit.h
@@ -67,6 +67,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-07  7:47 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-07  7:47 [U-Boot] [PATCH 00/11] Add BF60x processor support to Blackfin architecture Sonic Zhang
2013-02-07  7:47 ` [U-Boot] [PATCH 01/11] Blackfin: bf60x: new processor header files Sonic Zhang
2013-02-07  7:47 ` [U-Boot] [PATCH 02/11] Blackfin: bf60x: Port blackfin core architecture code to boot on bf60x Sonic Zhang
2013-02-07 10:21   ` Wolfgang Denk
2013-02-08  4:31     ` Sonic Zhang
2013-02-07  7:47 ` [U-Boot] [PATCH 03/11] Blackfin: bf60x: add serial support Sonic Zhang
2013-02-07 10:15   ` Wolfgang Denk
2013-02-08  4:20     ` Sonic Zhang
2013-02-07  7:47 ` [U-Boot] [PATCH 04/11] Blackfin: bf60x: add dma support Sonic Zhang
2013-02-07 10:11   ` Wolfgang Denk
2013-02-08  4:17     ` Sonic Zhang
2013-02-07  7:47 ` [U-Boot] [PATCH 05/11] Blackfin: bf60x: support big cplb page Sonic Zhang
2013-02-07 10:33   ` Wolfgang Denk
2013-02-08  4:22     ` Sonic Zhang
2013-02-18  2:43     ` Bob Liu
2013-02-18  7:41       ` Sonic Zhang
2013-02-07  7:47 ` [U-Boot] [PATCH 06/11] Blackfin: bf60x: add gpio support Sonic Zhang
2013-02-07  7:47 ` [U-Boot] [PATCH 07/11] blackfin: bf609: add board and headers files to support bf609 Sonic Zhang
2013-02-07 10:26   ` Wolfgang Denk
2013-02-08  4:26     ` Sonic Zhang
2013-02-08  6:29     ` Sonic Zhang
2013-02-08  8:29     ` Sonic Zhang
2013-02-17 20:13       ` Wolfgang Denk
2013-02-07  7:47 ` [U-Boot] [PATCH 08/11] Blackfin: bf60x: add rsi/sdh support Sonic Zhang
2013-02-07 10:17   ` Wolfgang Denk
2013-02-08  4:33     ` Sonic Zhang
2013-02-08  8:35     ` Sonic Zhang
2013-02-17 20:15       ` Wolfgang Denk
2013-02-18  7:38         ` Sonic Zhang
2013-03-04 11:21           ` Wolfgang Denk
2013-03-05  2:22             ` Sonic Zhang
2013-02-07  7:47 ` [U-Boot] [PATCH 09/11] Blackfin: spi: add bf6xx spi driver Sonic Zhang
2013-02-07 10:23   ` Wolfgang Denk
2013-02-08  6:50     ` Sonic Zhang
2013-02-17 20:12       ` Wolfgang Denk
2013-02-07  7:47 ` Sonic Zhang [this message]
2013-02-07  7:47 ` [U-Boot] [PATCH 11/11] Blackfin: bf60x: add resume from hibernate Sonic Zhang
2013-02-07 10:22   ` Wolfgang Denk
2013-02-07 10:04 ` [U-Boot] [PATCH 00/11] Add BF60x processor support to Blackfin architecture Wolfgang Denk
2013-02-07 12:28   ` Albert ARIBAUD

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=1360223258-6945-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 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.