Re: [PATCH] [RFC] OF: probe order dependency aware of_platform_populate

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Wed, Apr 15, 2015 at 9:17 AM, Peter Hurley <peter@xxxxxxxxxxxxxxxxxx> wrote:
> On 04/08/2015 09:40 AM, Rob Herring wrote:
>> This doesn't sound right. It ignores failures because platform_get_irq
>> will parse the interrupts when called rather than just using the
>> resource struct and will return EPROBE_DEFER if the irq resource is
>> not ready. We left the of_device_alloc code in to be safe, but we
>> should be able to remove it.
>
> This brings up a couple of points which are plaguing the serial drivers:
> 1. Is platform_get_irq() now required to properly obtain the mapped irq
>    for DT-aware drivers? IOW, is platform_get_resource(IORESOURCE_IRQ)
>    broken? Will it be if the of_device_alloc() code is removed?

Yes, and that is why we left the of_device_alloc code now that I
remember. platform_get_irq will first have to be used everywhere to
remove the code in of_device_alloc. It also has to be used for
deferred probe to work (if it is irq's you need to wait for).

> 2. Should DT-specific drivers not be using irq_of_parse_and_map()?
>    On probe failure irq_dispose_mapping() will be junking the mapping,
>    thus invalidating the irq assignment in the platform resource table,
>    which breaks platform drivers which might otherwise probe successfully.

Generally no, they should not use irq_of_parse_and_map as we want
drivers to work with platform_data, DT, ACPI, or Bob's Firmware
Interface. I think most users are PPC drivers which don't have so much
of the probe ordering problems.

Rob
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux