From owner-p4-projects@FreeBSD.ORG Mon Aug 7 19:06:03 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1B2D616A4E5; Mon, 7 Aug 2006 19:06:03 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E13A116A4DA for ; Mon, 7 Aug 2006 19:06:02 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 94C2743D55 for ; Mon, 7 Aug 2006 19:06:02 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k77J62p9054702 for ; Mon, 7 Aug 2006 19:06:02 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k77J62Es054699 for perforce@freebsd.org; Mon, 7 Aug 2006 19:06:02 GMT (envelope-from imp@freebsd.org) Date: Mon, 7 Aug 2006 19:06:02 GMT Message-Id: <200608071906.k77J62Es054699@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 103390 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Aug 2006 19:06:03 -0000 http://perforce.freebsd.org/chv.cgi?CH=103390 Change 103390 by imp@imp_bugs on 2006/08/07 19:05:43 At the cost of a few bytes, make this more general. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/lib.h#14 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/reset.c#3 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/lib.h#14 (text) ==== @@ -41,7 +41,7 @@ int xmodem_rx(char *dst); /* */ -void start_wdog(void); +void start_wdog(int n); void reset(void); /* Delay us */ ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/reset.c#3 (text+ko) ==== @@ -49,9 +49,9 @@ * it can kick the watch dog part of the ST part for the OS's driver. */ void -start_wdog(void) +start_wdog(int n) { - // The following should effect a reset after 30 seconds. - AT91C_BASE_ST->ST_WDMR = (30 * (32768 / 128)) | AT91C_ST_RSTEN; + // The following should effect a reset after N seconds. + AT91C_BASE_ST->ST_WDMR = (n * (32768 / 128)) | AT91C_ST_RSTEN; AT91C_BASE_ST->ST_CR = AT91C_ST_WDRST; }