[PATCH v2 2/2] powerpc/mpic: add global timer support

Scott Wood scottwood at freescale.com
Tue Aug 14 02:49:19 EST 2012


On 08/13/2012 12:53 AM, Wang Dongsheng-B40534 wrote:
> 
> 
>> -----Original Message-----
>> From: Wood Scott-B07421
>> Sent: Saturday, August 11, 2012 3:40 AM
>> To: Wang Dongsheng-B40534
>> Cc: benh at kernel.crashing.org; paulus at samba.org; linuxppc-
>> dev at lists.ozlabs.org; Gala Kumar-B11780; Li Yang-R58472
>> Subject: Re: [PATCH v2 2/2] powerpc/mpic: add global timer support
>>
>> On 08/10/2012 12:54 AM, Dongsheng.wang at freescale.com wrote:
>>> +static const struct of_device_id mpic_timer_ids[] = {
>>> +	{ .compatible = "open-pic,global-timer", },
>>> +	{ .compatible = "fsl,global-timer", },
>>> +	{},
>>> +};
>>> +
>>> +static int __init mpic_timer_init(void) {
>>> +	struct device_node *np = NULL;
>>> +
>>> +	for_each_node_by_type(np, "open-pic")
>>> +		if (of_match_node(mpic_timer_ids, np))
>>> +			group_init(np);
>>> +
>>> +	if (list_empty(&group_list))
>>> +		return -ENODEV;
>>> +
>>> +	return 0;
>>> +}
>>> +arch_initcall(mpic_timer_init);
>>
>> Oh, and don't probe by device_type.
>>
> [Wang Dongsheng] fine. for_each_node_by_name.

No.  Probe by compatible only.

-Scott




More information about the Linuxppc-dev mailing list