Help: CF card cann't use in Linux-2.6.18

This forum is for users of Microchip MPUs and who are interested in using Linux OS.

Moderator: nferre

michaelkite
Posts: 2
Joined: Thu Dec 07, 2006 6:42 am

Help: CF card cann't use in Linux-2.6.18

Thu Dec 07, 2006 6:48 am

Hi, everyone, my board is same as the at91rm9200dk. I download the linux-2.6.18 kernel and the patch 2.6.18-rc4-at91.patch.gz. I compiled them and the system satrtup normally. But my CF card cann't use. When I insert the CF card, the information is follow:

[root@/root]$pccard: PCMCIA card inserted into slot 0
pcmcia: registering new device pcmcia0.0
pcmcia: request for exclusive IRQ could not be fulfilled.
pcmcia: the driver needs updating to supported shared IRQ lines.
hda: SanDisk SDCFB-16, CFA DISK drive
ide0: Disabled unable to get IRQ 161.
ide0: failed to initialize IDE interface
ide0: I/O resource 0xC280C00E-0xC280C00E not free.
ide0: ports already in use, skipping probe
ide0: I/O resource 0xC280C00E-0xC280C00E not free.
ide0: ports already in use, skipping probe
ide0: I/O resource 0xC280C00E-0xC280C00E not free.
ide0: ports already in use, skipping probe
ide0: I/O resource 0xC280C00E-0xC280C00E not free.
ide0: ports already in use, skipping probe
ide0: I/O resource 0xC280C00E-0xC280C00E not free.
ide0: ports already in use, skipping probe
ide0: I/O resource 0xC280C00E-0xC280C00E not free.
ide0: ports already in use, skipping probe
ide0: I/O resource 0xC280C00E-0xC280C00E not free.
ide0: ports already in use, skipping probe
ide0: I/O resource 0xC280C00E-0xC280C00E not free.
ide0: ports already in use, skipping probe
ide0: I/O resource 0xC280C00E-0xC280C00E not free.
ide0: ports already in use, skipping probe
ide-cs: ide_register() at 0xc280c000 & 0xc280c00e, irq 161 failed

what is the error? And how to resolve it? Please help me! Thanks a lot!
michaelkite
Posts: 2
Joined: Thu Dec 07, 2006 6:42 am

Re: Help: CF card cann't use in Linux-2.6.18

Fri Dec 08, 2006 4:46 am

michaelkite wrote:Hi, everyone, my board is same as the at91rm9200dk. I download the linux-2.6.18 kernel and the patch 2.6.18-rc4-at91.patch.gz. I compiled them and the system satrtup normally. But my CF card cann't use. When I insert the CF card, the information is follow:

[root@/root]$pccard: PCMCIA card inserted into slot 0
pcmcia: registering new device pcmcia0.0
pcmcia: request for exclusive IRQ could not be fulfilled.
pcmcia: the driver needs updating to supported shared IRQ lines.
hda: SanDisk SDCFB-16, CFA DISK drive
ide0: Disabled unable to get IRQ 161.
ide0: failed to initialize IDE interface
ide0: I/O resource 0xC280C00E-0xC280C00E not free.
ide0: ports already in use, skipping probe
ide0: I/O resource 0xC280C00E-0xC280C00E not free.
ide0: ports already in use, skipping probe
ide0: I/O resource 0xC280C00E-0xC280C00E not free.
ide0: ports already in use, skipping probe
ide0: I/O resource 0xC280C00E-0xC280C00E not free.
ide0: ports already in use, skipping probe
ide0: I/O resource 0xC280C00E-0xC280C00E not free.
ide0: ports already in use, skipping probe
ide0: I/O resource 0xC280C00E-0xC280C00E not free.
ide0: ports already in use, skipping probe
ide0: I/O resource 0xC280C00E-0xC280C00E not free.
ide0: ports already in use, skipping probe
ide0: I/O resource 0xC280C00E-0xC280C00E not free.
ide0: ports already in use, skipping probe
ide0: I/O resource 0xC280C00E-0xC280C00E not free.
ide0: ports already in use, skipping probe
ide-cs: ide_register() at 0xc280c000 & 0xc280c00e, irq 161 failed

what is the error? And how to resolve it? Please help me! Thanks a lot!

I continue to debug the error. I found some key in the code. In the dk configuration, the cf data is set:
static struct at91_cf_data __initdata dk_cf_data = {
.det_pin = AT91_PIN_PB0,
.rst_pin = AT91_PIN_PC5,
// .irq_pin = ... not connected
// .vcc_pin = ... always powered
};
Here, I don't understand why the irq_pin doesn't set? Because of this, in the at91_cf.c:
if (board->irq_pin) {
status = request_irq(board->irq_pin, at91_cf_irq,
IRQF_SHARED, driver_name, cf);
if (status < 0)
goto fail0a;
cf->socket.pci_irq = board->irq_pin;
} else
cf->socket.pci_irq = NR_IRQS + 1;
cf->socket.pci_irq is given the irq 161. So in the ide-probe function,
if (init_irq(hwif) == 0)
goto done;

old_irq = hwif->irq;
/*
* It failed to initialise. Find the default IRQ for
* this port and try that.
*/
if (!(hwif->irq = ide_default_irq(hwif->io_ports[IDE_DATA_OFFSET]))) {
printk("%s: Disabled unable to get IRQ %d.\n",
hwif->name, old_irq);
goto out;
}
Because the init_irq failed, it occurs the above error. Now I think the hwif->irq should be equal with the pcmcia irq, that is irq 64. How to resolve it?

Return to “LINUX”

Who is online

Users browsing this forum: No registered users and 3 guests