HP Jornada 6xx PCMCIA driver

Dominik Brodowski linux at dominikbrodowski.net
Mon Nov 19 03:49:41 EST 2007


Hi,

On Mon, Nov 19, 2007 at 01:19:00AM -0800, Kristoffer Ericson wrote:
> > Actually, why do you bother? The PCMCIA subsystem is capable of working with
> > shared IRQs...
> > 
> So I should have same interrupt for both? Isn't it important to know
> where the IRQ came from? Thats what puzzles me.

Well, each IRQ handler needs to check whether it is indeed the one which was
called. So, inside hd6441_interrupt() you'd need to do the following

	cscr = inb(cscr_reg);
	if !(cscr & HD64461_PCCCSCR_IRQ)
		return IRQ_NONE;

to avoid handling ("IRQ_HANDLED") an interrupt which wasn't caused by this
device.

> > > int hd64461_init_socket(int sock, int irq, int io_irq, unsigned long mem_base,unsigned long io_offset)
> > > {
> > > 	sp->irq = irq;
> > ...
> > > 	sp->socket.pci_irq = io_irq;
> > ...
> > > 	if ((request_irq(irq, hd64461_interrupt, IRQF_DISABLED, "hd64461_ss-irq", sp)) < 0) {
> > 
> > I think this should be io_irq here -- the "socket" IRQ which is demuxed to 79
> > is io_irq; and the "card" one stays at 78. (Better use these terms than
> > "pcmcia" interrupt -- which is ambiguous).
> >
> Oki, so basicly IRQ 78 for socket IRQ? I'll changed the
> IRQF_DISABLED -> IRQF_SHARED then.

Yes, you have two alternatives: either fix up the demux by requesting io_irq
here, or not bothering about demux and using IRQF_SHARED.

> It does, thx! Btw, do you have any good suggestion on which drivers to look
> at for good reference?

Not really, but pd6729.c may be a good place to look at, for Komuro knows
really much about the PCMCIA subsystem.

	Dominik



More information about the linux-pcmcia mailing list