Re: [PATCH] of: provide of_platform_unpopulate()

2013-07-31 Thread Rob Herring
On 07/29/2013 04:33 AM, Benjamin Herrenschmidt wrote: > On Mon, 2013-07-22 at 00:44 +0100, Grant Likely wrote: >>> BTW, it looks like Grant has attempted this already: >> >> Yup, things broke badly. Unfortunately the of_platform_device and >> platform_device history doesn't treat resources in the s

Re: [PATCH] of: provide of_platform_unpopulate()

2013-07-31 Thread Sebastian Andrzej Siewior
* Grant Likely | 2013-07-24 15:19:58 [+0100]: >> Was there more breakage than imx6 and amba devices? Your first version >> had a fallback case for powerpc. Couldn't we do just allow that for more >> than just powerpc? I'd much rather see some work-around within the core >> DT code with a warning t

Re: [PATCH] of: provide of_platform_unpopulate()

2013-07-29 Thread Benjamin Herrenschmidt
On Mon, 2013-07-22 at 00:44 +0100, Grant Likely wrote: > > BTW, it looks like Grant has attempted this already: > > Yup, things broke badly. Unfortunately the of_platform_device and > platform_device history doesn't treat resources in the same way. I > would like to merge the code, but I haven't b

Re: [PATCH] of: provide of_platform_unpopulate()

2013-07-29 Thread Benjamin Herrenschmidt
On Fri, 2013-07-19 at 20:14 +0200, Sebastian Andrzej Siewior wrote: > The problem is that platform_device_del() "releases" each ressource in its > tree. This does not work on platform_devices created by OF becuase they > were never added via insert_resource(). As a consequence old->parent in > __re

Re: [PATCH] of: provide of_platform_unpopulate()

2013-07-24 Thread Grant Likely
On Mon, 22 Jul 2013 16:16:07 -0500, Rob Herring wrote: > On 07/21/2013 06:44 PM, Grant Likely wrote: > > On Sun, Jul 21, 2013 at 9:48 PM, Rob Herring wrote: > >> On 07/21/2013 09:42 AM, Rob Herring wrote: > >>> On 07/19/2013 01:14 PM, Sebastian Andrzej Siewior wrote: > So I called of_platfor

Re: [PATCH] of: provide of_platform_unpopulate()

2013-07-22 Thread Rob Herring
On 07/21/2013 06:44 PM, Grant Likely wrote: > On Sun, Jul 21, 2013 at 9:48 PM, Rob Herring wrote: >> On 07/21/2013 09:42 AM, Rob Herring wrote: >>> On 07/19/2013 01:14 PM, Sebastian Andrzej Siewior wrote: So I called of_platform_populate() on a device to get each child device probed and

Re: Re: [PATCH] of: provide of_platform_unpopulate()

2013-07-22 Thread NAVEEN KRISHNA CHATRADHI
Hello Sebastian, --- Original Message --- Sender : Sebastian Andrzej Siewior Date : Jul 22, 2013 13:55 (GMT+05:30) Title : Re: [PATCH] of: provide of_platform_unpopulate() On 07/20/2013 07:42 AM, NAVEEN KRISHNA CHATRADHI wrote: > Hello Sebastian, Hello Naveen, > > I jus

Re: [PATCH] of: provide of_platform_unpopulate()

2013-07-22 Thread Sebastian Andrzej Siewior
On 07/20/2013 07:42 AM, NAVEEN KRISHNA CHATRADHI wrote: > Hello Sebastian, Hello Naveen, > > I just did one more testing. > > In case of iio/adc/exynos_adc.c there is a bug in the remove path. > If I fix the bug in the driver, with below patch > > --- a/drivers/iio/adc/exynos_adc.c > +++ b/dri

Re: [PATCH] of: provide of_platform_unpopulate()

2013-07-21 Thread Grant Likely
On Sun, Jul 21, 2013 at 9:48 PM, Rob Herring wrote: > On 07/21/2013 09:42 AM, Rob Herring wrote: >> On 07/19/2013 01:14 PM, Sebastian Andrzej Siewior wrote: >>> So I called of_platform_populate() on a device to get each child device >>> probed and on rmmod and I need to reverse its doing. After a

Re: [PATCH] of: provide of_platform_unpopulate()

2013-07-21 Thread Rob Herring
On 07/21/2013 09:42 AM, Rob Herring wrote: > On 07/19/2013 01:14 PM, Sebastian Andrzej Siewior wrote: >> So I called of_platform_populate() on a device to get each child device >> probed and on rmmod and I need to reverse its doing. After a quick grep >> I did what others did as well and rmmod ende

Re: [PATCH] of: provide of_platform_unpopulate()

2013-07-21 Thread Sebastian Andrzej Siewior
On 07/21/2013 04:42 PM, Rob Herring wrote: > Wouldn't the correct fix be to call insert_resource somehow? Yes unless there was a reason this wasn't done in the first place. > The problem > I have is that while of_platform_populate is all about parsing the DT > and creating devices, the removal si

Re: [PATCH] of: provide of_platform_unpopulate()

2013-07-21 Thread Rob Herring
On 07/19/2013 01:14 PM, Sebastian Andrzej Siewior wrote: > So I called of_platform_populate() on a device to get each child device > probed and on rmmod and I need to reverse its doing. After a quick grep > I did what others did as well and rmmod ended in: > > | Unable to handle kernel NULL pointe

Re: [PATCH] of: provide of_platform_unpopulate()

2013-07-19 Thread NAVEEN KRISHNA CHATRADHI
ve_devices); Even without your fix, I could configure it as a module and the rmmod, insmod are working fine. (no crash) Regards, Naveen --- Original Message --- Sender : Sebastian Andrzej Siewior Date : Jul 19, 2013 23:44 (GMT+05:30) Title : [PATCH] of: provide of_platform

Re: [PATCH] of: provide of_platform_unpopulate()

2013-07-19 Thread NAVEEN KRISHNA CHATRADHI
Hello Sebastian, --- Original Message --- Sender : Sebastian Andrzej Siewior Date : Jul 19, 2013 23:44 (GMT+05:30) Title : [PATCH] of: provide of_platform_unpopulate() So I called of_platform_populate() on a device to get each child device probed and on rmmod and I need to reverse

[PATCH] of: provide of_platform_unpopulate()

2013-07-19 Thread Sebastian Andrzej Siewior
So I called of_platform_populate() on a device to get each child device probed and on rmmod and I need to reverse its doing. After a quick grep I did what others did as well and rmmod ended in: | Unable to handle kernel NULL pointer dereference at virtual address 0018 | PC is at release_resour