Subject: Re: first try on device driver - success but more questions
To: None <richard.kaestner@kabsi.at>
From: Michael Lorenz <macallan@netbsd.org>
List: tech-kern
Date: 12/28/2006 15:27:41
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

On Dec 28, 2006, at 15:09, Richard K=E4stner wrote:

> Here come my questions:
> 1. Can I / how can I access two different IO-spaces in one driver?
>   to start the adc, I need to set a bit in DeviceCfg (on chip=20
> register) and
>   only thereafter, I may access the adc registers

You can bus_space_map whatever you want.

>   as can be seen, I gave the 'epadc' a rather huge size, to be able to=20=

> access
>   ADC-Registers and DeviceCfg: 'epadc0 at epsoc0 addr=20
> 0x80900000-0x80a3ffff'
>   For me this appears quite brute force - or is it ok, to map the=20
> entire IO
>   space ? (hard to believe)

Nothing says you have to bus_space_map the whole thing or even only one=20=

block - just map the range(s) you need and run with them.

have fun
Michael
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iQEVAwUBRZQovcpnzkX8Yg2nAQISIQf/cS4YN3JNx1bVGVWRNxdRvjUvSKUDFZf4
Hkb5ho8Iys5fAFVEmf9dlic3O4Bk6lRRd6cYPrNjgiwkxG5QP2APcDQ43sYI9tlk
MIseGEzpbsX7Rt3gZDz8V74TapVwyor9MqV9PKIJ6/Kjr7KaxGlXo03HbivdokIu
9P3EmozKVhJuHjFFfy1sTnvaE8hRrl5QqZrfNsBdGHKHkcc6GUk9qQV/GSVWB0Za
hE04RCr0KmrjJDSZokebrIqwvsrohtmkcUgQkM4dV4qbwQT6+Q4J0jjD0cdjj+aV
K/+9ovee4gMHgOx77HQqxLbV4G0hRmxl+e9u2Xj7mXiA5bysgmv+Cg=3D=3D
=3DZLD+
-----END PGP SIGNATURE-----