Thinkpad X40 2371 SD Slot not working

Russell King rmk+pcmcia at arm.linux.org.uk
Sun Jun 26 12:56:29 EDT 2005


On Sun, Jun 26, 2005 at 12:27:37PM -0400, Carlos Maldonado wrote:
> I have to disagree since the power up workaround
> 
> [code]
> setpci -s 02:00.0 0x80.l=0c800001
> [/code]
> 
> indeed lights on the LED for the SD slot
> 
> otherwise it wouldn't do anything
> 
> btw, I just checked and my kernel is configured with PCMCIA debugging
> enabled
> 
> any other thoughts?

The register at 0x80/0x82 of a Ricoh R5C476II device is described as two
16bit registers.  You're changing bit 11 of the second register from '0'
to '1'.  To prove this to yourself, try:

setpci -s 2:0.0 0x82.w
setpci -s 2:0.0 0x82.w=0xc80

Consulting the manufacturers published information, bit 11 of this
register is described as:

11	LED polarity	This bit controls the polarity of LED signal.
			The default is zero and "low" active.  When this
			bit is set to one, LED signal is "high" active.

So all you've done is invert the state of the signal which drives the LED!

Congratulations, you've found a method to turn the LED on. 8)

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core



More information about the linux-pcmcia mailing list