How to use compact flash on embedded 2.6.11 system?

Dominik Brodowski linux at dominikbrodowski.net
Sun Feb 13 11:42:07 EST 2005


Hi,

On Sun, Feb 13, 2005 at 05:18:13PM +0100, Dirk Behme wrote:
> Dirk Behme wrote:
> 
> >Now, with your help, I get a CIS and cardmgr loads ide_cs module :-) 
> >With this, I get the output below. Do I have to care about the 'could 
> >not adjust resource' messages? Do I have to configure memory windows as 
> >used in my configuration here? If yes, why do I have to configure the 
> >memory configuration twice, in the driver and for cardmgr?
> >
> >Is the 'cardmgr[757]: get dev info on socket 0 failed: No such device' 
> >related to this?
> 
> I looked into this and found that this comes from drivers/pcmcia/ds.c
> 
> There is a function get_device_info() which has a tree with label 
> 'found:'. This label is reached, then
> 
> if (first)
>   node = p_dev->instance->dev;
> 
> sets node to 0 and function exits with
> 
> if (!node) {
>   ret = -ENODEV;
>   goto err_put;
> 
> Has anybody a hint what's wrong if p_dev->instance->dev is zero?

In the PCMCIA device (not socket) driver you need to allocate a 
"struct dev_node_t" for each PCMCIA card (function) you handle, and a
pointer to this must be stored in instance->dev.

> In my driver I set
> 
> socket.dev.dev = &omap_cf_device.dev;
> 
> with
> 
> static struct platform_device omap_cf_device = {
> 	.name = MODNAME,
> 	.id = 0,
> };
> 
> In the driver omap_cf_device.dev isn't touched because in hd64465_ss.c 
> hd64465_device.dev isn't set as well (?).

hd64465_device.dev is set in hd64465.c or else this _socket_ driver wouldn't
work. However, this is unrelated to the "dev" above -- the one mentioned
above is about the "/dev/" entry for the PCMCIA card, while the latter is
the device of the PCMCIA card socket(!) as represented in the /sys tree.

	Dominik



More information about the linux-pcmcia mailing list