From owner-freebsd-current@FreeBSD.ORG Mon Dec 11 06:21:07 2006 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C071D16A403 for ; Mon, 11 Dec 2006 06:21:07 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9AFBE43CA6 for ; Mon, 11 Dec 2006 06:19:52 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.13.4/8.13.4) with ESMTP id kBB6JiNI084215; Sun, 10 Dec 2006 23:19:44 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Sun, 10 Dec 2006 23:20:41 -0700 (MST) Message-Id: <20061210.232041.221854090.imp@bsdimp.com> To: nick@van-laarhoven.org From: "M. Warner Losh" In-Reply-To: <20061210224138.Y1174@localhost> References: <20061210110419.H42195@localhost> <457C48A8.4010703@errno.com> <20061210224138.Y1174@localhost> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Sun, 10 Dec 2006 23:19:47 -0700 (MST) Cc: current@freebsd.org Subject: Re: Slight interface change on the watchdog fido X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2006 06:21:07 -0000 In message: <20061210224138.Y1174@localhost> Nick Hibma writes: : >> (*) The i80321_wdog.c cannot be disarmed. Is this correct? : >> (**) These have been tested to arm, disarm, and fire. Others have only : >> been compile tested. : >> : >> This change has been tested on 6.2-STABLE and 7-CURRENT. : > : > FWIW there's another watchdog in xscale/ixp425 for the avila boards. : : Oops, I missed the watchdogs available in CURRENT: : : imp at91_st.c : : ./arm/at91/at91_st.c : That one doesn't set *error to error on success. See patch below. I wasn't aware of that requirement... : ./arm/xscale/ixp425/ixp425_wdog.c : Is correct as it is. : : Index: arm/at91/at91_st.c : =================================================================== : RCS file: /home/ncvs/src/sys/arm/at91/at91_st.c,v : retrieving revision 1.5 : diff -u -r1.5 at91_st.c : --- arm/at91/at91_st.c 9 Aug 2006 20:58:55 -0000 1.5 : +++ arm/at91/at91_st.c 10 Dec 2006 21:47:26 -0000 : @@ -170,10 +170,13 @@ : uint32_t wdog; : int t; : : - wdog = 0; : t = cmd & WD_INTERVAL; : - if (cmd != 0 && t >= 22 && t <= 37) : + if (cmd != 0 && t >= 22 && t <= 37) { : wdog = (1 << (t - 22)) | ST_WDMR_RSTEN; : + *error = 0; : + } else { : + wdog = 0; : + } : WR4(ST_WDMR, wdog); : WR4(ST_CR, ST_CR_WDRST); : } Go ahead and commit this. I can do it if you'd like. Warner