Re: shamcop adc

From: Phil Blundell <pb_at_nexus.co.uk>
Date: Tue, 2 Mar 2004 16:11:13 +0000

The irq code in shamcop_probe has a typo. That line should read:

        res[2].end = res[2].start;

However, that won't actually fix the problem, because the shamcop parent
doesn't have any corresponding resource that would contain the irq
allocations. I imagine this code has also been broken on h5400 since
Andrew added the extra checking in soc_device_register().

This area of SoC resource handling is all a bit murky, and it needs a
bit more thought. What's really needed is a way for shamcop_base (and
similar top-level SoC containers) to award themselves new resource
ranges for virtual irqs and other things that they have allocated
internally. But pdev->resource is statically allocated, so they can't
just poke at that, and in any case it's rather gruesome for soc-device
to be tangled up with platform devices in this way. (There's no reason
that a SoC container couldn't be placed on a PCI card, or in some other
situation where its parent was a non-platform device.)

For the time being, I suggest that you just defeat soc_device_register's
containedness check in your local tree. We'll have to try to come up
with a proper fix in due course.

p.

on Tue, Mar 02, 2004 at 04:19:56PM +0100, Alain2210 wrote:
> Hello,
>
> when booting, I get
>
> ipaq shamcop: using irq 104-150
> Setting type of unclaimed IRQ28 from shamcop_probe+0xb4/0x2b8
> shamcop adc: cannot find resource 2 in platform resources
>
> There is a probleme when registering the shamcop adc. I have tried to understand
> the structure :
> in shamcop_base.c, one can see that shamcop adc has 3 resources. The third
> (called 2)
> is
> res[2].start = blk->irq + adata->irq_base;
> res[2].end = res[1].start;
> res[2].flags = IORESOURCE_IRQ;
>
> but soc-device.c says he cannot find the resource since the end is greater that
> the one
> of is parent (ipaq shamcop) which is not defined and hence null. Moreover
> reading the other
> source of the kernel, end is often not defined. Hence I have tried to comment
> the line
> res[2].end = res[1].start;
> then soc-device.c is in the case "exact match" and I get
> "failed to claim resource adc shamcop"
>
> Does anyone has an idea about this ? Is the end parameter needed ? Why does it
> work for
> the 5400 ?
>
> Thanks,
>
> Alain
>
>
> _______________________________________________
> H2200-port mailing list
> H2200-port_at_handhelds.org
> https://handhelds.org/mailman/listinfo/h2200-port
Received on Tue Mar 02 2004 - 16:11:15 EST

This archive was generated by hypermail 2.2.0 : Mon Jul 25 2005 - 17:19:25 EDT