From patchwork Wed Mar 9 16:35:43 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 86127 X-Patchwork-Delegate: sbabic@denx.de 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 4541DB6F7E for ; Thu, 10 Mar 2011 03:40:49 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A9CE128086; Wed, 9 Mar 2011 17:40:46 +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 Bd0LZ8S0bNn8; Wed, 9 Mar 2011 17:40:46 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id CA90B28087; Wed, 9 Mar 2011 17:40:44 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id AC03F28087 for ; Wed, 9 Mar 2011 17:40: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 rc2SSkUL6-mX for ; Wed, 9 Mar 2011 17:40:40 +0100 (CET) X-Greylist: delayed 904 seconds by postgrey-1.27 at theia; Wed, 09 Mar 2011 17:40:38 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 ch1outboundpool.messaging.microsoft.com (ch1outboundpool.messaging.microsoft.com [216.32.181.184]) by theia.denx.de (Postfix) with ESMTPS id 0E08628086 for ; Wed, 9 Mar 2011 17:40:38 +0100 (CET) Received: from mail225-ch1-R.bigfish.com (216.32.181.175) by CH1EHSOBE009.bigfish.com (10.43.70.59) with Microsoft SMTP Server id 14.1.225.8; Wed, 9 Mar 2011 16:25:32 +0000 Received: from mail225-ch1 (localhost.localdomain [127.0.0.1]) by mail225-ch1-R.bigfish.com (Postfix) with ESMTP id A2DFBF304A6; Wed, 9 Mar 2011 16:25:32 +0000 (UTC) X-SpamScore: 0 X-BigFish: VS0(zzzz1202hzz8275bhz2dh2a8h668h61h) X-Spam-TCS-SCL: 0:0 X-Forefront-Antispam-Report: KIP:(null); UIP:(null); IPVD:NLI; H:mail.freescale.net; RD:none; EFVD:NLI Received: from mail225-ch1 (localhost.localdomain [127.0.0.1]) by mail225-ch1 (MessageSwitch) id 1299687932520790_18390; Wed, 9 Mar 2011 16:25:32 +0000 (UTC) Received: from CH1EHSMHS008.bigfish.com (snatpool1.int.messaging.microsoft.com [10.43.68.253]) by mail225-ch1.bigfish.com (Postfix) with ESMTP id 730C16D804C; Wed, 9 Mar 2011 16:25:32 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by CH1EHSMHS008.bigfish.com (10.43.70.8) with Microsoft SMTP Server (TLS) id 14.1.225.8; Wed, 9 Mar 2011 16:25:29 +0000 Received: from az33smr02.freescale.net (10.64.34.200) by 039-SN1MMR1-001.039d.mgd.msft.net (10.84.1.13) with Microsoft SMTP Server id 14.1.270.2; Wed, 9 Mar 2011 10:25:26 -0600 Received: from localhost.localdomain ([10.29.240.182]) by az33smr02.freescale.net (8.13.1/8.13.0) with ESMTP id p29GPOYV000332; Wed, 9 Mar 2011 10:25:25 -0600 (CST) From: Fabio Estevam To: Date: Wed, 9 Mar 2011 13:35:43 -0300 Message-ID: <1299688544-13635-1-git-send-email-fabio.estevam@freescale.com> X-Mailer: git-send-email 1.6.0.4 MIME-Version: 1.0 X-OriginatorOrg: freescale.com Cc: Fabio Estevam Subject: [U-Boot] [PATCH 1/2] MX31: mx31pdk: Add watchdog support X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 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 Signed-off-by: Fabio Estevam --- board/freescale/mx31pdk/mx31pdk.c | 16 ++++++++++++++++ include/configs/mx31pdk.h | 1 + 2 files changed, 17 insertions(+), 0 deletions(-) diff --git a/board/freescale/mx31pdk/mx31pdk.c b/board/freescale/mx31pdk/mx31pdk.c index a9f0fb4..4a5d3ef 100644 --- a/board/freescale/mx31pdk/mx31pdk.c +++ b/board/freescale/mx31pdk/mx31pdk.c @@ -28,9 +28,17 @@ #include #include #include +#include DECLARE_GLOBAL_DATA_PTR; +#ifdef CONFIG_HW_WATCHDOG +void hw_watchdog_reset(void) +{ + mxc_hw_watchdog_reset(); +} +#endif + int dram_init(void) { /* dram_init must store complete ramsize in gd->ram_size */ @@ -68,6 +76,14 @@ int board_init(void) return 0; } +int board_late_init(void) +{ +#ifdef CONFIG_HW_WATCHDOG + mxc_hw_watchdog_enable(); +#endif + return 0; +} + int checkboard(void) { printf("Board: i.MX31 MAX PDK (3DS)\n"); diff --git a/include/configs/mx31pdk.h b/include/configs/mx31pdk.h index 86c758f..1f1de46 100644 --- a/include/configs/mx31pdk.h +++ b/include/configs/mx31pdk.h @@ -61,6 +61,7 @@ #define CONFIG_MXC_UART 1 #define CONFIG_SYS_MX31_UART1 1 +#define CONFIG_HW_WATCHDOG #define CONFIG_HARD_SPI 1 #define CONFIG_MXC_SPI 1