From owner-p4-projects@FreeBSD.ORG Wed Apr 26 23:27:55 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 84CC716A413; Wed, 26 Apr 2006 23:27:55 +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 6029B16A411 for ; Wed, 26 Apr 2006 23:27:55 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2B2B943D49 for ; Wed, 26 Apr 2006 23:27:55 +0000 (GMT) (envelope-from marcel@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 k3QNRtkX015500 for ; Wed, 26 Apr 2006 23:27:55 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3QNRsam015497 for perforce@freebsd.org; Wed, 26 Apr 2006 23:27:54 GMT (envelope-from marcel@freebsd.org) Date: Wed, 26 Apr 2006 23:27:54 GMT Message-Id: <200604262327.k3QNRsam015497@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 96170 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: Wed, 26 Apr 2006 23:27:55 -0000 http://perforce.freebsd.org/chv.cgi?CH=96170 Change 96170 by marcel@marcel_nfs on 2006/04/26 23:26:58 Save the final value of the SPR register in the least significant bits. That allows us easy access from within the interrupt handler. Affected files ... .. //depot/projects/uart/dev/puc/pucdata.c#29 edit Differences ... ==== //depot/projects/uart/dev/puc/pucdata.c#29 (text+ko) ==== @@ -743,7 +743,7 @@ /* Clear DLAB in the LCR register of UART 0. */ bus_write_1(bar->b_res, 3, 0); /* Save the two values read-back from the SPR register. */ - sc->sc_cfg_data = (v1 << 8) | v0; + sc->sc_cfg_data = (v0 << 8) | v1; if (v0 == 0 && v1 == 0x80 + -cfg->clock) { /* * The SPR register echoed the two values written @@ -779,8 +779,8 @@ "%d selected\n", 1 << -cfg->clock); return (0); case PUC_CFG_GET_CLOCK: - v0 = sc->sc_cfg_data & 0xff; - v1 = (sc->sc_cfg_data >> 8) & 0xff; + v0 = (sc->sc_cfg_data >> 8) & 0xff; + v1 = sc->sc_cfg_data & 0xff; if (v0 == 0 && v1 == 0x80 + -cfg->clock) { /* * XXX With the SPAD jumper applied, there's no @@ -801,8 +801,8 @@ *res = DEFAULT_RCLK << v0; return (0); case PUC_CFG_GET_ILR: - v0 = sc->sc_cfg_data & 0xff; - v1 = (sc->sc_cfg_data >> 8) & 0xff; + v0 = (sc->sc_cfg_data >> 8) & 0xff; + v1 = sc->sc_cfg_data & 0xff; *res = (v0 == 0 && v1 == 0x80 + -cfg->clock) ? PUC_ILR_NONE : PUC_ILR_QUATECH; return (0);