Q: resource range for SBus oddity
t.moestl at tu-bs.de
Sun Aug 31 05:45:23 PDT 2003
On Fri, 2003/08/29 at 14:16:41 -0700, Marcel Moolenaar wrote:
> 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: <Zilog Z8530> mem 0x1100000-0x1100003 irq 2024 on sbus0
> zstty0: <ttya> on zs0
> zstty0: console 9600,8,n,1,-
> zstty1: <ttyb> on zs0
> sbus0: <zs>, type serial (no driver attached)
> A kernel with uart(4) yields currently (it's a WIP):
> puc0: <Zilog Z8530 dual channel SCC> mem 0x1100000-0x1100003 irq 2024 on sbus0
> uart0: <Zilog Z8530 dual channel SCC> on puc0
> uart0: console
> uart1: <Zilog Z8530 dual channel SCC> on puc0
> puc1: <Zilog Z8530 dual channel SCC> mem 0x1000000-0x1000003 irq 2024 on sbus0
> uart2: <Zilog Z8530 dual channel SCC> on puc1
> uart3: <Zilog Z8530 dual channel SCC> 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 Moestl <t.moestl at tu-bs.de> http://www.tu-bs.de/~y0015675/
<tmm at FreeBSD.org> http://people.FreeBSD.org/~tmm/
PGP fingerprint: 1C97 A604 2BD0 E492 51D0 9C0F 1FE6 4F1D 419C 776C
More information about the freebsd-sparc64