From owner-freebsd-sparc64@FreeBSD.ORG Sun Aug 31 05:45:23 2003 Return-Path: Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5070C16A4BF for ; Sun, 31 Aug 2003 05:45:23 -0700 (PDT) Received: from mail.gmx.net (imap.gmx.net [213.165.64.20]) by mx1.FreeBSD.org (Postfix) with SMTP id C1FF643FB1 for ; Sun, 31 Aug 2003 05:45:21 -0700 (PDT) (envelope-from tmoestl@gmx.net) Received: (qmail 12345 invoked by uid 65534); 31 Aug 2003 12:45:20 -0000 Received: from p508E5667.dip.t-dialin.net (EHLO timesink.dyndns.org) (80.142.86.103) by mail.gmx.net (mp009) with SMTP; 31 Aug 2003 14:45:20 +0200 Received: by galatea (Postfix, from userid 1001) id 8775ABD; Sun, 31 Aug 2003 14:45:36 +0200 (CEST) Date: Sun, 31 Aug 2003 14:45:36 +0200 From: Thomas Moestl To: Marcel Moolenaar Message-ID: <20030831124536.GA679@timesink.dyndns.org> Mail-Followup-To: Marcel Moolenaar , sparc64@freebsd.org References: <20030829211641.GA628@athlon.pn.xcllnt.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030829211641.GA628@athlon.pn.xcllnt.net> User-Agent: Mutt/1.4.1i cc: sparc64@freebsd.org Subject: Re: Q: resource range for SBus oddity X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2003 12:45:23 -0000 On Fri, 2003/08/29 at 14:16:41 -0700, Marcel Moolenaar wrote: > Gang, > > I'm playing with uart(4) on Jake's u2, which has 2 zs(4) devices > attached to sbus. > > A GENERIC kernel gives me the following: > : > zs0: mem 0x1100000-0x1100003 irq 2024 on sbus0 > zstty0: on zs0 > zstty0: console 9600,8,n,1,- > zstty1: on zs0 > sbus0: , type serial (no driver attached) > : > > A kernel with uart(4) yields currently (it's a WIP): > : > puc0: mem 0x1100000-0x1100003 irq 2024 on sbus0 > uart0: on puc0 > uart0: console > uart1: on puc0 > puc1: mem 0x1000000-0x1000003 irq 2024 on sbus0 > uart2: on puc1 > uart3: on puc1 > : > > As you can see, the memory I/O resource is 4 bytes wide. However, > the channel A registers on the z8530 chip are at offsets 4 > (control) and 6 (data). This lies outside the reserved range. > > I would think that with 2 channels and 2 addressable registers > per channel we would be using offsets 0-3. > > Question: Is there an implied multiplication or division factor? No, the ranges should in general be correct; I've checked this with other devices. The register space of a single zs channel is indeed 4 bytes, but IIRC each channel has a separate device node, and there was some oddity which required both channels to use the register addresses specified in the first one, which is why the zs driver attaches two zsttys to the first device, and does not attach to the second zs instance. Jake can probably give more details on that. - Thomas -- Thomas Moestl http://www.tu-bs.de/~y0015675/ http://people.FreeBSD.org/~tmm/ PGP fingerprint: 1C97 A604 2BD0 E492 51D0 9C0F 1FE6 4F1D 419C 776C