History log of /rk3399_rockchip-uboot/drivers/core/of_access.c (Results 1 – 20 of 20)
Revision Date Author Comments
# 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 ...


# d9da4b44 08-Oct-2021 Joseph Chen <chenjh@rock-chips.com>

dm: core: add kernel dtb version 2 mechanism support

The V2 mechanism:
- both of U-Boot and kernel's *ALL* devices are exist in dm tree.
- put the necessary U-Boot devices in the head of device

dm: core: add kernel dtb version 2 mechanism support

The V2 mechanism:
- both of U-Boot and kernel's *ALL* devices are exist in dm tree.
- put the necessary U-Boot devices in the head of device uclass list.
- the both existence policy don't require phandle fixup any more.
- it is for the next generation(rk3588 ...) or necessary platforms.
- traverse u-boot fdt phandle if not found in kernel fdt, because
the U-Boot framework gets phandle by of_root(from fdt) but not dm_root(from dm).
The V1 mechanism(legacy):
- U-Boot: only some necessary U-Boot devices(storage, crypto...) in dm tree.
- kernel: all the devices(except the U-Boot only) in dm tree.

The commit (bd3ad955a3 scripts/dtc: phandle index start from 0x1000000) is
necessary for this v2 mechanism.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I0964f176a17725f9bb7c4e491373c278ed2bfcc5

show more ...


# 33273e09 02-Mar-2021 Joseph Chen <chenjh@rock-chips.com>

driver: core: reject all mmc device from kernel

- we always follow the rule: use mmc device from U-Boot;
- avoid alias id on defferent device between U-Boot and kernel,
which the U-Boot is not abl

driver: core: reject all mmc device from kernel

- we always follow the rule: use mmc device from U-Boot;
- avoid alias id on defferent device between U-Boot and kernel,
which the U-Boot is not able to handle(rescue).

Example issue:

// kernel:
aliases {
mmc0 = "/dwmmc@fe310000";
mmc1 = "/dwmmc@fe320000";
mmc2 = "/sdhci@fe330000";
};

// U-Boot:
aliases {
mmc0 = "/sdhci@fe330000";
mmc1 = "/dwmmc@fe320000";
};

// Log error:
Hit key to stop autoboot('CTRL+C'): 0
Device 'dwmmc@fe310000': seq 0 is in use by 'sdhci@fe330000'
MMC error: The cmd index is 1, ret is -110
Card did not respond to voltage select!
mmc_init: -95, time 51

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I8afede0d304b3e6155766c2aefa2b3b0fd21b068

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


# 1a4f6af8 02-Mar-2020 Joseph Chen <chenjh@rock-chips.com>

Merge branch 'next-dev' into thunder-boot


# 028a3c08 16-Dec-2019 Joseph Chen <chenjh@rock-chips.com>

dm: cmd: add "dm aliases" support

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I46d44a31a6fe82627bde5ff655b125e44add7a8a


# 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 ...


# f935b6dc 06-Dec-2018 Joseph Chen <chenjh@rock-chips.com>

core: of_access: delete exist aliases when adding new one

This new one is from kernel dtb if kernel dtb is enabled.

Change-Id: I6fb54812188fe8749271a7aaae565bc7fa4cb3cc
Signed-off-by: Joseph Chen <

core: of_access: delete exist aliases when adding new one

This new one is from kernel dtb if kernel dtb is enabled.

Change-Id: I6fb54812188fe8749271a7aaae565bc7fa4cb3cc
Signed-off-by: Joseph Chen <chenjh@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>


# 064eb493 09-Oct-2018 Joseph Chen <chenjh@rock-chips.com>

serial: ns16550: support using pre-loader serial

- pass pre-loader serial configure by rk atags;
- it depends on serial aliases to find uart port;
- enabled by CONFIG_ROCKCHIP_USING_PRELOADER_SERIAL

serial: ns16550: support using pre-loader serial

- pass pre-loader serial configure by rk atags;
- it depends on serial aliases to find uart port;
- enabled by CONFIG_ROCKCHIP_USING_PRELOADER_SERIAL;

Change-Id: I6723cccc5e1f3dac77203b4cc19cdac631f5133b
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>

show more ...


# 2e02c4e2 09-Oct-2018 Joseph Chen <chenjh@rock-chips.com>

dm: of_access: add of_alias_get_dev() and of_alias_dump()

- support get device_node by given stem and alias id;
- dump of alias nodes added in aliases_lookup.

Change-Id: I3ed8bd4692dd3fbbeebe9978

dm: of_access: add of_alias_get_dev() and of_alias_dump()

- support get device_node by given stem and alias id;
- dump of alias nodes added in aliases_lookup.

Change-Id: I3ed8bd4692dd3fbbeebe9978a797a5a2dcf7eb23
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>

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 ...


# 8d3a2568 12-Jul-2017 Tom Rini <trini@konsulko.com>

Merge git://git.denx.de/u-boot-dm


# 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 ...


# 73027a85 07-Jun-2017 Simon Glass <sjg@chromium.org>

dm: core: Supress dead-code warning in __of_get_next_child()

Suppress a warning on next = next->sibling.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Coverity (CID: 163245)
Fixes 644e

dm: core: Supress dead-code warning in __of_get_next_child()

Suppress a warning on next = next->sibling.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Coverity (CID: 163245)
Fixes 644ec0a (dm: core: Add livetree access functions)

show more ...


# 644ec0a9 19-May-2017 Simon Glass <sjg@chromium.org>

dm: core: Add livetree access functions

Add a basic assortment of functions to access the live device tree. These
come from Linux v4.9 and are modified for U-Boot to the minimum extent
possible. Whi

dm: core: Add livetree access functions

Add a basic assortment of functions to access the live device tree. These
come from Linux v4.9 and are modified for U-Boot to the minimum extent
possible. While these functions are now very stable in Linux, it will be
possible to merge in fixes if needed.

Signed-off-by: Simon Glass <sjg@chromium.org>

show more ...