OF: base: import of_property_read_* helpers from Linux OF API

This imports of_property_read_* helpers from Linux OF API to allow
to read all kinds of properties.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
OF: base: import of_parse_phandle from Linux OF API

This imports of_parse_phandle from Linux OF API.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
OF: base: import parse phandle functions from Linux OF API

This imports of_parse_phandle_with_args and of_count_phandle_with_args
from Linux OF API. The slightly different of_parse_phandles_with_args
is removed and all users are converted to reflect the API change.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
OF: base: also update property length on of_property_write_u32

Current implementation of of_property_write_u32 does free old property
values and allocates new values depending on the size passed. While
copying the new values to the property, corresponding length is not
set. This makes of_property_write_u32 set the length of the new property
values and also adds a API header describing the function.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
OF: base: introduce property write for bool, u8, u16, and u64

This adds functions to set an array of or a single value for bool,
u8, u16, and u64 properties.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>