- 29 4月, 2021 1 次提交
-
-
由 Chen Guanqiao 提交于
Add functions to add size of addresses in the device tree using ofnode references. If the size is not set, return FDT_SIZE_T_NONE. Signed-off-by: NChen Guanqiao <chenguanqiao@kuaishou.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
- 18 2月, 2021 1 次提交
-
-
由 Nicolas Saenz Julienne 提交于
Add the following functions to get a specific device's DMA ranges: - dev_get_dma_range() - ofnode_get_dma_range() - of_get_dma_range() - fdt_get_dma_range() They are specially useful in oder to be able validate a physical address space range into a bus's and to convert addresses from and to address spaces. Signed-off-by: NNicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: NSimon Glass <sjg@chromium.org> Tested-by: NPeter Robinson <pbrobinson@gmail.com> Signed-off-by: NMatthias Brugger <mbrugger@suse.com>
-
- 03 2月, 2021 1 次提交
-
-
由 Simon Glass 提交于
Move this out of the common header and include it only where needed. In a number of cases this requires adding "struct udevice;" to avoid adding another large header or in other cases replacing / adding missing header files that had been pulled in, very indirectly. Finally, we have a few cases where we did not need to include <asm/global_data.h> at all, so remove that include. Signed-off-by: NSimon Glass <sjg@chromium.org> Signed-off-by: NTom Rini <trini@konsulko.com>
-
- 23 12月, 2020 1 次提交
-
-
由 Simon Glass 提交于
A recent change to unify the flattree/livetree code introduced a small size increase in SPL on some boards. For example SPL code size for px30-core-ctouch2-px30 increased by 40 bytes. To address this we can take advantage of the fact that some of the ofnode functions are only called a few times in SPL, so it is worth inlining them. Add new Kconfig options to control this. These functions are not inlined for U-Boot proper, since this increases code size. Fixes: 2ebea5ea ("dm: core: Combine the flattree and livetree binding code") Signed-off-by: NSimon Glass <sjg@chromium.org>
-
- 13 12月, 2020 2 次提交
-
-
由 Simon Glass 提交于
This is needed in at least one place. Avoid the conditional code in root.c by adding this inline function. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
Add a way to find out if a node is enabled or not, based on its 'status' property. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
- 27 10月, 2020 1 次提交
-
-
由 Michal Simek 提交于
Add support for getting a node/property from aliases. The similar functionality is provided for chosen node and this implemenatation is copy of it. Signed-off-by: NMichal Simek <michal.simek@xilinx.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
- 06 10月, 2020 3 次提交
-
-
由 Patrick Delaunay 提交于
The cell_count argument is required when cells_name is NULL. This patch adds this parameter in live tree API - of_count_phandle_with_args - ofnode_count_phandle_with_args - dev_count_phandle_with_args This parameter solves issue when these API is used to count the number of element of a cell without cell name. This parameter allow to force the size cell. For example: count = dev_count_phandle_with_args(dev, "array", NULL, 3); Signed-off-by: NPatrick Delaunay <patrick.delaunay@st.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Patrick Delaunay 提交于
Update the test for node.of_offset because an invalid offset is not always set to -1 because the return value of the libfdt functions are: + an error with a value < 0 + a valid offset with value >=0 For example, in ofnode_get_by_phandle() function, we have: node.of_offset = fdt_node_offset_by_phandle(gd->fdt_blob, phandle); and this function can return -FDT_ERR_BADPHANDLE (-6). Without this patch, the added test dm_test_ofnode_get_by_phandle failed. Signed-off-by: NPatrick Delaunay <patrick.delaunay@st.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Stefan Roese 提交于
Include missing log.h and change _ofnode_to_np() to ofnode_to_np() so that compiling with OF_CHECKS enabled does not break. Signed-off-by: NStefan Roese <sr@denx.de> Cc: Simon Glass <sjg@chromium.org> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
- 29 7月, 2020 1 次提交
-
-
由 Heinrich Schuchardt 提交于
"future live tree" does not make sense anymore as we have CONFIG_OF_LIVE. Signed-off-by: NHeinrich Schuchardt <xypron.glpk@gmx.de>
-
- 02 5月, 2020 1 次提交
-
-
由 Chunfeng Yun 提交于
This patch add function used to get the child count of a ofnode or a device Signed-off-by: NChunfeng Yun <chunfeng.yun@mediatek.com> Signed-off-by: NFrank Wunderlich <frank-w@public-files.de> Reviewed-by: NWeijie Gao <weijie.gao@mediatek.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
- 17 4月, 2020 1 次提交
-
-
由 Patrick Delaunay 提交于
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: NPatrick Delaunay <patrick.delaunay@st.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
- 16 4月, 2020 1 次提交
-
-
由 Dario Binacchi 提交于
The patch adds helper functions to allow reading a single indexed u32 value from a device-tree property containing multiple u32 values, that is an array of integers. Signed-off-by: NDario Binacchi <dariobin@libero.it> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
- 06 2月, 2020 4 次提交
-
-
由 Simon Glass 提交于
Add a function to read a property from the chosen node, providing access to its length. Update ofnode_get_chosen_string() to make use of it. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
Add a new function to read a property that supports reading the length as well. Reimplement ofnode_read_string() using it and fix its comment. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
This function is actually intended to read a string rather than a property. All of its current callers use it that way. Also there is no way to return the length of the property from this function. Rename it to better indicate its purpose, using ofnode_read as the prefix since this matches most other functions. Also add some tests which are missing for these functions. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
The current comment is a big vague and misleading. Rewrite it to state precisely what the function does. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
- 15 12月, 2019 1 次提交
-
-
由 Simon Glass 提交于
If the offset is -1 this function correctly sets up a null ofnode. But if the offset is any other negative number (e.g. -FDT_ERR_BADPATH) then it does the wrong thing. An offset of -1 in ofnode indicates that the ofnode is not valid. Any other negative value is not handled by ofnode_valid(). We could of course change that function, but it seems much better to always use the same value for an invalid node. Fix it by setting the offset to -1 if it is invalid for any reason. Signed-off-by: NSimon Glass <sjg@chromium.org> Reviewed-by: NBin Meng <bmeng.cn@gmail.com>
-
- 06 9月, 2019 1 次提交
-
-
由 T Karthik Reddy 提交于
This patch adds functions dev_read_u64_default & dev_read_u64 to read unsigned 64-bit values from devicetree. Signed-off-by: NT Karthik Reddy <t.karthik.reddy@xilinx.com> Signed-off-by: NMichal Simek <michal.simek@xilinx.com> Reviewed-by: NBin Meng <bmeng.cn@gmail.com>
-
- 22 7月, 2019 1 次提交
-
-
由 Fabien Dessenne 提交于
Add the following functions to translate DMA address to CPU address: - dev_translate_dma_address() - ofnode_translate_dma_address() - of_translate_dma_address() - fdt_translate_dma_address() These functions work the same way as xxx_translate_address(), with the difference that the translation relies on the "dma-ranges" property instead of the "ranges" property. Add related test. Test report: => ut dm fdt_translation Test: dm_test_fdt_translation: test-fdt.c Test: dm_test_fdt_translation: test-fdt.c (flat tree) Failures: 0 Signed-off-by: NFabien Dessenne <fabien.dessenne@st.com>
-
- 11 7月, 2019 1 次提交
-
-
由 Patrick Delaunay 提交于
Add documentation for the pre-reloc property in SPL and TPL device-tree: - u-boot,dm-pre-proper - u-boot,dm-pre-reloc - u-boot,dm-spl - u-boot,dm-tpl Signed-off-by: NPatrick Delaunay <patrick.delaunay@st.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
- 22 5月, 2019 2 次提交
-
-
由 Trent Piepho 提交于
It was returning an int, which doesn't work if the u32 it is reading, or the default value, will overflow a signed int. While it could be made to work, when using a C standard/compiler where casting negative signed values to unsigned has a defined behavior, combined with careful casting, it seems obvious one is meant to use ofnode_read_s32_default() with signed values. Cc: Simon Glass <sjg@chromium.org> Signed-off-by: NTrent Piepho <tpiepho@impinj.com>
-
由 Keerthy 提交于
Add ofnode_get_addr_size_index function to fetch the address and size of the reg space based on index. Signed-off-by: NKeerthy <j-keerthy@ti.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
- 30 11月, 2018 1 次提交
-
-
由 Baruch Siach 提交于
Signed-off-by: NBaruch Siach <baruch@tkos.co.il>
-
- 26 11月, 2018 1 次提交
-
-
由 Lukas Auer 提交于
Signed-off-by: NLukas Auer <lukas.auer@aisec.fraunhofer.de> Reviewed-by: NBin Meng <bmeng.cn@gmail.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
- 30 9月, 2018 1 次提交
-
-
由 Mario Six 提交于
Implement a set of functions to manipulate properties in a live device tree: * ofnode_write_prop() to set generic properties of a node * ofnode_write_string() to set string properties of a node * ofnode_set_enabled() to either enable or disable a node Signed-off-by: NMario Six <mario.six@gdsys.cc> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
- 18 9月, 2018 1 次提交
-
-
由 Jens Wiklander 提交于
Adds ofnode_by_prop_value() to search for nodes with a given property and value, an ofnode version of fdt_node_offset_by_prop_value(). Signed-off-by: NJens Wiklander <jens.wiklander@linaro.org> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
- 08 8月, 2018 1 次提交
-
-
由 Bin Meng 提交于
We don't have the live-tree version of fdtdec_get_pci_vendev(). This adds the API. Signed-off-by: NBin Meng <bmeng.cn@gmail.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
- 09 7月, 2018 4 次提交
-
-
由 Simon Glass 提交于
Add an ofnode_by_compatible() to allow iterating through ofnodes with a given compatible string. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
These functions are missing comments. Add some. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
Tidy up three return-value errors. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
We have a 32-bit version of this function. Add a 64-bit version as well so we can easily read 64-bit ints from the device tree. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
- 08 5月, 2018 1 次提交
-
-
由 Masahiro Yamada 提交于
device_is_compatible() takes udevice, but there is no such a helper that takes ofnode. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
- 07 5月, 2018 1 次提交
-
-
由 Tom Rini 提交于
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: NTom Rini <trini@konsulko.com>
-
- 24 2月, 2018 2 次提交
-
-
由 Kever Yang 提交于
We need to get ofnode from a phandle, add interface to support both live dt and fdt. Signed-off-by: NKever Yang <kever.yang@rock-chips.com> Reviewed-by: NSimon Glass <sjg@chromium.org> Reviewed-by: NPhilipp Tomsich <philipp.tomsich@theobroma-systems.com> Tested-by: NKlaus Goger <klaus.goger@theobroma-systems.com> Signed-off-by: NPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>
-
由 Philipp Tomsich 提交于
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. Signed-off-by: NPhilipp Tomsich <philipp.tomsich@theobroma-systems.com> Tested-by: NKlaus Goger <klaus.goger@theobroma-systems.com> Reviewed-by: NAnatolij Gustschin <agust@denx.de>
-
- 22 1月, 2018 1 次提交
-
-
由 Mario Six 提交于
Reviewed-by: NSimon Glass <sjg@chromium.org> Signed-off-by: NMario Six <mario.six@gdsys.cc>
-
- 17 11月, 2017 1 次提交
-
-
由 Baruch Siach 提交于
Fixes: 4984de2b ("dm: core: Add ofnode to represent device tree nodes") Cc: Simon Glass <sjg@chromium.org> Signed-off-by: NBaruch Siach <baruch@tkos.co.il> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
- 12 9月, 2017 1 次提交
-
-
由 Simon Glass 提交于
Add a convenience macro to iterate over subnodes of a node. Make use of this where appropriate in the code. Signed-off-by: NSimon Glass <sjg@chromium.org>
-