* RE: [PATCH v2 2/2] powerpc/mpic: add global timer support
[not found] ` <ABB05CD9C9F68C46A5CEDC7F15439259DB147E-RL0Hj/+nBVC81RJBUSuqCa4g8xLGJsHaLnY5E4hWTkheoWH0uzbU5w@public.gmane.org>
@ 2012-08-13 6:17 ` Li Yang-R58472
0 siblings, 0 replies; 2+ messages in thread
From: Li Yang-R58472 @ 2012-08-13 6:17 UTC (permalink / raw)
To: Wang Dongsheng-B40534, Wood Scott-B07421
Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
Gala Kumar-B11780, paulus-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org,
linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
> -----Original Message-----
> From: Wang Dongsheng-B40534
> Sent: Monday, August 13, 2012 1:54 PM
> To: Wood Scott-B07421
> Cc: benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org; paulus-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org; linuxppc-
> dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org; Gala Kumar-B11780; Li Yang-R58472
> Subject: RE: [PATCH v2 2/2] powerpc/mpic: add global timer support
>
>
>
> > -----Original Message-----
> > From: Wood Scott-B07421
> > Sent: Saturday, August 11, 2012 3:40 AM
> > To: Wang Dongsheng-B40534
> > Cc: benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org; paulus-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org; linuxppc-
> > dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.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-KZfg59tc24xl57MIdRCFDg@public.gmane.org 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.
Actually it does match the compatible. The device_type is just to speed up the search. I don't think it's a problem unless the device type is not mandatory any more for defined types.
- Leo
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v2 2/2] powerpc/mpic: add global timer support
[not found] ` <94F013E7935FF44C83EBE7784D62AD3F093AEC18-RL0Hj/+nBVDtkydW1Tv2Dq4g8xLGJsHaLnY5E4hWTkheoWH0uzbU5w@public.gmane.org>
@ 2012-08-13 16:50 ` Scott Wood
0 siblings, 0 replies; 2+ messages in thread
From: Scott Wood @ 2012-08-13 16:50 UTC (permalink / raw)
To: Li Yang-R58472
Cc: Wood Scott-B07421,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
Wang Dongsheng-B40534,
paulus-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org, Gala Kumar-B11780,
linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
On 08/13/2012 01:17 AM, Li Yang-R58472 wrote:
>
>
>> -----Original Message-----
>> From: Wang Dongsheng-B40534
>> Sent: Monday, August 13, 2012 1:54 PM
>> To: Wood Scott-B07421
>> Cc: benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org; paulus-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org; linuxppc-
>> dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org; Gala Kumar-B11780; Li Yang-R58472
>> Subject: RE: [PATCH v2 2/2] powerpc/mpic: add global timer support
>>
>>
>>
>>> -----Original Message-----
>>> From: Wood Scott-B07421
>>> Sent: Saturday, August 11, 2012 3:40 AM
>>> To: Wang Dongsheng-B40534
>>> Cc: benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org; paulus-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org; linuxppc-
>>> dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.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-KZfg59tc24xl57MIdRCFDg@public.gmane.org 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.
>
> Actually it does match the compatible. The device_type is just to
> speed up the search. I don't think it's a problem unless the device
> type is not mandatory any more for defined types.
Doesn't matter (and I doubt it provides any significant speed up
compared to a search by compatible, and in any case this is not
performance critical). device_type is deprecated outside certain
specific legacy uses. Get rid of it.
-Scott
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-08-13 16:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1344578081-8095-1-git-send-email-Dongsheng.wang@freescale.com>
[not found] ` <5025639F.4070203@freescale.com>
[not found] ` <ABB05CD9C9F68C46A5CEDC7F15439259DB147E@039-SN2MPN1-022.039d.mgd.msft.net>
[not found] ` <ABB05CD9C9F68C46A5CEDC7F15439259DB147E-RL0Hj/+nBVC81RJBUSuqCa4g8xLGJsHaLnY5E4hWTkheoWH0uzbU5w@public.gmane.org>
2012-08-13 6:17 ` [PATCH v2 2/2] powerpc/mpic: add global timer support Li Yang-R58472
[not found] ` <94F013E7935FF44C83EBE7784D62AD3F093AEC18-RL0Hj/+nBVDtkydW1Tv2Dq4g8xLGJsHaLnY5E4hWTkheoWH0uzbU5w@public.gmane.org>
2012-08-13 16:50 ` Scott Wood
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).