[PATCH v6 1/6] clocksource: Add support for the Mediatek SoCs

Rob Herring robherring2 at gmail.com
Wed Jun 4 06:52:42 PDT 2014


On Wed, Jun 4, 2014 at 6:25 AM, Gregory CLEMENT
<gregory.clement at free-electrons.com> wrote:
> Hi Rob,
>
> On 04/06/2014 13:18, Rob Herring wrote:
>
> [...]
>
>>> +
>>> +       if (of_address_to_resource(node, 0, &res))
>>> +               panic("Failed to parse resource\n");
>>
>> panics are a bit pointless at this stage since your console is
>> typically not up yet. Warning and continuing on with boot gives you a
>> better shot at actually seeing the message.
>>
>>> +
>>> +       if (!request_mem_region(res.start, resource_size(&res), "mtk-timer"))
>>> +               panic("Registers are a busy IO resource");
>>> +
>>> +       evt->gpt_base = ioremap(res.start, resource_size(&res));
>>
>> of_iomap instead of these 3 calls.
>
> Actually of_iomap doesn't request_mem_region, that's why for
> mvebu we are trying now to replace of_iomap by request_mem_region/ioremap.

Then perhaps we should add of_iomap_resource which does both. It could
possibly be added into of_iomap, but we'd have to ignore any failures
due to overlapping regions.

Rob



More information about the linux-arm-kernel mailing list