From owner-p4-projects@FreeBSD.ORG Sun May 23 18:14:39 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 58D7D16A4D0; Sun, 23 May 2004 18:14:39 -0700 (PDT) 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 181F816A4CE for ; Sun, 23 May 2004 18:14:39 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id EF8FF43D1F for ; Sun, 23 May 2004 18:14:38 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i4O1Dsv3043509 for ; Sun, 23 May 2004 18:13:54 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i4O1DsOe043506 for perforce@freebsd.org; Sun, 23 May 2004 18:13:54 -0700 (PDT) (envelope-from marcel@freebsd.org) Date: Sun, 23 May 2004 18:13:54 -0700 (PDT) Message-Id: <200405240113.i4O1DsOe043506@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 Subject: PERFORCE change 53366 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: Mon, 24 May 2004 01:14:40 -0000 http://perforce.freebsd.org/chv.cgi?CH=53366 Change 53366 by marcel@marcel_nfs on 2004/05/23 18:13:48 Remove all alpha specific console code. A serial console based on sio(4) does not need it on my Alpha. This may not hold for all the various models, but in that case it should be handled in a way less gross. Affected files ... .. //depot/projects/gdb/sys/dev/sio/sio.c#10 edit Differences ... ==== //depot/projects/gdb/sys/dev/sio/sio.c#10 (text+ko) ==== @@ -2746,28 +2746,20 @@ sprintf(cd->cn_name, "ttyd%d", unit); } -#ifndef __alpha__ static speed_t siocngetspeed(Port_t, u_long rclk); -#endif static void siocnclose(struct siocnstate *sp, Port_t iobase); static void siocnopen(struct siocnstate *sp, Port_t iobase, int speed); static void siocntxwait(Port_t iobase); -#ifdef __alpha__ -int siocnattach(int port, int speed); -#else static cn_probe_t siocnprobe; static cn_init_t siocninit; static cn_term_t siocnterm; -#endif static cn_checkc_t siocncheckc; static cn_getc_t siocngetc; static cn_putc_t siocnputc; -#ifndef __alpha__ CONS_DRIVER(sio, siocnprobe, siocninit, siocnterm, siocngetc, siocncheckc, siocnputc, NULL); -#endif static void siocntxwait(iobase) @@ -2786,8 +2778,6 @@ ; } -#ifndef __alpha__ - /* * Read the serial port specified and try to figure out what speed * it's currently running at. We're assuming the serial port has @@ -2823,8 +2813,6 @@ return (rclk / (16UL * divisor)); } -#endif - static void siocnopen(sp, iobase, speed) struct siocnstate *sp; @@ -2892,8 +2880,6 @@ outb(iobase + com_ier, sp->ier); } -#ifndef __alpha__ - static void siocnprobe(cp) struct consdev *cp; @@ -2991,56 +2977,6 @@ comconsole = -1; } -#endif - -#ifdef __alpha__ - -CONS_DRIVER(sio, NULL, NULL, NULL, siocngetc, siocncheckc, siocnputc, NULL); - -int -siocnattach(port, speed) - int port; - int speed; -{ - int s; - u_char cfcr; - u_int divisor; - struct siocnstate sp; - int unit = 0; /* XXX random value! */ - - siocniobase = port; - siocnunit = unit; - comdefaultrate = speed; - sio_consdev.cn_pri = CN_NORMAL; - siocnset(&sio_consdev, unit); - - s = spltty(); - - /* - * Initialize the divisor latch. We can't rely on - * siocnopen() to do this the first time, since it - * avoids writing to the latch if the latch appears - * to have the correct value. Also, if we didn't - * just read the speed from the hardware, then we - * need to set the speed in hardware so that - * switching it later is null. - */ - cfcr = inb(siocniobase + com_cfcr); - outb(siocniobase + com_cfcr, CFCR_DLAB | cfcr); - divisor = siodivisor(comdefaultrclk, comdefaultrate); - outb(siocniobase + com_dlbl, divisor & 0xff); - outb(siocniobase + com_dlbh, divisor >> 8); - outb(siocniobase + com_cfcr, cfcr); - - siocnopen(&sp, siocniobase, comdefaultrate); - splx(s); - - cnadd(&sio_consdev); - return (0); -} - -#endif - static int siocncheckc(struct consdev *cd) {