Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Feb 2003 10:30:16 -0700 (MST)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        nyan@jp.FreeBSD.org
Cc:        peter@wemm.org, sos@FreeBSD.ORG, current@FreeBSD.ORG, mdodd@FreeBSD.ORG
Subject:   Re: The cbus driver for pc98 
Message-ID:  <20030217.103016.58455672.imp@bsdimp.com>
In-Reply-To: <20030217.173114.85351300.nyan@jp.FreeBSD.org>
References:  <20030216.235014.111547234.imp@bsdimp.com> <20030217070601.78E612A89E@canning.wemm.org> <20030217.173114.85351300.nyan@jp.FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
In message: <20030217.173114.85351300.nyan@jp.FreeBSD.org>
            Takahashi Yoshihiro <nyan@jp.FreeBSD.org> writes:
: In article <20030217070601.78E612A89E@canning.wemm.org>
: Peter Wemm <peter@wemm.org> writes:
: 
: > I can understand if you do not like to call your cbus hardware "ISA"
: > devices, but also consider that on most pc-at hardware there are no "ISA"
: > devices either.
: 
: These are completely different.  All PC-98 machines don't have "ISA"
: devices and buses at all, but a little old PC-AT machines have "ISA"
: buses.  And, even if the PC-AT machine does not have "ISA" buses, it
: has "PCI-ISA" bridge.

I understand this.

: > Things like the floppy controller, keyboard controller,
: > counter/timer, rtc, etc etc are all on motherboard busses.  Many are on
: > things like X-bus, v-link, or other custom "quick and dirty" host busses.
: 
: FYI, NetBSD/pc98 has the "systm" virtual bus.

It might be worth considering this in the long term.  For the moment,
however, I'm not sure sure this is the right way to go.

: > I would rather live with #ifdef PC98 than
: > to have a duplicate set of isa/* and i386/* files that are nearly identical
: > except for include file paths, #ifdef PC98 and s/isa/cbus/.  I'm sure there
: > are other ways to improve the situation without having to resort to this
: > mass duplication of code.
: 
: How?
: 
: I have had some questions like "Does PC98 have ISA bus?" or "Why PC98
: uses ISA driver?".  To clear these questions and problems, I think
: that adding separated cbus driver is better way.

I think that adding a separate cbus driver is better.  I understand
why you want it.  I just object to the way you've done it.

Cbus is to ISA as CardBus is to PCI in many ways.  Cbus is very much
like ISA in all but a few details.  CardBus is pci with a few twists
and turns that differ.  If you look at how we've implemented cardbus,
you'll see that we've tried to do it as a 'subclass' of the pci bus.
We implement the PCI interfaces in the cardbus bus code, even though
it is not really a pci bus.  I'd propose that cbus implements the ISA
interfaces in a similar manner.

I'll be the first to admit that the cardbus implementation in this
area is incomplete.  sys/dev/cardbus/cardbus.c contains too much pci
bus code copied with s/pci/cardbus/g applied.  Not all the pci drivers
that can be cardbus drivers also have the appropriate designation in
the sys/conf/files file.  However, most cardbus drivers are written by
adding one line to the pci attachment.  I suspect that for the vast
majority of the ISA drivers this would hold true for cbus.

I know others have said that there is no need at all for cbus as a
separate bus.  I'd argue that we do need a separate bus for it, since
it is more different than ISA than the xbus, vlink are.  However, it
isn't so different that it needs its own CBUS_PNP_PROBE interface that
is identical to ISA_PNP_PROBE (even if the implementation of the PNP
probing is different).

Warner

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030217.103016.58455672.imp>