Date: Tue, 25 Jan 2000 09:32:54 +0900 From: KATO Takenori <kato@ganko.eps.nagoya-u.ac.jp> To: luoqi@watermarkgroup.com Cc: FreeBSD-current@FreeBSD.ORG, FreeBSD-hackers@FreeBSD.ORG, kato@ganko.eps.nagoya-u.ac.jp, FreeBSD98-hackers@jp.freebsd.org, nyan@jp.freebsd.org Subject: Re: indirection in bus space Message-ID: <20000125093254J.kato@gneiss.eps.nagoya-u.ac.jp> In-Reply-To: Your message of "Mon, 24 Jan 2000 14:16:23 -0500 (EST)" <200001241916.OAA08645@lor.watermarkgroup.com> References: <200001241916.OAA08645@lor.watermarkgroup.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Luoqi Chen <luoqi@watermarkgroup.com> wrote:
> We shouldn't need bus_simple_create_bsh(). All drivers ought to use
> rman_get_bushandle()/rman_get_bustag() to retrieve the bus handle and tag,
> and use them in bus_space_read/write calls to perform device io. Drivers
> that don't do that should be fixed.
Yes. I think it is correct way. It means porting isp, amd and adv
drivers to newbus, but I'm not familiar with these drivers. So I
added bus_simple_creat_bsh function to reduce modification.
> Why have two files bus_at386.h and bus_pc98.h? I386_BUS_PIO_IND should be
> able to live with I386_BUS_PIO and I386_BUS_MEMIO happily together.
Because they are different in the type of bus_space_tag_t from each
other. It is the u_long in PC/AT and the structure in PC-98. For
example, bus_space_read_1()s of them are:
PC/AT:
bus_space_read_1(...)
{
...
return (inb(handle + offset));
...
}
PC-98:
bus_space_read_1(...)
{
...
return (inb(bsh.bsh_iat[offset]));
...
}
-----------------------------------------------+--------------------------+
KATO Takenori <kato@ganko.eps.nagoya-u.ac.jp> | FreeBSD |
Dept. Earth Planet. Sci, Nagoya Univ. | The power to serve! |
Nagoya, 464-8602, Japan | http://www.FreeBSD.org/ |
|http://www.jp.FreeBSD.org/|
++++ FreeBSD(98) 3.3R-Rev. 01 available! +==========================+
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?20000125093254J.kato>
