Searched hist:"9620 d87259572ef21f0df60988d9a932ca673779" (Results 1 – 1 of 1) sorted by relevance
| /rk3399_rockchip-uboot/cmd/ |
| H A D | fdt.c | cee8c35d1b7101d09a1854a48f867deaa701f7bf Fri Aug 18 12:41:14 UTC 2017 Hannes Schmelzer <oe5hpm@oevsv.at> fdt: fix 'prop (...) not found!' error in 'fdt set' command
This commit brings things back to the well known working state of the command. - With commit 9620d87259572ef21f0df60988d9a932ca673779 (cmd/fdt: support single value replacement within an array)
there was an error introduced modifying (inserting) a property to a device-tree node. fdt_getprop(...) returnes a len with -1 for a non-existing property, but a memcpy with len -1 isn't a good idea and things went wrong (crash). - Some times later Tom did repair this with commit 99bb38e2cce9d99238458e0f6d1880c6d2e80a4d (fdt: Check for NULL return from fdt_getprop in 'fdt set')
This repairs the crash but the behaviour of the command isn't like before, it makes it impossible to insert a property. -
Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at> Acked-by: Simon Glass <sjg@chromium.org> 9620d87259572ef21f0df60988d9a932ca673779 Tue May 30 13:05:44 UTC 2017 Hannes Schmelzer <Hannes.Schmelzer@br-automation.com> cmd/fdt: support single value replacement within an array
With this commit we can modify single values within an array of a dts property.
This is useful if we have for example a pwm-backlight where we want to modifiy the pwm frequency per u-boot script.
The pwm is described in dts like this:
backlight { pwms = <0x0000002b 0x00000000 0x004c4b40>; };
For changing the frequency, here the 3rd parameter, we simply type:
fdt set /backlight pwms <? ? 0x1E8480>;
For doing all this we: - backup the property content into our 'SCRATCHPAD' - only modify the array-cell if the new content doesn't start with '?'
Signed-off-by: Hannes Schmelzer <hannes.schmelzer@br-automation.com> Reviewed-by: Simon Glass <sjg@chromium.org>
|