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

Gala Kumar-B11780 B11780 at freescale.com
Sat Aug 11 06:24:33 EST 2012


On Aug 10, 2012, at 2:40 PM, Scott Wood wrote:

> 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);
>> 
> 
> Where do you distinguish an FSL timer from an openpic timer?  I thought
> openpic timers didn't support cascading.

in group_init()

+	if (of_device_is_compatible(np, "fsl,global-timer"))
+		priv->flags |= FSL_GLOBAL_TIMER;
+

- k




More information about the Linuxppc-dev mailing list