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

2013-05-27 Thread David Miller
From: Sebastian Hesselbarth sebastian.hesselba...@gmail.com 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

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

2013-05-27 Thread Benjamin Herrenschmidt
to store it early. (a) DT property local-mac-address looked as a good place as it will allow the driver to find it without any extra code. Of course, I am doing severaly sanity checks if it is safe to overwrite it, i.e. no other MAC set, property is there, long enough. If Grant also NACKs

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. ___ Linuxppc-dev mailing list

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

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

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

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

2013-05-27 Thread David Miller
From: Benjamin Herrenschmidt b...@kernel.crashing.org 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

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 the new

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 David Miller
From: Benjamin Herrenschmidt b...@kernel.crashing.org 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

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 b...@kernel.crashing.org 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

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

2013-05-26 Thread Sebastian Hesselbarth
property local-mac-address looked as a good place as it will allow the driver to find it without any extra code. Of course, I am doing severaly sanity checks if it is safe to overwrite it, i.e. no other MAC set, property is there, long enough. If Grant also NACKs modifying the DT we basically have two

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

2013-05-25 Thread David Miller
From: Sebastian Hesselbarth sebastian.hesselba...@gmail.com 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

[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

Mac address in the DT

2012-01-10 Thread smitha.vanga
Hi, The fdt_fixup_ethernet() is not supported in the older version of u-boot. So how to go about it in u-boot 1.3.0 version. Regards, Smitha Please do not print this email unless it is absolutely necessary. The information contained in this electronic message and any attachments to this

Re: Mac address in the DT

2012-01-10 Thread Joakim Tjernlund
smitha.va...@wipro.com wrote on 2012/01/10 10:37:14: Hi, The fdt_fixup_ethernet() is not supported in the older version of u-boot. So how to go about it in u-boot 1.3.0 version. Upgrade or find out how its done in your older version, I have no idea.

Re: Mac address in the DT

2012-01-10 Thread Wolfgang Denk
Dear smitha.va...@wipro.com, In message 40631e9a2581f14ba60888c87a76a1fe01d...@hyd-mkd-mbx4.wipro.com you wrote: The fdt_fixup_ethernet() is not supported in the older version of u-boot. So how to go about it in u-boot 1.3.0 version. U-Boot v1.3.0 is more than 4 years old. Update, or

RE: Mac address in the DT

2012-01-10 Thread smitha.vanga
Hi, I am using 2.6.21 linux kernel with this bootloader. The ethernet driver in the kernel reads the mac address from the .dtb file. Regards, Smitha Please do not print this email unless it is absolutely necessary. The information contained in this electronic message and any attachments to

Mac address in the DT

2012-01-09 Thread smitha.vanga
Hi Wolfgang, I need to automate a sequence of commands. To do that I am setting a environment variable with the sequence of commands. And using run command run the environment variable. But one of the command uses in the command. So how do I save the command with quotes. Below is the

Re: Mac address in the DT

2012-01-09 Thread Joakim Tjernlund
Hi Wolfgang, I need to automate a sequence of commands. To do that I am setting a environment variable with the sequence of commands. And using run command run the environment variable. But one of the command uses in the command. So how do I save the command with quotes. Below is the

RE: Mac address in the DT

2012-01-09 Thread smitha.vanga
Hi Joakim, I have tried it but it doesn't work. Just now found that with single ' quotes the entire sequence it works. Setenv set_mac 'cp 0xffec 0x10 1024;fdt addr 0xc0 8192;fdt set /soc8272@f000/ethernet@24000 mac-address [00 44 00 55 00 66];erase 0xffec 0xffec4000;cp

RE: Mac address in the DT

2012-01-09 Thread Joakim Tjernlund
smitha.va...@wipro.com wrote on 2012/01/09 15:28:54: Hi Joakim, I have tried it but it doesn't work. Just now found that with single ' quotes the entire sequence it works. Setenv set_mac 'cp 0xffec 0x10 1024;fdt addr 0xc0 8192;fdt set /soc8272@f000/ethernet@24000

Re: Mac address in the DT

2012-01-09 Thread Wolfgang Denk
Dear smitha.va...@wipro.com, In message 40631e9a2581f14ba60888c87a76a1fe01d...@hyd-mkd-mbx4.wipro.com you wrote: Setenv set_mac 'cp 0xffec 0x10 1024;fdt addr 0xc0 8192;fdt set= /soc8272@f000/ethernet@24000 mac-address [00 44 00 55 00 66];erase 0x= ffec 0xffec4000;cp