Re: [PATCH 1/2] ARM: kirkwood: proper retain MAC address workaround on DT ethernet

2013-05-27 Thread David Miller
From: Benjamin Herrenschmidt Date: Tue, 28 May 2013 07:50:06 +1000 > On Mon, 2013-05-27 at 14:47 +0200, Arnd Bergmann wrote: >> On Monday 27 May 2013 21:50:04 Benjamin Herrenschmidt wrote: >> > However, that wouldn't help much with the allocation/leak problem, >> > though at least it would be eas

Re: [PATCH 1/2] ARM: kirkwood: proper retain MAC address workaround on DT ethernet

2013-05-27 Thread Sebastian Hesselbarth
On 05/27/2013 11:50 PM, Benjamin Herrenschmidt wrote: On Mon, 2013-05-27 at 14:47 +0200, Arnd Bergmann wrote: On Monday 27 May 2013 21:50:04 Benjamin Herrenschmidt wrote: However, that wouldn't help much with the allocation/leak problem, though at least it would be easier to use. It could also

Re: [PATCH 1/2] ARM: kirkwood: proper retain MAC address workaround on DT ethernet

2013-05-27 Thread Benjamin Herrenschmidt
On Mon, 2013-05-27 at 13:18 -0700, David Miller wrote: > From: Benjamin Herrenschmidt > Date: Mon, 27 May 2013 21:50:04 +1000 > > > It would be handy to be able to just do something like > > > > of_set_property(node, name, ptr, len); > > > > However, that wouldn't help much with the alloc

Re: [PATCH 1/2] ARM: kirkwood: proper retain MAC address workaround on DT ethernet

2013-05-27 Thread Benjamin Herrenschmidt
On Mon, 2013-05-27 at 14:47 +0200, Arnd Bergmann wrote: > On Monday 27 May 2013 21:50:04 Benjamin Herrenschmidt wrote: > > However, that wouldn't help much with the allocation/leak problem, > > though at least it would be easier to use. It could also *try* to re-use > > the current allocation if th

Re: [PATCH 1/2] ARM: kirkwood: proper retain MAC address workaround on DT ethernet

2013-05-27 Thread David Miller
From: Benjamin Herrenschmidt Date: Mon, 27 May 2013 21:50:04 +1000 > It would be handy to be able to just do something like > > of_set_property(node, name, ptr, len); > > However, that wouldn't help much with the allocation/leak problem, > though at least it would be easier to use. It cou

Re: [PATCH 1/2] ARM: kirkwood: proper retain MAC address workaround on DT ethernet

2013-05-27 Thread Arnd Bergmann
On Monday 27 May 2013 21:50:04 Benjamin Herrenschmidt wrote: > However, that wouldn't help much with the allocation/leak problem, > though at least it would be easier to use. It could also *try* to re-use > the current allocation if the new content is of smaller or equal size. I thought that dtc t

Re: [PATCH 1/2] ARM: kirkwood: proper retain MAC address workaround on DT ethernet

2013-05-27 Thread Benjamin Herrenschmidt
On Mon, 2013-05-27 at 12:24 +0200, Sebastian Hesselbarth wrote: > > There is an of_update_property(), we could change the name though, > yours > > is nicer :-) > > Ben, David, > > I had a quick look at sparc's of_set_property. Nothing special except > it > depends on OF_DYNAMIC at some place. Usi

Re: [PATCH 1/2] ARM: kirkwood: proper retain MAC address workaround on DT ethernet

2013-05-27 Thread Sebastian Hesselbarth
On 05/27/13 11:39, Benjamin Herrenschmidt wrote: On Mon, 2013-05-27 at 02:23 -0700, David Miller wrote: Sparc has an of_set_property(), it needs to become generic. There is an of_update_property(), we could change the name though, yours is nicer :-) Ben, David, I had a quick look at sparc's

Re: [PATCH 1/2] ARM: kirkwood: proper retain MAC address workaround on DT ethernet

2013-05-27 Thread Benjamin Herrenschmidt
On Mon, 2013-05-27 at 02:23 -0700, David Miller wrote: > Sparc has an of_set_property(), it needs to become generic. There is an of_update_property(), we could change the name though, yours is nicer :-) Cheers, Ben. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in t

Re: [PATCH 1/2] ARM: kirkwood: proper retain MAC address workaround on DT ethernet

2013-05-27 Thread Benjamin Herrenschmidt
On Sun, 2013-05-26 at 22:06 +0200, Sebastian Hesselbarth wrote: > good you mention it. I added Grant on Cc and will give a short > sum-up why I casted the const from property->value away here. > > Maybe I overlooked the API for modifying the DT property but as > far as I've seen - there is no API

Re: [PATCH 1/2] ARM: kirkwood: proper retain MAC address workaround on DT ethernet

2013-05-27 Thread David Miller
From: Sebastian Hesselbarth Date: Sun, 26 May 2013 22:06:58 +0200 > good you mention it. I added Grant on Cc and will give a short > sum-up why I casted the const from property->value away here. > > Maybe I overlooked the API for modifying the DT property but as > far as I've seen - there is no

Re: [PATCH 1/2] ARM: kirkwood: proper retain MAC address workaround on DT ethernet

2013-05-26 Thread Sebastian Hesselbarth
On 05/26/2013 06:04 AM, David Miller wrote: From: Sebastian Hesselbarth Date: Wed, 22 May 2013 22:04:01 +0200 + memcpy((void *)p->value, reg, 6); This cast is completely unnecessary, non-void to void pointer casts are automatic. If it is necessary, because p->value is c

Re: [PATCH 1/2] ARM: kirkwood: proper retain MAC address workaround on DT ethernet

2013-05-25 Thread David Miller
From: Sebastian Hesselbarth Date: Wed, 22 May 2013 22:04:01 +0200 > + memcpy((void *)p->value, reg, 6); This cast is completely unnecessary, non-void to void pointer casts are automatic. If it is necessary, because p->value is const, then you are trying to change something b

[PATCH 1/2] ARM: kirkwood: proper retain MAC address workaround on DT ethernet

2013-05-22 Thread Sebastian Hesselbarth
Kirkwood ethernet controllers suffer from loosing MAC register content on gated clocks. In the past this was prevented by not gating the ethernet controller clocks. With DT support for mv643xx_eth and corresponding nodes available, a different approach is more reasonable. This patch replaces the f