Re: [patch 15/15] PNP: convert resource options to single linked list

From: Bjorn Helgaas
Date: Wed Jun 04 2008 - 19:06:43 EST


On Wednesday 04 June 2008 04:31:02 pm Rene Herman wrote:
> On 04-06-08 22:50, Bjorn Helgaas wrote:
>
> > On Wednesday 04 June 2008 05:48:27 am Rene Herman wrote:
> >> On 04-06-08 01:52, Rene Herman wrote:
> >
> >> ADS7181 in fact might as well delete the IRQ from the dependents and add
> >> "irq 2/9,10,11 High-Edge Optinal" in front as an independent same as
> >> ADS7151. That way, all the cloning can go.
> >
> > We currently clone for AZT0002 as well as ADS7181. Can we do the
> > same for both? It would be nice to get rid of the cloning code
> > if we can.
>
> Yes. AZT0002 (the MPU401 on an AZT2320 chip) is the exact same as
> ADS7181 (the MPU401 on an AD1816 chip).
>
> IORESOURCE_IRQ_OPTIONAL clears the path for doing things better. I see
> its dependent 2 can then just go entirely in fact.
>
> Hardware says:
>
> Dependent: 00 - Priority preferred
> irq 2/9 High-Edge
> port 0x330-0x330, align 0xf, size 0x2, 16-bit address decoding
> Dependent: 01 - Priority acceptable
> irq 2/9 High-Edge
> port 0x300-0x330, align 0xf, size 0x2, 16-bit address decoding
> Dependent: 02 - Priority functional
> irq 2/9,10,11 High-Edge
> port 0x300-0x330, align 0xf, size 0x2, 16-bit address decoding
>
> We want it to end up as:
>
> irq 2/9,10,11 High-Edge (Optional)
> Dependent: 00 - Priority preferred
> port 0x330-0x330, align 0xf, size 0x2, 16-bit address decoding
> Dependent: 01 - Priority acceptable
> port 0x300-0x330, align 0xf, size 0x2, 16-bit address decoding
>
> So walk dependents deleting IRQs, except last dependent IRQ which is
> cloned into a new independent (inserted in front would be best for
> ISAPnP since the spec does recommend this) while making it optional and
> then just delete the last dependent completely (it would be same as the
> previous dependent after all).

That would probably simplify things a bit. Although in the general
case, I suppose we'd want to make sure the options we delete are
a subset of the independent one we add. Will look at this more
tomorrow.

Bjorn
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/