From patchwork Fri Feb 21 20:57:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chin Liang See X-Patchwork-Id: 323023 X-Patchwork-Delegate: albert.aribaud@free.fr 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 474592C0312 for ; Sat, 22 Feb 2014 07:58:28 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B9BD04B825; Fri, 21 Feb 2014 21:58:26 +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 hbhIDf81DSV6; Fri, 21 Feb 2014 21:58:26 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 68C9D4B82E; Fri, 21 Feb 2014 21:58:24 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D85B44B82E for ; Fri, 21 Feb 2014 21:58:19 +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 DRZk07ACafhq for ; Fri, 21 Feb 2014 21:58:16 +0100 (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 na01-bl2-obe.outbound.protection.outlook.com (mail-bl2on0145.outbound.protection.outlook.com [65.55.169.145]) by theia.denx.de (Postfix) with ESMTPS id 0E28F4B825 for ; Fri, 21 Feb 2014 21:58:11 +0100 (CET) Received: from BL2FFO11FD020.protection.gbl (10.173.160.32) by BL2FFO11HUB035.protection.gbl (10.173.161.115) with Microsoft SMTP Server (TLS) id 15.0.868.13; Fri, 21 Feb 2014 20:57:51 +0000 Received: from SJ-ITEXEDGE02.altera.priv.altera.com (66.35.236.232) by BL2FFO11FD020.mail.protection.outlook.com (10.173.161.38) with Microsoft SMTP Server (TLS) id 15.0.878.20 via Frontend Transport; Fri, 21 Feb 2014 20:57:51 +0000 Received: from sj-mail01.altera.com (137.57.1.6) by SJ-ITEXEDGE02.altera.priv.altera.com (66.35.236.232) with Microsoft SMTP Server id 8.3.342.0; Fri, 21 Feb 2014 12:45:10 -0800 Received: from clsee-VirtualBox.altera.com (tx-clsee-530.altera.priv.altera.com [137.57.188.113]) by sj-mail01.altera.com (8.13.7+Sun/8.13.7) with ESMTP id s1LKvjPD018920; Fri, 21 Feb 2014 12:57:49 -0800 (PST) From: Chin Liang See To: ZY - u-boot Date: Fri, 21 Feb 2014 14:57:44 -0600 Message-ID: <1393016264-8092-1-git-send-email-clsee@altera.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:66.35.236.232; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019001)(6009001)(189002)(199002)(62966002)(65816001)(53416003)(80022001)(88136002)(81542001)(47976001)(50986001)(46102001)(83322001)(19580405001)(44976005)(19580395003)(50226001)(4396001)(51856001)(49866001)(6806004)(69226001)(87266001)(87286001)(47736001)(85306002)(87936001)(92566001)(36756003)(81686001)(76796001)(76786001)(93916002)(76176001)(74662001)(80976001)(81816001)(33646001)(86362001)(94316002)(74366001)(93136001)(48376002)(93516002)(95416001)(95666003)(94946001)(85852003)(74706001)(83072002)(89996001)(90146001)(56816005)(74876001)(81342001)(92726001)(50466002)(53806001)(77096001)(77156001)(77982001)(56776001)(54316002)(59766001)(47446002)(74502001)(76482001)(31966008)(20776003)(47776003)(79102001)(63696002); DIR:OUT; SFP:1102; SCL:1; SRVR:BL2FFO11HUB035; H:SJ-ITEXEDGE02.altera.priv.altera.com; CLIP:66.35.236.232; FPR:BCF936E7.CB909F2B.42F92B47.97209A21.20234; MLV:nspm; InfoDomainNonexistentMX:1; A:1; LANG:en; X-OriginatorOrg: altera.onmicrosoft.com X-Forefront-PRVS: 01294F875B Cc: Tom Rini , Chin Liang See Subject: [U-Boot] [PATCH v3 2/2] socfpga: Adding DesignWare 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 To enable the DesignWare watchdog support at SOCFPGA Cyclone V dev kit. Signed-off-by: Chin Liang See Cc: Anatolij Gustschin Cc: Albert Aribaud Cc: Heiko Schocher Cc: Tom Rini --- Changes for v3 - Split to 2 series patch Changes for v2 - Enable this driver at socfpga_cyclone5 board --- .../include/asm/arch-socfpga/socfpga_base_addrs.h | 1 + include/configs/socfpga_cyclone5.h | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/arch/arm/include/asm/arch-socfpga/socfpga_base_addrs.h b/arch/arm/include/asm/arch-socfpga/socfpga_base_addrs.h index 20f12e0..5f73824 100644 --- a/arch/arm/include/asm/arch-socfpga/socfpga_base_addrs.h +++ b/arch/arm/include/asm/arch-socfpga/socfpga_base_addrs.h @@ -11,6 +11,7 @@ #define SOCFPGA_UART0_ADDRESS 0xffc02000 #define SOCFPGA_UART1_ADDRESS 0xffc03000 #define SOCFPGA_OSC1TIMER0_ADDRESS 0xffd00000 +#define SOCFPGA_L4WD0_ADDRESS 0xffd02000 #define SOCFPGA_CLKMGR_ADDRESS 0xffd04000 #define SOCFPGA_RSTMGR_ADDRESS 0xffd05000 #define SOCFPGA_SYSMGR_ADDRESS 0xffd08000 diff --git a/include/configs/socfpga_cyclone5.h b/include/configs/socfpga_cyclone5.h index fc921ee..1b78ccb 100644 --- a/include/configs/socfpga_cyclone5.h +++ b/include/configs/socfpga_cyclone5.h @@ -207,6 +207,16 @@ #define CONFIG_ENV_IS_NOWHERE /* + * L4 Watchdog + */ +#define CONFIG_HW_WATCHDOG +#define CONFIG_HW_WATCHDOG_TIMEOUT_MS 2000 +#define CONFIG_DESIGNWARE_WATCHDOG +#define CONFIG_DW_WDT_BASE SOCFPGA_L4WD0_ADDRESS +/* Clocks source frequency to watchdog timer */ +#define CONFIG_DW_WDT_CLOCK_KHZ 25000 + +/* * SPL "Second Program Loader" aka Initial Software */ @@ -238,4 +248,7 @@ /* Support for lib/libgeneric.o in SPL binary */ #define CONFIG_SPL_LIBGENERIC_SUPPORT +/* Support for watchdog */ +#define CONFIG_SPL_WATCHDOG_SUPPORT + #endif /* __CONFIG_H */