All of lore.kernel.org
 help / color / mirror / Atom feed
* Duplicated device tree and Dynamic symbols
@ 2015-04-28  8:16 Ricardo Ribalda Delgado
       [not found] ` <CAPybu_3CQ0vD=uj_gKwdcsQ_W7u-SRKzKDWOYaXvU83V8iYOqw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: Ricardo Ribalda Delgado @ 2015-04-28  8:16 UTC (permalink / raw)
  To: devicetree-u79uwXL29TY76Z2rM5mHXA, Pantelis Antoniou,
	Grant Likely, Sascha Hauer

Hello

I have an X86 platform with device tree support. It has multiple pci
slots with a custom board that is described with a device tree.

When the pci device is probed, the driver fetches a device tree from
the firmware infrastructure, patches the range property based on the
bar address and adds the device to the main device tree.

This works perfectly fine with only one card, but when the second card
is connected: Here be dragons :)

The main issue is that of_find_node_by_phandle always resolves to the
first connected card. I fixed this by creating a new function.
of_find_node_by_phandle_family() that chooses the closest phandle on
the tree, not just the first one.

By reading the "Dynamic Symbols support and fixup support"
here:
http://events.linuxfoundation.org/sites/events/files/slides/dynamic-dt-elce14.pdf
and here
https://lwn.net/Articles/616859/

It seemed that the patch would fix my issue and it would be already
merged, but I cannot find the patch here
https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git
or here
https://git.kernel.org/cgit/linux/kernel/git/jdl/dtc.git

So I am wondering some stuff:

Would a patch adding my of_find_node_by_phandle_family() would be accepted.?

Will Dynamic symbols fix my issue?

What is the status of Dynamic symbol support?

Thanks!


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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Duplicated device tree and Dynamic symbols
       [not found] ` <CAPybu_3CQ0vD=uj_gKwdcsQ_W7u-SRKzKDWOYaXvU83V8iYOqw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2015-04-28  8:36   ` Pantelis Antoniou
       [not found]     ` <9E8352D3-3925-4362-95D0-F2284993FB0F-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
  2015-06-08 16:27   ` Grant Likely
  1 sibling, 1 reply; 9+ messages in thread
From: Pantelis Antoniou @ 2015-04-28  8:36 UTC (permalink / raw)
  To: Ricardo Ribalda Delgado
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, Grant Likely, Sascha Hauer

Hi Ricardo,

> On Apr 28, 2015, at 11:16 , Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> wrote:
> 
> Hello
> 
> I have an X86 platform with device tree support. It has multiple pci
> slots with a custom board that is described with a device tree.
> 
> When the pci device is probed, the driver fetches a device tree from
> the firmware infrastructure, patches the range property based on the
> bar address and adds the device to the main device tree.
> 
> This works perfectly fine with only one card, but when the second card
> is connected: Here be dragons :)
> 
> The main issue is that of_find_node_by_phandle always resolves to the
> first connected card. I fixed this by creating a new function.
> of_find_node_by_phandle_family() that chooses the closest phandle on
> the tree, not just the first one.
> 
> By reading the "Dynamic Symbols support and fixup support"
> here:
> http://events.linuxfoundation.org/sites/events/files/slides/dynamic-dt-elce14.pdf
> and here
> https://lwn.net/Articles/616859/
> 
> It seemed that the patch would fix my issue and it would be already
> merged, but I cannot find the patch here
> https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git
> or here
> https://git.kernel.org/cgit/linux/kernel/git/jdl/dtc.git
> 
> So I am wondering some stuff:
> 
> Would a patch adding my of_find_node_by_phandle_family() would be accepted.?
> 
> Will Dynamic symbols fix my issue?
> 
> What is the status of Dynamic symbol support?
> 
> Thanks!
> 
> 

You’ll find it hard to believe but there’s someone using something similar.

I’m trying to figure out how to make it work; hang on to your horses. I’ll CC you
when I post the patches.


> -- 
> Ricardo Ribalda

Regards

— Pantelis

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Duplicated device tree and Dynamic symbols
       [not found] ` <CAPybu_3CQ0vD=uj_gKwdcsQ_W7u-SRKzKDWOYaXvU83V8iYOqw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  2015-04-28  8:36   ` Pantelis Antoniou
@ 2015-06-08 16:27   ` Grant Likely
       [not found]     ` <CACxGe6sRW3nrExniVH7dw23=XCqHzv73E4Km8o=5Sr+mcNe34Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  1 sibling, 1 reply; 9+ messages in thread
From: Grant Likely @ 2015-06-08 16:27 UTC (permalink / raw)
  To: Ricardo Ribalda Delgado
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, Pantelis Antoniou, Sascha Hauer

On Tue, Apr 28, 2015 at 9:16 AM, Ricardo Ribalda Delgado
<ricardo.ribalda-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
> Hello
>
> I have an X86 platform with device tree support. It has multiple pci
> slots with a custom board that is described with a device tree.
>
> When the pci device is probed, the driver fetches a device tree from
> the firmware infrastructure, patches the range property based on the
> bar address and adds the device to the main device tree.
>
> This works perfectly fine with only one card, but when the second card
> is connected: Here be dragons :)
>
> The main issue is that of_find_node_by_phandle always resolves to the
> first connected card. I fixed this by creating a new function.
> of_find_node_by_phandle_family() that chooses the closest phandle on
> the tree, not just the first one.
>
> By reading the "Dynamic Symbols support and fixup support"
> here:
> http://events.linuxfoundation.org/sites/events/files/slides/dynamic-dt-elce14.pdf
> and here
> https://lwn.net/Articles/616859/
>
> It seemed that the patch would fix my issue and it would be already
> merged, but I cannot find the patch here
> https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git
> or here
> https://git.kernel.org/cgit/linux/kernel/git/jdl/dtc.git
>
> So I am wondering some stuff:
>
> Would a patch adding my of_find_node_by_phandle_family() would be accepted.?

No, phandles must be unique. That's what phandles are; unique identifiers. :-)

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Duplicated device tree and Dynamic symbols
       [not found]     ` <9E8352D3-3925-4362-95D0-F2284993FB0F-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
@ 2015-06-08 20:14       ` Ricardo Ribalda Delgado
       [not found]         ` <CAPybu_23vDtL5xxnUCUoNxwGTwVFGsNcGiS5Mg2M+u4jaQF1Sg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: Ricardo Ribalda Delgado @ 2015-06-08 20:14 UTC (permalink / raw)
  To: Pantelis Antoniou
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, Grant Likely, Sascha Hauer

Hello Pantelis

Any progress here?

Thanks

On Tue, Apr 28, 2015 at 10:36 AM, Pantelis Antoniou
<pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org> wrote:
> Hi Ricardo,
>
>> On Apr 28, 2015, at 11:16 , Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> wrote:
>>
>> Hello
>>
>> I have an X86 platform with device tree support. It has multiple pci
>> slots with a custom board that is described with a device tree.
>>
>> When the pci device is probed, the driver fetches a device tree from
>> the firmware infrastructure, patches the range property based on the
>> bar address and adds the device to the main device tree.
>>
>> This works perfectly fine with only one card, but when the second card
>> is connected: Here be dragons :)
>>
>> The main issue is that of_find_node_by_phandle always resolves to the
>> first connected card. I fixed this by creating a new function.
>> of_find_node_by_phandle_family() that chooses the closest phandle on
>> the tree, not just the first one.
>>
>> By reading the "Dynamic Symbols support and fixup support"
>> here:
>> http://events.linuxfoundation.org/sites/events/files/slides/dynamic-dt-elce14.pdf
>> and here
>> https://lwn.net/Articles/616859/
>>
>> It seemed that the patch would fix my issue and it would be already
>> merged, but I cannot find the patch here
>> https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git
>> or here
>> https://git.kernel.org/cgit/linux/kernel/git/jdl/dtc.git
>>
>> So I am wondering some stuff:
>>
>> Would a patch adding my of_find_node_by_phandle_family() would be accepted.?
>>
>> Will Dynamic symbols fix my issue?
>>
>> What is the status of Dynamic symbol support?
>>
>> Thanks!
>>
>>
>
> You’ll find it hard to believe but there’s someone using something similar.
>
> I’m trying to figure out how to make it work; hang on to your horses. I’ll CC you
> when I post the patches.
>
>
>> --
>> Ricardo Ribalda
>
> Regards
>
> — Pantelis
>



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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Duplicated device tree and Dynamic symbols
       [not found]     ` <CACxGe6sRW3nrExniVH7dw23=XCqHzv73E4Km8o=5Sr+mcNe34Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2015-06-08 20:16       ` Ricardo Ribalda Delgado
  0 siblings, 0 replies; 9+ messages in thread
From: Ricardo Ribalda Delgado @ 2015-06-08 20:16 UTC (permalink / raw)
  To: Grant Likely
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, Pantelis Antoniou, Sascha Hauer

Hello Grant

I totally understand. every phandle is unique in every device tree,
but I have one device tree per pcie.

What happened to Dynamic Symbols support and fixup support?

If i read it right, it adds some information about the symbols so they
can be treated specially.

Regards!


On Mon, Jun 8, 2015 at 6:27 PM, Grant Likely <grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> wrote:
> On Tue, Apr 28, 2015 at 9:16 AM, Ricardo Ribalda Delgado
> <ricardo.ribalda-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>
>> Hello
>>
>> I have an X86 platform with device tree support. It has multiple pci
>> slots with a custom board that is described with a device tree.
>>
>> When the pci device is probed, the driver fetches a device tree from
>> the firmware infrastructure, patches the range property based on the
>> bar address and adds the device to the main device tree.
>>
>> This works perfectly fine with only one card, but when the second card
>> is connected: Here be dragons :)
>>
>> The main issue is that of_find_node_by_phandle always resolves to the
>> first connected card. I fixed this by creating a new function.
>> of_find_node_by_phandle_family() that chooses the closest phandle on
>> the tree, not just the first one.
>>
>> By reading the "Dynamic Symbols support and fixup support"
>> here:
>> http://events.linuxfoundation.org/sites/events/files/slides/dynamic-dt-elce14.pdf
>> and here
>> https://lwn.net/Articles/616859/
>>
>> It seemed that the patch would fix my issue and it would be already
>> merged, but I cannot find the patch here
>> https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git
>> or here
>> https://git.kernel.org/cgit/linux/kernel/git/jdl/dtc.git
>>
>> So I am wondering some stuff:
>>
>> Would a patch adding my of_find_node_by_phandle_family() would be accepted.?
>
> No, phandles must be unique. That's what phandles are; unique identifiers. :-)
>
> g.



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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Duplicated device tree and Dynamic symbols
       [not found]         ` <CAPybu_23vDtL5xxnUCUoNxwGTwVFGsNcGiS5Mg2M+u4jaQF1Sg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2015-06-12 20:06           ` Pantelis Antoniou
       [not found]             ` <F843F38C-8990-40DD-AF7B-879213FA865C-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: Pantelis Antoniou @ 2015-06-12 20:06 UTC (permalink / raw)
  To: Ricardo Ribalda Delgado
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, Grant Likely, Sascha Hauer

Hi Ricardo,

> On Jun 8, 2015, at 23:14 , Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> wrote:
> 
> Hello Pantelis
> 
> Any progress here?
> 

I just posted a bunch of patches that make possible using PCI with device tree.
Perhaps you’d like to take a look.

> Thanks
> 

Regards

— Pantelis

> On Tue, Apr 28, 2015 at 10:36 AM, Pantelis Antoniou
> <pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org> wrote:
>> Hi Ricardo,
>> 
>>> On Apr 28, 2015, at 11:16 , Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> wrote:
>>> 
>>> Hello
>>> 
>>> I have an X86 platform with device tree support. It has multiple pci
>>> slots with a custom board that is described with a device tree.
>>> 
>>> When the pci device is probed, the driver fetches a device tree from
>>> the firmware infrastructure, patches the range property based on the
>>> bar address and adds the device to the main device tree.
>>> 
>>> This works perfectly fine with only one card, but when the second card
>>> is connected: Here be dragons :)
>>> 
>>> The main issue is that of_find_node_by_phandle always resolves to the
>>> first connected card. I fixed this by creating a new function.
>>> of_find_node_by_phandle_family() that chooses the closest phandle on
>>> the tree, not just the first one.
>>> 
>>> By reading the "Dynamic Symbols support and fixup support"
>>> here:
>>> http://events.linuxfoundation.org/sites/events/files/slides/dynamic-dt-elce14.pdf
>>> and here
>>> https://lwn.net/Articles/616859/
>>> 
>>> It seemed that the patch would fix my issue and it would be already
>>> merged, but I cannot find the patch here
>>> https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git
>>> or here
>>> https://git.kernel.org/cgit/linux/kernel/git/jdl/dtc.git
>>> 
>>> So I am wondering some stuff:
>>> 
>>> Would a patch adding my of_find_node_by_phandle_family() would be accepted.?
>>> 
>>> Will Dynamic symbols fix my issue?
>>> 
>>> What is the status of Dynamic symbol support?
>>> 
>>> Thanks!
>>> 
>>> 
>> 
>> You’ll find it hard to believe but there’s someone using something similar.
>> 
>> I’m trying to figure out how to make it work; hang on to your horses. I’ll CC you
>> when I post the patches.
>> 
>> 
>>> --
>>> Ricardo Ribalda
>> 
>> Regards
>> 
>> — Pantelis
>> 
> 
> 
> 
> -- 
> Ricardo Ribalda

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Duplicated device tree and Dynamic symbols
       [not found]             ` <F843F38C-8990-40DD-AF7B-879213FA865C-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
@ 2015-06-12 21:53               ` Ricardo Ribalda Delgado
       [not found]                 ` <CAPybu_1LX6swWfd4cgfRxeS00uOEvoZWV3cb1Ppz=XQs69JbUw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: Ricardo Ribalda Delgado @ 2015-06-12 21:53 UTC (permalink / raw)
  To: Pantelis Antoniou
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, Grant Likely, Sascha Hauer

Hello Pantelis

Thanks for your patches, I will try to test it during the next week.
Just one question.

Where can I find the dtc with support for __fixup__ and __local_fixups__ ?

Seems that is its not part of /scripts/dtc or
https://git.kernel.org/cgit/utils/dtc/dtc.git/log/

Thanks!

On Fri, Jun 12, 2015 at 10:06 PM, Pantelis Antoniou
<pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org> wrote:
> Hi Ricardo,
>
>> On Jun 8, 2015, at 23:14 , Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> wrote:
>>
>> Hello Pantelis
>>
>> Any progress here?
>>
>
> I just posted a bunch of patches that make possible using PCI with device tree.
> Perhaps you’d like to take a look.
>
>> Thanks
>>
>
> Regards
>
> — Pantelis
>
>> On Tue, Apr 28, 2015 at 10:36 AM, Pantelis Antoniou
>> <pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org> wrote:
>>> Hi Ricardo,
>>>
>>>> On Apr 28, 2015, at 11:16 , Ricardo Ribalda Delgado <ricardo.ribalda-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>>>
>>>> Hello
>>>>
>>>> I have an X86 platform with device tree support. It has multiple pci
>>>> slots with a custom board that is described with a device tree.
>>>>
>>>> When the pci device is probed, the driver fetches a device tree from
>>>> the firmware infrastructure, patches the range property based on the
>>>> bar address and adds the device to the main device tree.
>>>>
>>>> This works perfectly fine with only one card, but when the second card
>>>> is connected: Here be dragons :)
>>>>
>>>> The main issue is that of_find_node_by_phandle always resolves to the
>>>> first connected card. I fixed this by creating a new function.
>>>> of_find_node_by_phandle_family() that chooses the closest phandle on
>>>> the tree, not just the first one.
>>>>
>>>> By reading the "Dynamic Symbols support and fixup support"
>>>> here:
>>>> http://events.linuxfoundation.org/sites/events/files/slides/dynamic-dt-elce14.pdf
>>>> and here
>>>> https://lwn.net/Articles/616859/
>>>>
>>>> It seemed that the patch would fix my issue and it would be already
>>>> merged, but I cannot find the patch here
>>>> https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git
>>>> or here
>>>> https://git.kernel.org/cgit/linux/kernel/git/jdl/dtc.git
>>>>
>>>> So I am wondering some stuff:
>>>>
>>>> Would a patch adding my of_find_node_by_phandle_family() would be accepted.?
>>>>
>>>> Will Dynamic symbols fix my issue?
>>>>
>>>> What is the status of Dynamic symbol support?
>>>>
>>>> Thanks!
>>>>
>>>>
>>>
>>> You’ll find it hard to believe but there’s someone using something similar.
>>>
>>> I’m trying to figure out how to make it work; hang on to your horses. I’ll CC you
>>> when I post the patches.
>>>
>>>
>>>> --
>>>> Ricardo Ribalda
>>>
>>> Regards
>>>
>>> — Pantelis
>>>
>>
>>
>>
>> --
>> Ricardo Ribalda
>



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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Duplicated device tree and Dynamic symbols
       [not found]                 ` <CAPybu_1LX6swWfd4cgfRxeS00uOEvoZWV3cb1Ppz=XQs69JbUw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2015-07-16 20:11                   ` Ricardo Ribalda Delgado
       [not found]                     ` <CAPybu_2N3tek5vHoZ768pwEeLj5cPfEVQh0pHXAaZzveTtoo1g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: Ricardo Ribalda Delgado @ 2015-07-16 20:11 UTC (permalink / raw)
  To: Pantelis Antoniou
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, Grant Likely, Sascha Hauer

Ping?

On Fri, Jun 12, 2015 at 11:53 PM, Ricardo Ribalda Delgado
<ricardo.ribalda-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> Hello Pantelis
>
> Thanks for your patches, I will try to test it during the next week.
> Just one question.
>
> Where can I find the dtc with support for __fixup__ and __local_fixups__ ?
>
> Seems that is its not part of /scripts/dtc or
> https://git.kernel.org/cgit/utils/dtc/dtc.git/log/
>
> Thanks!
>
> On Fri, Jun 12, 2015 at 10:06 PM, Pantelis Antoniou
> <pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org> wrote:
>> Hi Ricardo,
>>
>>> On Jun 8, 2015, at 23:14 , Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> wrote:
>>>
>>> Hello Pantelis
>>>
>>> Any progress here?
>>>
>>
>> I just posted a bunch of patches that make possible using PCI with device tree.
>> Perhaps you’d like to take a look.
>>
>>> Thanks
>>>
>>
>> Regards
>>
>> — Pantelis
>>
>>> On Tue, Apr 28, 2015 at 10:36 AM, Pantelis Antoniou
>>> <pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org> wrote:
>>>> Hi Ricardo,
>>>>
>>>>> On Apr 28, 2015, at 11:16 , Ricardo Ribalda Delgado <ricardo.ribalda-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>>>>
>>>>> Hello
>>>>>
>>>>> I have an X86 platform with device tree support. It has multiple pci
>>>>> slots with a custom board that is described with a device tree.
>>>>>
>>>>> When the pci device is probed, the driver fetches a device tree from
>>>>> the firmware infrastructure, patches the range property based on the
>>>>> bar address and adds the device to the main device tree.
>>>>>
>>>>> This works perfectly fine with only one card, but when the second card
>>>>> is connected: Here be dragons :)
>>>>>
>>>>> The main issue is that of_find_node_by_phandle always resolves to the
>>>>> first connected card. I fixed this by creating a new function.
>>>>> of_find_node_by_phandle_family() that chooses the closest phandle on
>>>>> the tree, not just the first one.
>>>>>
>>>>> By reading the "Dynamic Symbols support and fixup support"
>>>>> here:
>>>>> http://events.linuxfoundation.org/sites/events/files/slides/dynamic-dt-elce14.pdf
>>>>> and here
>>>>> https://lwn.net/Articles/616859/
>>>>>
>>>>> It seemed that the patch would fix my issue and it would be already
>>>>> merged, but I cannot find the patch here
>>>>> https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git
>>>>> or here
>>>>> https://git.kernel.org/cgit/linux/kernel/git/jdl/dtc.git
>>>>>
>>>>> So I am wondering some stuff:
>>>>>
>>>>> Would a patch adding my of_find_node_by_phandle_family() would be accepted.?
>>>>>
>>>>> Will Dynamic symbols fix my issue?
>>>>>
>>>>> What is the status of Dynamic symbol support?
>>>>>
>>>>> Thanks!
>>>>>
>>>>>
>>>>
>>>> You’ll find it hard to believe but there’s someone using something similar.
>>>>
>>>> I’m trying to figure out how to make it work; hang on to your horses. I’ll CC you
>>>> when I post the patches.
>>>>
>>>>
>>>>> --
>>>>> Ricardo Ribalda
>>>>
>>>> Regards
>>>>
>>>> — Pantelis
>>>>
>>>
>>>
>>>
>>> --
>>> Ricardo Ribalda
>>
>
>
>
> --
> Ricardo Ribalda



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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Duplicated device tree and Dynamic symbols
       [not found]                     ` <CAPybu_2N3tek5vHoZ768pwEeLj5cPfEVQh0pHXAaZzveTtoo1g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2015-07-17 10:19                       ` Pantelis Antoniou
  0 siblings, 0 replies; 9+ messages in thread
From: Pantelis Antoniou @ 2015-07-17 10:19 UTC (permalink / raw)
  To: Ricardo Ribalda Delgado
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, Grant Likely, Sascha Hauer

Hi Ricardo,

> On Jul 16, 2015, at 23:11 , Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> wrote:
> 
> Ping?
> 

On vacations, but take a look at:

https://github.com/pantoniou/dtc

Regards

— Pantelis

> On Fri, Jun 12, 2015 at 11:53 PM, Ricardo Ribalda Delgado
> <ricardo.ribalda-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>> Hello Pantelis
>> 
>> Thanks for your patches, I will try to test it during the next week.
>> Just one question.
>> 
>> Where can I find the dtc with support for __fixup__ and __local_fixups__ ?
>> 
>> Seems that is its not part of /scripts/dtc or
>> https://git.kernel.org/cgit/utils/dtc/dtc.git/log/
>> 
>> Thanks!
>> 
>> On Fri, Jun 12, 2015 at 10:06 PM, Pantelis Antoniou
>> <pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org> wrote:
>>> Hi Ricardo,
>>> 
>>>> On Jun 8, 2015, at 23:14 , Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> wrote:
>>>> 
>>>> Hello Pantelis
>>>> 
>>>> Any progress here?
>>>> 
>>> 
>>> I just posted a bunch of patches that make possible using PCI with device tree.
>>> Perhaps you’d like to take a look.
>>> 
>>>> Thanks
>>>> 
>>> 
>>> Regards
>>> 
>>> — Pantelis
>>> 
>>>> On Tue, Apr 28, 2015 at 10:36 AM, Pantelis Antoniou
>>>> <pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org> wrote:
>>>>> Hi Ricardo,
>>>>> 
>>>>>> On Apr 28, 2015, at 11:16 , Ricardo Ribalda Delgado <ricardo.ribalda-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>>>>> 
>>>>>> Hello
>>>>>> 
>>>>>> I have an X86 platform with device tree support. It has multiple pci
>>>>>> slots with a custom board that is described with a device tree.
>>>>>> 
>>>>>> When the pci device is probed, the driver fetches a device tree from
>>>>>> the firmware infrastructure, patches the range property based on the
>>>>>> bar address and adds the device to the main device tree.
>>>>>> 
>>>>>> This works perfectly fine with only one card, but when the second card
>>>>>> is connected: Here be dragons :)
>>>>>> 
>>>>>> The main issue is that of_find_node_by_phandle always resolves to the
>>>>>> first connected card. I fixed this by creating a new function.
>>>>>> of_find_node_by_phandle_family() that chooses the closest phandle on
>>>>>> the tree, not just the first one.
>>>>>> 
>>>>>> By reading the "Dynamic Symbols support and fixup support"
>>>>>> here:
>>>>>> http://events.linuxfoundation.org/sites/events/files/slides/dynamic-dt-elce14.pdf
>>>>>> and here
>>>>>> https://lwn.net/Articles/616859/
>>>>>> 
>>>>>> It seemed that the patch would fix my issue and it would be already
>>>>>> merged, but I cannot find the patch here
>>>>>> https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git
>>>>>> or here
>>>>>> https://git.kernel.org/cgit/linux/kernel/git/jdl/dtc.git
>>>>>> 
>>>>>> So I am wondering some stuff:
>>>>>> 
>>>>>> Would a patch adding my of_find_node_by_phandle_family() would be accepted.?
>>>>>> 
>>>>>> Will Dynamic symbols fix my issue?
>>>>>> 
>>>>>> What is the status of Dynamic symbol support?
>>>>>> 
>>>>>> Thanks!
>>>>>> 
>>>>>> 
>>>>> 
>>>>> You’ll find it hard to believe but there’s someone using something similar.
>>>>> 
>>>>> I’m trying to figure out how to make it work; hang on to your horses. I’ll CC you
>>>>> when I post the patches.
>>>>> 
>>>>> 
>>>>>> --
>>>>>> Ricardo Ribalda
>>>>> 
>>>>> Regards
>>>>> 
>>>>> — Pantelis
>>>>> 
>>>> 
>>>> 
>>>> 
>>>> --
>>>> Ricardo Ribalda
>>> 
>> 
>> 
>> 
>> --
>> Ricardo Ribalda
> 
> 
> 
> -- 
> Ricardo Ribalda
> --
> To unsubscribe from this list: send the line "unsubscribe devicetree" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-07-17 10:19 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-28  8:16 Duplicated device tree and Dynamic symbols Ricardo Ribalda Delgado
     [not found] ` <CAPybu_3CQ0vD=uj_gKwdcsQ_W7u-SRKzKDWOYaXvU83V8iYOqw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-04-28  8:36   ` Pantelis Antoniou
     [not found]     ` <9E8352D3-3925-4362-95D0-F2284993FB0F-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
2015-06-08 20:14       ` Ricardo Ribalda Delgado
     [not found]         ` <CAPybu_23vDtL5xxnUCUoNxwGTwVFGsNcGiS5Mg2M+u4jaQF1Sg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-06-12 20:06           ` Pantelis Antoniou
     [not found]             ` <F843F38C-8990-40DD-AF7B-879213FA865C-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
2015-06-12 21:53               ` Ricardo Ribalda Delgado
     [not found]                 ` <CAPybu_1LX6swWfd4cgfRxeS00uOEvoZWV3cb1Ppz=XQs69JbUw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-07-16 20:11                   ` Ricardo Ribalda Delgado
     [not found]                     ` <CAPybu_2N3tek5vHoZ768pwEeLj5cPfEVQh0pHXAaZzveTtoo1g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-07-17 10:19                       ` Pantelis Antoniou
2015-06-08 16:27   ` Grant Likely
     [not found]     ` <CACxGe6sRW3nrExniVH7dw23=XCqHzv73E4Km8o=5Sr+mcNe34Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-06-08 20:16       ` Ricardo Ribalda Delgado

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.