#
3991f42e |
| 05-Aug-2017 |
Simon Glass <sjg@chromium.org> |
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.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
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 ...
|
#
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 |
| 11-Jul-2017 |
Tom Rini <trini@konsulko.com> |
Merge git://git.denx.de/u-boot-dm
|
#
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 ...
|
#
878d68c0 |
| 12-Jun-2017 |
Simon Glass <sjg@chromium.org> |
dm: core: Add functions to obtain node's address/size cells
The of_n_addr_cells() and of_n_size_cells() functions are useful for getting the size of addresses in a node, but in a few places U-Boot n
dm: core: Add functions to obtain node's address/size cells
The of_n_addr_cells() and of_n_size_cells() functions are useful for getting the size of addresses in a node, but in a few places U-Boot needs to obtain the actual property value for a node without walking up the stack. Add functions for this and just the existing code to use it.
Add a comment to the existing ofnode functions which do not do the right thing with a flat tree.
This fixes a problem reading PCI addresses.
Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Tested-on: Beaver, Jetson-TK1
show more ...
|
#
8c293d6a |
| 12-Jun-2017 |
Simon Glass <sjg@chromium.org> |
dm: core: Add ofnode_read_string_count()
This provides a way to find the number of strings in a string list. Add it and also fix up the comment for ofnode_read_string_index().
Signed-off-by: Simon
dm: core: Add ofnode_read_string_count()
This provides a way to find the number of strings in a string list. Add it and also fix up the comment for ofnode_read_string_index().
Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Tested-on: Beaver, Jetson-TK1
show more ...
|
#
bed77496 |
| 18-May-2017 |
Simon Glass <sjg@chromium.org> |
dm: core: Add address operations on device tree references
Add functions to add addresses in the device tree using ofnode references.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
9e512045 |
| 18-May-2017 |
Simon Glass <sjg@chromium.org> |
dm: core: Add operations on device tree references
Since U-Boot supports both a live tree and a flat tree, we need an easy way to access the tree without worrying about which is currently active. To
dm: core: Add operations on device tree references
Since U-Boot supports both a live tree and a flat tree, we need an easy way to access the tree without worrying about which is currently active. To support this, U-Boot has the concept of an ofnode, which can refer either to a live tree node or a flat tree node.
For the live tree, the reference contains a pointer to the node (struct device_node *) or NULL if the node is invalid. For the flat tree, the reference contains the node offset or -1 if the node is invalid.
Add a basic set of operations using ofnodes. These are implemented by using either libfdt functions (in the case of a flat DT reference) or the live-tree of_...() functions.
Note that it is not possible to have both live and flat references active at the same time. As soon as the live tree is available, everything in U-Boot should switch to using that. This avoids confusion and allows us to assume that the type of a reference is simply based on whether we have a live tree yet, or not.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
#
4984de2b |
| 17-May-2017 |
Simon Glass <sjg@chromium.org> |
dm: core: Add ofnode to represent device tree nodes
With live tree we need a struct device_node * to reference a node. With the existing flat tree, we need an int offset. We need to unify these into
dm: core: Add ofnode to represent device tree nodes
With live tree we need a struct device_node * to reference a node. With the existing flat tree, we need an int offset. We need to unify these into a single value which can represent both.
Add an ofnode union for this and adjust existing code to move to this.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|