| #
3cf48410 |
| 13-Jan-2020 |
Patrick Delaunay <patrick.delaunay@st.com> |
BACKPORT: dm: core: add ofnode and dev function to iterate on node property
Add functions to iterate on all property with livetree - dev_read_first_prop - dev_read_next_prop - dev_read_prop_by_prop
BACKPORT: dm: core: add ofnode and dev function to iterate on node property
Add functions to iterate on all property with livetree - dev_read_first_prop - dev_read_next_prop - dev_read_prop_by_prop and - ofnode_get_first_property - ofnode_get_next_property - ofnode_get_property_by_prop
And helper: dev_for_each_property
For example: struct ofprop property;
dev_for_each_property(property, config) { value = dev_read_prop_by_prop(&property, &propname, &len);
or:
for (res = ofnode_get_first_property(node, &property); !res; res = ofnode_get_next_property(&property)) { value = ofnode_get_property_by_prop(&property, &propname, &len); .... }
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Simon Glass <sjg@chromium.org> Change-Id: Idb339daab9dd50fc8e08c38d7de33b5238a69578 (cherry picked from commit ce891fcada6638c39a0de28f821cfa2b9406440c)
show more ...
|
| #
a9bd1c73 |
| 15-Jan-2018 |
Mario Six <mario.six@gdsys.cc> |
UPSTREAM: core: Add {ofnode, dev}_translate_address functions
Change-Id: I7f33518fbc84db70c28d4d634acbb370cb9bd886 Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Mario Six <mario.six@gds
UPSTREAM: core: Add {ofnode, dev}_translate_address functions
Change-Id: I7f33518fbc84db70c28d4d634acbb370cb9bd886 Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Mario Six <mario.six@gdsys.cc> Signed-off-by: Joseph Chen <chenjh@rock-chips.com> (cherry picked from commit 147c6074482ed57fe43348ce15fc3dbc3e2c9db7)
show more ...
|
| #
6a1649e2 |
| 06-Aug-2020 |
Joseph Chen <chenjh@rock-chips.com> |
core: node: remove unused API
Signed-off-by: Joseph Chen <chenjh@rock-chips.com> Change-Id: I797cb2f594865ab9310651183bf98b8112fe429e
|
| #
e1e9b173 |
| 28-Mar-2020 |
Joseph Chen <chenjh@rock-chips.com> |
Merge branch 'next-dev' into thunder-boot
|
| #
05e0f98e |
| 07-Jan-2020 |
Joseph Chen <chenjh@rock-chips.com> |
driver: core: add dev_del_prop() api
Signed-off-by: Joseph Chen <chenjh@rock-chips.com> Change-Id: Id016f2f3e2d4d80a7dbd72d02a038c07b3a0de26
|
| #
04539b46 |
| 03-Jun-2019 |
Joseph Chen <chenjh@rock-chips.com> |
dm: core: add function dev_write_u32_array() to write u32 array values
Change-Id: I6633395c7704eefff59c2145562fe239e21f3b35 Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
|
| #
0e00a84c |
| 04-Mar-2018 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
UPSTREAM: libfdt: move headers to <linux/libfdt.h> and <linux/libfdt_env.h>
Thomas reported U-Boot failed to build host tools if libfdt-devel package is installed because tools include libfdt header
UPSTREAM: libfdt: move headers to <linux/libfdt.h> and <linux/libfdt_env.h>
Thomas reported U-Boot failed to build host tools if libfdt-devel package is installed because tools include libfdt headers from /usr/include/ instead of using internal ones.
This commit moves the header code: include/libfdt.h -> include/linux/libfdt.h include/libfdt_env.h -> include/linux/libfdt_env.h
and replaces include directives: #include <libfdt.h> -> #include <linux/libfdt.h> #include <libfdt_env.h> -> #include <linux/libfdt_env.h>
Change-Id: I6c0f7e50e8b571106627f25ddac008a62bd2994e Reported-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
show more ...
|
| #
d59cf5ae |
| 24-Oct-2018 |
Joseph Chen <chenjh@rock-chips.com> |
dm: of_access: add ofnode_read_u64() support
only support of-live.
Change-Id: I37c10efa30ef46369f4a4ad7f16c4c758d6ad563 Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
|
| #
e7ca7e39 |
| 23-Feb-2018 |
Philipp Tomsich <philipp.tomsich@theobroma-systems.com> |
UPSTREAM: core: ofnode: add ofnode_get_parent function
The Rockchip video drivers need to walk the ofnode-parrents to find an enclosing device that has a UCLASS_DISPLAY driver bound. This adds a of
UPSTREAM: core: ofnode: add ofnode_get_parent function
The Rockchip video drivers need to walk the ofnode-parrents to find an enclosing device that has a UCLASS_DISPLAY driver bound. This adds a ofnode_get_parent()-function that returns the parent-node.
Change-Id: I312236c966348aaa36ffc30e3f7dbc83d706fb36 Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Tested-by: Klaus Goger <klaus.goger@theobroma-systems.com> Reviewed-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com> (cherry picked from commit e2d5997ffdf5cbf4f7d53584dab2ffc673f50987)
show more ...
|
| #
df5ceb01 |
| 08-Feb-2018 |
Kever Yang <kever.yang@rock-chips.com> |
core: add ofnode_get_by_phandle() api
We need to get ofnode from a phandle, add interface to support both live dt and fdt.
Change-Id: I01a5241e2eced37b68ab6556cc1b16001eecbe0f Signed-off-by: Kever
core: add ofnode_get_by_phandle() api
We need to get ofnode from a phandle, add interface to support both live dt and fdt.
Change-Id: I01a5241e2eced37b68ab6556cc1b16001eecbe0f Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
show more ...
|
| #
a49612a6 |
| 06-Feb-2018 |
Kever Yang <kever.yang@rock-chips.com> |
core: do not assert if node not valid in ofnode_get_name()
In some case with LIVE DT, some node always not valid.
Change-Id: I20ebc530f7addfef167dd5abbab46e8da0627dd8 Signed-off-by: Kever Yang <kev
core: do not assert if node not valid in ofnode_get_name()
In some case with LIVE DT, some node always not valid.
Change-Id: I20ebc530f7addfef167dd5abbab46e8da0627dd8 Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
show more ...
|
| #
1b189a92 |
| 20-Sep-2017 |
Klaus Goger <klaus.goger@theobroma-systems.com> |
UPSTREAM: dm: ofnode: query correct property in livetree ofnode_get_addr_size
The livetree codepath of ofnode_get_addr_size always used the "reg" property for of_get_property. Use the property param
UPSTREAM: dm: ofnode: query correct property in livetree ofnode_get_addr_size
The livetree codepath of ofnode_get_addr_size always used the "reg" property for of_get_property. Use the property parameter of the function call instead and check the return value if the property exists. Otherwise return FDT_ADDR_T_NONE.
This was discoverd while using SPI NOR with livetree. spi_flash_decode_fdt checks for memory-map and will not fail with livetree even if the property does not exist.
Change-Id: Icc63d2edbccea6a9f17cdcb5818993d317736ede Signed-off-by: Klaus Goger <klaus.goger@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Kever Yang <kever.yang@rock-chips.com> (cherry picked from commit 68a345294ac74505f17d65b003a7de836b3d9cba)
show more ...
|
| #
17c82fdc |
| 05-Aug-2017 |
Simon Glass <sjg@chromium.org> |
UPSTREAM: dm: core: Add ofnode_for_each_subnode()
Add a convenience macro to iterate over subnodes of a node. Make use of this where appropriate in the code.
Change-Id: Iae0fb554472d0b5819d26becbbc
UPSTREAM: dm: core: Add ofnode_for_each_subnode()
Add a convenience macro to iterate over subnodes of a node. Make use of this where appropriate in the code.
Change-Id: Iae0fb554472d0b5819d26becbbcf8909ff891514 Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Kever Yang <kever.yang@rock-chips.com> (cherry picked from commit 3991f42ed2e38aff28ba3c24369bfbd90620bea7)
show more ...
|
| #
e4adc8ed |
| 01-Sep-2017 |
Tom Rini <trini@konsulko.com> |
Merge git://git.denx.de/u-boot-uniphier
- add {ofnode,dev}_read_resource_byname - provide DT probe hook to Denali NAND driver - update clk/reset driver - update DT - misc cleanups
|
| #
7b8b47bd |
| 25-Aug-2017 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
ofnode: add {ofnode, dev}_read_resource_byname()
Linux supports platform_get_resource_byname() to look up a resource by name.
We want a similar helper. It is useful when a device node has named re
ofnode: add {ofnode, dev}_read_resource_byname()
Linux supports platform_get_resource_byname() to look up a resource by name.
We want a similar helper. It is useful when a device node has named register regions.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
211aaf30 |
| 29-Jul-2017 |
Tom Rini <trini@konsulko.com> |
Merge git://git.denx.de/u-boot-usb
|
| #
642346ae |
| 18-Jul-2017 |
Patrice Chotard <patrice.chotard@st.com> |
dm: core: add ofnode_count_phandle_with_args()
This function is usefull to get phandle number contained in a property list. For example, this allows to allocate the right amount of memory to keep c
dm: core: add ofnode_count_phandle_with_args()
This function is usefull to get phandle number contained in a property list. For example, this allows to allocate the right amount of memory to keep clock's reference contained into the "clocks" property.
To implement it, either of_count_phandle_with_args() or fdtdec_parse_phandle_with_args() are used respectively for live tree and flat tree. By passing index = -1, these 2 functions returns the number of phandle contained into the property list.
Add also the dev_count_phandle_with_args() based on ofnode_count_phandle_with_args()
Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
0f6507a7 |
| 25-Jul-2017 |
Simon Glass <sjg@chromium.org> |
dm: core: Fix up ofnode_get_addr_index() for 64-bit values
At present this function only supports 32-bit (single-cell) values. Update it to support two-cell values also.
Signed-off-by: Simon Glass
dm: core: Fix up ofnode_get_addr_index() for 64-bit values
At present this function only supports 32-bit (single-cell) values. Update it to support two-cell values also.
Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Tested-on: Beaver, Jetson-TK1 Tested-by: Stephen Warren <swarren@nvidia.com>
show more ...
|
| #
dcf98852 |
| 25-Jul-2017 |
Simon Glass <sjg@chromium.org> |
dm: core: Add ofnode_read_resource()
We sometimes need to read a resource from an arbitrary node. In any case for consistency we should not put the live-tree switching code in a dev_read_...() funct
dm: core: Add ofnode_read_resource()
We sometimes need to read a resource from an arbitrary node. In any case for consistency we should not put the live-tree switching code in a dev_read_...() function. Update this to suit.
Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Tested-on: Beaver, Jetson-TK1 Tested-by: Stephen Warren <swarren@nvidia.com>
show more ...
|
| #
8d3a2568 |
| 12-Jul-2017 |
Tom Rini <trini@konsulko.com> |
Merge git://git.denx.de/u-boot-dm
|
| #
8c9eaada |
| 22-Jun-2017 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
dm: ofnode: use fdt32_t for DT property value to fix sparse warning
DTB is encoded in big endian. When we retrieve property values, we need to use fdt32_to_cpu (aka be32_to_cpu) for endian conversi
dm: ofnode: use fdt32_t for DT property value to fix sparse warning
DTB is encoded in big endian. When we retrieve property values, we need to use fdt32_to_cpu (aka be32_to_cpu) for endian conversion. This is a bit error-prone, but sparse is useful to detect endian mismatch.
We need to use (fdt32_t *) instead of (u32 *) for a pointer of a property value. Otherwise sparse warns "cast to restricted __be32".
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
b2ec7ea7 |
| 22-Jun-2017 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
dm: ofnode: simplify ofnode_read_bool()
Reuse ofnode_get_property() to simplify the implementation.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Simon Glass <sjg@chromiu
dm: ofnode: simplify ofnode_read_bool()
Reuse ofnode_get_property() to simplify the implementation.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
61e51bab |
| 22-Jun-2017 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
dm: ofnode: rename ofnode_read_prop() to ofnode_get_property()
This function returns the pointer to the value of a node property. The current name ofnode_read_prop() is confusing. Follow the naming
dm: ofnode: rename ofnode_read_prop() to ofnode_get_property()
This function returns the pointer to the value of a node property. The current name ofnode_read_prop() is confusing. Follow the naming of_get_property() from Linux.
The return type (const u32 *) is wrong. DT property values can be strings as well as integers. This is why of_get_property/fdt_getprop returns an opaque pointer.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
cb7dbe1f |
| 22-Jun-2017 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
dm: ofnode: simplify ofnode_read_prop()
The code inside the if-block is the same as of_get_property().
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Simon Glass <sjg@chro
dm: ofnode: simplify ofnode_read_prop()
The code inside the if-block is the same as of_get_property().
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
252510ac |
| 22-Jun-2017 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
dm: ofnode: use ofnode_read_bool() to check property existence
This will clarify the code.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Simon Glass <sjg@chromium.org>
|