Re: Problem recognizing card
David Hinds <[email protected]> Wed, 19 Mar 2003 09:51:04 -0800
| Newsgroups | gmane.linux.pcmcia.devel |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Mar 19, 2003 at 01:38:38PM +0530, Mayank Sharma wrote: > > 2. i have a file sa1100_ipcom.c in which i have defined pcmcia low level > functions (init,configure,state,shutdown etc..) So, you are using a socket driver that you wrote! Suddenly things are getting more clear! > In the configure_socket > function of this file, if i add a printk in the begining of the > function, which just prints socket, vcc, vpp and reset, then the > following happens > a. card is getting recognized/initialized and /dev/tts/1 is assigned > for the card if inserted in slot 1 > b. card is not getting recognized and it hangs apparently in the > function read_cis_mem (while calling bus_readb), if the card is inserted > in slot 0. Are you sure that the memory windows you have defined for slot 0 are correct? What if, instead of the printk(), you use mdelay(1) to add a short delay? > 3. If i comment out the printk described above, then the following happen > a. card is not recognized in either of the slots and it prints > message saying increase setup_delay. What is happening here is that when > the cs does a get_status on the slot, my pcmcia_low_level socket_state > function is returning not_ready. > b. I return not_ready when the interrupt line for the corresponding > slot is low (The interrupt is triggered when it goes low, hence when it > is alredy low i return not_ready). Well, now my guesses are more directed towards a bug in your socket driver. Perhaps this bridge has some additional timing requirements that are being violated? Are you sure that this is the correct way to determine "ready" for this bridge? On the PCMCIA bus, the READY signal in memory mode is the INTR pin in IO mode. So what you describe could work, though I know of lots of bridges that filter out the INTR signal except when the socket is in IO mode, and provide a separate register that has the raw READY signal. Alternatively, are you sure that the interrupt line isn't latched in the bridge so that you need to ack it to get a current reading? The effect of the printk() is curious because the delays in pcmcia_core are all relatively large in comparison and should control the speed of all the crucial steps in powering up a card. -- Dave ------------------------------------------------------- This SF.net email is sponsored by: Does your code think in ink? You could win a Tablet PC. Get a free Tablet PC hat just for playing. What are you waiting for? http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en