Linear Flash and PCMCIA

Andrew Eberbach andrew at ebertech.ca
Mon Dec 17 14:28:12 EST 2012


Hi

I've been trying to get various versions of linux > 2.6 to read a linear flash pcmcia card. I've 
been having mixed success and I'm trying to figure out if what I'm doing is just bridge-dependent or 
if there's a setting I can use to make this work.

So far I've tried various chipsets (Ricoh, TI, Enne, O2) on various machines and what I've found is 
the following:

I've gotten a Ricoh-based chipset to read the card in question, get its CIS, fire up pcmciamtd and 
let me read and write to it.

On ALL other chipsets what I keep getting is
unsupported voltage key

I dug through the code, did some experimenting and research and as far as I can tell this message 
happens because

1. The card gets inserted
2. The code in cs.c tries to figure out what voltage the card wants
3. yenta_socket looks at the status register and sees that the card wants X.XV which means voltage < 
3.3V which will be defined later on somewhere.
4. This isn't supported so it craps out and since we're not even accepting the card it never gets to 
loading pcmciamtd.

The only thing is, I know for a *fact* that this card wants Vcc 5 and Vpp 12 to write. On the Ricoh 
card it works without a hitch. On all the other cards the status register keeps reporting X.XV. I 
even looked at the output of the status register reads on Ricoh vs TI and on Ricoh it comes back as 
having the 5V bit set, on TI it's not.

I've tried turning off pnpbios, pci=assign-busses, turning off acpi, every combination of 
pcmcia_core, pcmcia_rsrc, pcmcia and yenta_socket parameters I could think of (increasing the settle 
time, setup time, etc. etc.). I've dropped back to 2.6.30-something. And it's always the same. 
Excluding IRQs from /etc/pcmcia/config.opts.

The only other thing I've found in digging through mailing lists is that it could be a resource 
conflict of some sort. I guess that would make some sense except that if I cat the yenta_registers 
in /sys/... for that bridge when I take the card out it changes so to me that would say that the 
resources are there and it's not just reading a default.

Here's the really maddening part. If I put in another PCMCIA card, say, a wireless ethernet card 
into the non-ricoh systems those cards get recognized without an issue. But just with this linear 
flash card (and I've tried several just to be sure it wasn't a one-off bad card), it keeps thinking 
it's a low-voltage card.

I've also tried recompiling the module to just have it force the voltage to be 5.0 and ignore the 
status register as well as force the status register to be a certain value to no avail. I've gone 
through a bunch of datasheets for the chipsets as well and everything seems to make sense... I mean 
the code works on Ricoh and it's all using the yenta interface and registers.

I realize that I haven't provided exact chipsets and linux versions and everything for the 5 
machines, but I figured I'd at least put this out there first and see if anyone is even available to 
help. If so, let me know what details you'd need (dmesg, lspci, dynamic printks from 
drivers/pcmcia/* and so on).

Thanks,
Andrew

-- 
Best Regards,

Andrew Eberbach
EberTech Inc.



More information about the linux-pcmcia mailing list