[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-arm-kernel
Subject:    PCMCIA IRQs
From:       John K Luebs <jkluebs () luebsphoto ! com>
Date:       2001-12-31 9:21:01
[Download RAW message or body]

Its really late, I'm having this problem with pcnet_cs: (RequestIRQ: 
Resource In use, which I have been very familiar with in the past on 
PCs, but this problems are a SA based platform now). Perusing cs.c is 
not my favourite activity at 4am but I still found that in 
pcmcia_request_irq they seem to hold 0 sacred (I guess they guess a 
PCMCIA card can not run on the timer int in a PC) Well as luck would 
have it, on my platform, the CF_RDY_IRQ line is routed to GPIO0, which 
is IRQ=0. Has anyone successfully ran pcmcia on a board with this same 
assignment??

Here is some code (on line 1862 in drivers/pcmcia/cs.c)

int pcmcia_request_irq(client_handle_t handle, irq_req_t *req)
{
    socket_info_t *s;
    config_t *c;
    int ret = 0, irq = 0;
    < handle checking stuff deleted >
    /* Short cut: if there are no ISA interrupts, then it is PCI */
    if (!s->cap.irq_mask) {
    irq = s->cap.pci_irq;
    ret = (irq) ? 0 : CS_IN_USE;
}
#ifdef CONFIG_ISA
    ....

I'm working with 2.4.16-rmk2, but I have a copy of 2.5.1-rmk1 and I 
noticed that CONFIG_ISA is replaced with CONFIG_PCMCIA_PROBE and there 
are some other tests, but that seems moot because cap.irq_mask is known 
to be 0 from sa1100_generic.c.

My conclusion is that ret is set to CS_IN_USE here and is causing my 
problem. Now what the hell would a work around be (other than a physical 
rewiring :-). What would be the most pleasing way to reroute the 
interrupt in software?

Personally, I think this is a bug in the pcmcia code, what is so special 
about 0, why not carry -1 around. How many processors have 4 billion 
interrupt lines?

Thanks,
John


_______________________________________________
http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel
Please visit the above address for information on this list.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic