Re: [Emu10k1-devel] Re: PCI device initialization.

From: Robin Cook (rcook@wyrms.net)
Date: Thu Mar 30 2000 - 21:23:04 EST


Hello Rui,

  I don't know if this will help or not.

  I am unable to get my Gravis Xterminator to work.

  With joystick driver in the old 2.2.12 kernel and the previous emu10k1
  driver I would have the following in /proc/ioports

  0200-0201 joy-gravis
  e800-e81f emu10k1
  ec00-ec07 emu10k1 joystick

  and the joystick would work.

  With the current emu10k1 driver and the joystick driver in the 2.2.14
  kernel it does not create the 0201-0201 joy-gravis in ioports and the
  joy-gravis module report device or resource busy when you try to load it.

  Also the joy-gravis module does not accept any options in conf.modules to
  tell it where the joystick port is at (ie ec01 instead of 201.)

Thursday, March 30, 2000, 19:15:16, you wrote:

RS> Brian Gerst wrote:
>>
>> Rui Sousa wrote:
>> > The sound card has a register to enable the joystick port so I need to know
>> > where the sound card IO ports begin (and maybe to make use of a spinlock that
>> > serializes hardware registers access).
>> >
>> > Giving it a little more thought I will probably just set the register from the
>> > sound card initialization, it's much easier and should work just fine...
>>
>> The joystick port on the SBLive is already enabled by default, it just
>> is not located at the legacy address (0x201). The register you speak of
>> I am guessing mirrors the port at 0x201, but this is only for DOS
>> compatability and is unnecessary.

RS> No. There is another register on the sound card (HCFG_JOYENABLE - Internal joystick enable)
RS> which is enabled if the chip revision is greater than 6. This is what is in the source
RS> and I whithout any documentation from Creative I don't really now what it
RS> does.

RS> The writing to the PCI configuration space register was another issue and
RS> I stopped doing it. I figured out that, as you say, it was unnecessary.
RS> My question now is (with the present unmodified joystick drivers, and if the sound
RS> card driver initializes the joystick device and reserves the IO ports) if the only
RS> thing needed to get the joystick working is to pass the IO port in the module options?

RS> In my case the joystick is at IO ports eff0 (the actual PCI register value is eff1), does a:

RS> insmod joy-analog js_an=eff0,x

RS> suffice?
  
>> I have a patch for the joystick driver at
>> http://quark.vpplus.com/~bgerst/linux/diff-gameport-99p1.gz which can
>> autodetect PCI and PnP gameports. This is probably what you are looking
>> for.

RS> The part of auto detection and IO ports reservation (request_region()) is
RS> on the sound card driver, so there is a bit of a conflict here. If your
RS> patches make it into the kernel then I'll remove the code from the sound card
RS> driver. Your solution is definitely more general and more integrated with the
RS> joystick drivers.

-- 
Best regards,
 Robin                            mailto:rcook@wyrms.net

- 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/



This archive was generated by hypermail 2b29 : Fri Mar 31 2000 - 21:00:28 EST