From patchwork Tue Feb 19 07:01:05 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sonic Zhang X-Patchwork-Id: 221632 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 2C6292C0077 for ; Tue, 19 Feb 2013 18:21:44 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 823DD4A18F; Tue, 19 Feb 2013 08:21:41 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ARehUKEa7Tyf; Tue, 19 Feb 2013 08:21:41 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2DD884A17F; Tue, 19 Feb 2013 08:21:31 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C39184A189 for ; Tue, 19 Feb 2013 08:21:27 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Qff4bykpyB33 for ; Tue, 19 Feb 2013 08:21:26 +0100 (CET) X-Greylist: delayed 907 seconds by postgrey-1.27 at theia; Tue, 19 Feb 2013 08:21:21 CET X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from tx2outboundpool.messaging.microsoft.com (tx2ehsobe003.messaging.microsoft.com [65.55.88.13]) by theia.denx.de (Postfix) with ESMTPS id 0A6D34A191 for ; Tue, 19 Feb 2013 08:21:21 +0100 (CET) Received: from mail29-tx2-R.bigfish.com (10.9.14.247) by TX2EHSOBE011.bigfish.com (10.9.40.31) with Microsoft SMTP Server id 14.1.225.23; Tue, 19 Feb 2013 07:06:13 +0000 Received: from mail29-tx2 (localhost [127.0.0.1]) by mail29-tx2-R.bigfish.com (Postfix) with ESMTP id 07BCE2C01C6; Tue, 19 Feb 2013 07:06:13 +0000 (UTC) X-Forefront-Antispam-Report: CIP:137.71.25.55; KIP:(null); UIP:(null); IPV:NLI; H:nwd2mta1.analog.com; RD:nwd2mail10.analog.com; EFVD:NLI X-SpamScore: 12 X-BigFish: VS12(zzzz1f42h1ee6h1ce5h1202h1e76h1d1ah1cabh1d2ahzz8275bhz2ei87h2a8h668h839hd24he5bh1288h12a5h12a9h12bdh12e5h1354h137ah139eh13b6h13eah1441h1504h1537h15a8h162dh1631h1758h17eeh1898h18e1h1946h19b5hff4m1355m129fi1155h) Received-SPF: neutral (mail29-tx2: 137.71.25.55 is neither permitted nor denied by domain of gmail.com) client-ip=137.71.25.55; envelope-from=sonic.adi@gmail.com; helo=nwd2mta1.analog.com ; 1.analog.com ; X-FB-DOMAIN-IP-MATCH: fail Received: from mail29-tx2 (localhost.localdomain [127.0.0.1]) by mail29-tx2 (MessageSwitch) id 1361257553977363_25929; Tue, 19 Feb 2013 07:05:53 +0000 (UTC) Received: from TX2EHSMHS014.bigfish.com (unknown [10.9.14.244]) by mail29-tx2.bigfish.com (Postfix) with ESMTP id E0FAB1802D1; Tue, 19 Feb 2013 07:05:53 +0000 (UTC) Received: from nwd2mta1.analog.com (137.71.25.55) by TX2EHSMHS014.bigfish.com (10.9.99.114) with Microsoft SMTP Server (TLS) id 14.1.225.23; Tue, 19 Feb 2013 07:05:53 +0000 Received: from NWD2HUBCAS5.ad.analog.com (nwd2hubcas5.ad.analog.com [10.64.72.161]) by nwd2mta1.analog.com (8.13.8/8.13.8) with ESMTP id r1J75q9m021263 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Mon, 18 Feb 2013 23:05:52 -0800 Received: from NWD2HUBCAS2.ad.analog.com (10.64.73.30) by NWD2HUBCAS5.ad.analog.com (10.64.72.161) with Microsoft SMTP Server (TLS) id 14.2.328.9; Tue, 19 Feb 2013 02:05:52 -0500 Received: from zeus.spd.analog.com (10.64.82.11) by NWD2HUBCAS2.ad.analog.com (10.64.73.30) with Microsoft SMTP Server id 8.3.83.0; Tue, 19 Feb 2013 02:05:52 -0500 Received: from linux.site ([10.99.22.20]) by zeus.spd.analog.com (8.14.5/8.14.5) with ESMTP id r1J75pKe021388; Tue, 19 Feb 2013 02:05:51 -0500 Received: from localhost.localdomain (unknown [10.99.22.81]) by linux.site (Postfix) with ESMTP id BFC5342CE0F1; Mon, 18 Feb 2013 16:37:15 -0700 (MST) From: Sonic Zhang To: Wolfgang Denk , Date: Tue, 19 Feb 2013 15:01:05 +0800 Message-ID: <1361257266-3722-11-git-send-email-sonic.adi@gmail.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1361257266-3722-1-git-send-email-sonic.adi@gmail.com> References: <1361257266-3722-1-git-send-email-sonic.adi@gmail.com> MIME-Version: 1.0 Cc: u-boot-devel@blackfin.uclinux.org, Sonic@theia.denx.de, Zhang Subject: [U-Boot] [PATCH v2 10/11] Blackfin: bf60x: add hw watchdog support X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de From: Bob Liu Signed-off-by: Bob Liu Signed-off-by: Sonic Zhang --- 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 e304d3e..374fe6d 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 */