From owner-freebsd-hackers Sun Nov 30 03:07:52 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id DAA02515 for hackers-outgoing; Sun, 30 Nov 1997 03:07:52 -0800 (PST) (envelope-from owner-freebsd-hackers) Received: from hydrogen.nike.efn.org (resnet.uoregon.edu [128.223.170.28]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id DAA02510 for ; Sun, 30 Nov 1997 03:07:46 -0800 (PST) (envelope-from gurney_j@efn.org) Received: (from jmg@localhost) by hydrogen.nike.efn.org (8.8.7/8.8.7) id DAA29334; Sun, 30 Nov 1997 03:07:19 -0800 (PST) Message-ID: <19971130030719.29570@hydrogen.nike.efn.org> Date: Sun, 30 Nov 1997 03:07:19 -0800 From: John-Mark Gurney To: Bruce Evans Cc: hackers@freebsd.org, jak@cetlink.net Subject: Re: 650 UART, SIO driver, 8259 PIC References: <199711301019.VAA09201@godzilla.zeta.org.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.69 In-Reply-To: <199711301019.VAA09201@godzilla.zeta.org.au>; from Bruce Evans on Sun, Nov 30, 1997 at 09:19:41PM +1100 Reply-To: John-Mark Gurney Organization: Cu Networking X-Operating-System: FreeBSD 2.2.1-RELEASE i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ Sender: owner-freebsd-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Bruce Evans scribbled this message on Nov 30: > >> >then you have to decide you to tell each port what it's number in the > >> >status register... you don't want to have to force some aweful hack > >> >like requiring the port number to be congruent to device number mod 4... > >> >that would just be terrible (though most people do something similar).. > >> > >> Doesn't the master port give it? The master port is more for control, > >> but it is a normal h/w hack for the control and status ports to be > >> the same. > > > >well.. assuming that you make the master port, port 4 on the board.. > >but there is nothing that assures us this will happen.. the only way > >it to document it's requirement... > > It is documented. See sio.4. ok, I see what you mean.. :) that's good news, but it still doesn't force that the ports be in proper order... we'll just have to document it this way if they want their AST/4 port board working.. just hope that people won't complain because they didn't have their setup correct in the first place.. > >> NetBSD uses a separate driver (with just the AST-specific parts). I'm > >> not sure how it configures a pair of boards sharing an irq. > > > >seems a waste to me... all the code to manipulate the uart is already > >in sio... > > IIRC, it only has the AST-specific parts (initialization and a special > loop to test the status register). ahh.. ok... well.. the code that I was thinking about has now been created, though it doesn't optimize in the other cases (non-AST/4) yet, but that shouldn't be hard to get working... also, I haven't actually tested this code out yet, as the machine that has the boards in it is running 2.2-960802-SNAP and I haven't upgraded it to -current yet... one really big thing that needs to be fixed is that right now, the "sub ports" are limited to 4.. but this isn't hard to fix, simply allocate space at the end of the com_s struct (dyanmicly) and point the array to this area... the code to traverse the set of ports needs to be writen... and we should by default put the local port in this area so we don't have to special case that port... patch: http://resnet.uoregon.edu:6971/~jmg/FreeBSD/ast4.patch -- John-Mark Gurney Modem/FAX: +1 541 683 6954 Cu Networking Live in Peace, destroy Micro$oft, support free software, run FreeBSD