Messages in this thread | | | Date | Thu, 17 Dec 1998 10:22:18 -0600 (EST) | From | Bob McElrath <> | Subject | proper ioport space allocation |
| |
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(...))
/* PAS16 uses a BOATLOAD of IO space... */ if (check_region(hw_config->io_base, 4) || /* 0x388 */ check_region(hw_config->io_base + 0x400, 4) || /* 0x788 */ check_region(hw_config->io_base + 0x800, 4) || /* 0xb88 */ check_region(hw_config->io_base + 0xc00, 4) || /* 0xf88 */ check_region(hw_config->io_base + 0x1000, 4) || /* 0x1388 */ check_region(hw_config->io_base + 0x1400, 4) || /* 0x1788 */ check_region(hw_config->io_base + 0x1800, 4) || /* 0x1b88 */ check_region(hw_config->io_base + 0x2000, 4) || /* 0x2388 */ check_region(hw_config->io_base + 0x4300, 4) || /* 0x4388 */ check_region(hw_config->io_base + 0x7400, 4) || /* 0x7788 */ check_region(hw_config->io_base + 0x7c00, 4) || /* 0x7f88 */ check_region(hw_config->io_base + 0x8000, 4) || /* 0x8388 */ check_region(hw_config->io_base + 0xbc00, 4) || /* 0xbf88 */ check_region(hw_config->io_base + 0xe000, 4) || /* 0xe388 */ check_region(hw_config->io_base + 0xe800, 4) || /* 0xeb88 */ check_region(hw_config->io_base + 0xec00, 4) || /* 0xef88 */ check_region(hw_config->io_base + 0xf000, 4) || /* 0xf388 */ check_region(hw_config->io_base + 0xf400, 4) || /* 0xf788 */ check_region(hw_config->io_base + 0xf800, 4) || /* 0xfb88 */ check_region(hw_config->io_base + 0xfc00, 4) || /* 0xff88 */ check_region(MASTER_ADDRESS, 1) /* 0x9A01 -- used to change io_base */ )
And of course, allocating all this makes /proc/ioports UGLY:
0060-006f : keyboard 0070-007f : timer 0220-022f : soundblaster 02f8-02ff : serial(auto) 0388-038b : Pro AudioSpectrum 16 03c0-03df : vga+ 03f8-03ff : serial(auto) 0788-078b : Pro AudioSpectrum 16 0b88-0b8b : Pro AudioSpectrum 16 0f88-0f8b : Pro AudioSpectrum 16 1388-138b : Pro AudioSpectrum 16 1788-178b : Pro AudioSpectrum 16 1b88-1b8b : Pro AudioSpectrum 16 2388-238b : Pro AudioSpectrum 16 4688-468b : Pro AudioSpectrum 16 7788-778b : Pro AudioSpectrum 16 7f88-7f8b : Pro AudioSpectrum 16 8000-8003 : BusLogic BT-958 8388-838b : Pro AudioSpectrum 16 8800-881f : 3c905B Cyclone 100baseTx 9a01-9a01 : Pro AudioSpectrum 16 bf88-bf8b : Pro AudioSpectrum 16 e388-e38b : Pro AudioSpectrum 16 eb88-eb8b : Pro AudioSpectrum 16 ef88-ef8b : Pro AudioSpectrum 16 f388-f38b : Pro AudioSpectrum 16 f788-f78b : Pro AudioSpectrum 16 fb88-fb8b : Pro AudioSpectrum 16 ff88-ff8b : Pro AudioSpectrum 16
suggestions?
-- Bob
P.S. I've fixed a few bugs in unloading the driver...patch soon for those of you still using this card.
Bob McElrath (mcelrath@draal.physics.wisc.edu) Univ. of Wisconsin at Madison
- 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/
| |