lkml.org 
[lkml]   [1998]   [Dec]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: proper ioport space allocation
Brian Gerst wrote:
> Bob McElrath wrote:
> >
> > I've been playing with the pas2 (sound) module on my Alpha (because it works
> > on Intel, but not Alpha), and have discovered that this module never
> > allocates any portspace. (i.e. cat /proc/ioports shows no mention of the
> > PAS16 driver). Now in looking through the developer's kit and such I have
> > discovered that this card uses an absolute boatload of portspace. It starts
> > at 0x388 and uses harmonics (of 0x400) above that, as well as one other
> > random port. (List below)
> >
> > Now, is this normal for a card? Do all hardware devices use higher
> > harmonics like this? I've inserted code to check and allocate all the
> > portspace this card uses, but I'm not sure this is correct. Here's a
> > snippet of the monster: (from pas2_card.c, roundabouts line 300 in
> > detect_pas_hw(...))
>
> Some ISA cards only decode 10 address lines,

It was in the original spec, so don't blame the cards.

As 1024 IO addresses was WAY over the amount you really needed back in
the early eighties, this was an elegant solution. Nowadays you might
have 128 registers in a device (e.g. the CL-CD1865).

You could then document "you need 128 consecutive free adresses for
this card" in the documentation for a card like this. But this isn't
really feasable (find a computer where you can alot that many IO
addresses). So what you could do is to decode the top 6 address lines
besides what you normally do. So to get access to 128 addresses you
only need two ioaddresses in the 0-0x3ff range. So you decode A1-A9
as card-select, and use A15-A10 and A0 as the 7 address select lines.

IBM should've specified that you had to decode the TOP 10 address
lines, but that's no good because addresses below 0xff are "cheaper":
you don't have to load the "dx" register with the address before
accessing the IO location.


Roger.

--
** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2137555 **
*-- BitWizard writes Linux device drivers for any device you may have! --*
* Never blow in a cat's ear because if you do, usually after three or *
* four times, they will bite your lips! And they don't let go for at *
* least a minute. -- Lisa Coburn, age 9

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:46    [W:0.055 / U:0.672 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site