devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* HOWTO Undo/Revert of_platform_populate?
@ 2013-03-07 10:32 Ricardo Ribalda Delgado
  2013-03-08  0:07 ` Rob Herring
  0 siblings, 1 reply; 3+ messages in thread
From: Ricardo Ribalda Delgado @ 2013-03-07 10:32 UTC (permalink / raw)
  To: LKML, Grant Likely, Rob Herring, devicetree-discuss

Hi

I have an FPGA attached to the pci bus. The FPGA has an internal bus
with multiple cores that are already supported in the kernel.

I have made a driver that populates those cores using a user provided
device tree. I use the function of_platform_populate for that.

All this is working fine, but now I need a method to undo what
of_platform_populate does when the fpga is reprogrammed.

I haven't found any function that does this in the api.

Before implementing my own I would like to know if am I missing something?


Thanks!

-- 
Ricardo Ribalda

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

* Re: HOWTO Undo/Revert of_platform_populate?
  2013-03-07 10:32 HOWTO Undo/Revert of_platform_populate? Ricardo Ribalda Delgado
@ 2013-03-08  0:07 ` Rob Herring
       [not found]   ` <51392BD9.4010209-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Rob Herring @ 2013-03-08  0:07 UTC (permalink / raw)
  To: Ricardo Ribalda Delgado; +Cc: LKML, Grant Likely, devicetree-discuss

On 03/07/2013 04:32 AM, Ricardo Ribalda Delgado wrote:
> Hi
> 
> I have an FPGA attached to the pci bus. The FPGA has an internal bus
> with multiple cores that are already supported in the kernel.
> 
> I have made a driver that populates those cores using a user provided
> device tree. I use the function of_platform_populate for that.
> 
> All this is working fine, but now I need a method to undo what
> of_platform_populate does when the fpga is reprogrammed.
> 
> I haven't found any function that does this in the api.
> 
> Before implementing my own I would like to know if am I missing something?

It's not possible in the current kernel. You need DT overlay support
that was posted recently.

Rob

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

* Re: HOWTO Undo/Revert of_platform_populate?
       [not found]   ` <51392BD9.4010209-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2013-04-15 13:40     ` Grant Likely
  0 siblings, 0 replies; 3+ messages in thread
From: Grant Likely @ 2013-04-15 13:40 UTC (permalink / raw)
  To: Rob Herring, Ricardo Ribalda Delgado
  Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, LKML

On Thu, 07 Mar 2013 18:07:53 -0600, Rob Herring <robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> On 03/07/2013 04:32 AM, Ricardo Ribalda Delgado wrote:
> > Hi
> > 
> > I have an FPGA attached to the pci bus. The FPGA has an internal bus
> > with multiple cores that are already supported in the kernel.
> > 
> > I have made a driver that populates those cores using a user provided
> > device tree. I use the function of_platform_populate for that.
> > 
> > All this is working fine, but now I need a method to undo what
> > of_platform_populate does when the fpga is reprogrammed.
> > 
> > I haven't found any function that does this in the api.
> > 
> > Before implementing my own I would like to know if am I missing something?
> 
> It's not possible in the current kernel. You need DT overlay support
> that was posted recently.

In the mean time you can merely recurse all the children of the parent
struct device, unregister them from the device model, and release them.

g.

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

end of thread, other threads:[~2013-04-15 13:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-07 10:32 HOWTO Undo/Revert of_platform_populate? Ricardo Ribalda Delgado
2013-03-08  0:07 ` Rob Herring
     [not found]   ` <51392BD9.4010209-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-04-15 13:40     ` Grant Likely

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).