Date: Thu, 11 Jan 2001 15:18:32 +0000 (GMT) From: Terry Lambert <tlambert@primenet.com> To: peter@netplex.com.au (Peter Wemm) Cc: msmith@FreeBSD.ORG (Mike Smith), jlemon@flugsvamp.com (Jonathan Lemon), peter.jeremy@alcatel.com.au (Peter Jeremy), babkin@FreeBSD.ORG (Sergey Babkin), freebsd-arch@FreeBSD.ORG Subject: Re: cvs commit: src/sys/gnu/i386/isa dgb.c dgm.c dgmreg.h dgreg.h Message-ID: <200101111518.IAA15411@usr08.primenet.com> In-Reply-To: <200101110323.f0B3N4Q64114@mobile.wemm.org> from "Peter Wemm" at Jan 10, 2001 07:23:04 PM
next in thread | previous in thread | raw e-mail | index | archive | help
> > > ie: > > > if (IS_PCI(board_type)) { > > > value = *mem[reg]; > > > } else { > > > if (board->window != window(reg)) > > > board->window = window(reg); > > > value = inb(base + (reg % winsize)); > > > } > > > > Typically, if you have half a clue, you will separate the ISA-aware parts > > of the driver from the PCI-aware parts and use a set of function vectors. > > Makes for much cleaner code. 8) > > Yes, that is what Peter Jeremy said in the original email.. It can be > done but doesn't come for free. I was merely responding to the suggestion > to use the bus_space_ macros with a reason why they cannot be used in this > scenario to hide the different access methods. Yes, bus_space can be used > in the backend functions, but not at the top level driver. Surely, this is a problem which has to be solved similarly for multiple cards with similar function. Rather than being a one-off, the abstraction should at _least_ have a recommended form, if not a documented DKI mechanism. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200101111518.IAA15411>