From owner-p4-projects@FreeBSD.ORG Sun Feb 20 03:18:55 2005 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 918A616A4FC; Sun, 20 Feb 2005 03:18:54 +0000 (GMT) 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 40D9016A4CF for ; Sun, 20 Feb 2005 03:18:54 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2237543D53 for ; Sun, 20 Feb 2005 03:18:54 +0000 (GMT) (envelope-from jmg@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j1K3IsAo086213 for ; Sun, 20 Feb 2005 03:18:54 GMT (envelope-from jmg@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j1K3Irr2086210 for perforce@freebsd.org; Sun, 20 Feb 2005 03:18:53 GMT (envelope-from jmg@freebsd.org) Date: Sun, 20 Feb 2005 03:18:53 GMT Message-Id: <200502200318.j1K3Irr2086210@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jmg@freebsd.org using -f From: John-Mark Gurney To: Perforce Change Reviews Subject: PERFORCE change 71359 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Feb 2005 03:18:55 -0000 http://perforce.freebsd.org/chv.cgi?CH=71359 Change 71359 by jmg@jmg_carbon on 2005/02/20 03:18:12 add code to reset the cpu on the TS-7200 board... Submitted by: cognet Obtained from: NetBSD Affected files ... .. //depot/projects/arm/src/sys/arm/ep93xx/ep93xx.c#2 edit Differences ... ==== //depot/projects/arm/src/sys/arm/ep93xx/ep93xx.c#2 (text+ko) ==== @@ -67,6 +67,8 @@ #include #include +#include /* XXX */ + /* Software copy of the IRQs we have enabled. */ __volatile u_int32_t vic1_intr_enabled; __volatile u_int32_t vic2_intr_enabled; @@ -180,7 +182,28 @@ void cpu_reset(void) { - while(1); + /* + * Make really really sure that all interrupts are disabled, + * and poke the Internal Bus and Peripheral Bus reset lines. + */ + (void) disable_interrupts(I32_bit|F32_bit); + { + u_int32_t feed, ctrl; + + feed = TS7XXX_IO16_VBASE + TS7XXX_WDOGFEED; + ctrl = TS7XXX_IO16_VBASE + TS7XXX_WDOGCTRL; + + __asm __volatile ( + "mov r0, #0x5\n" + "mov r1, #0x1\n" + "strh r0, [%0]\n" + "strh r1, [%1]\n" + : + : "r" (feed), "r" (ctrl) + : "r0", "r1" + ); + } + while (1); } static struct resource *