History log of /rk3399_rockchip-uboot/include/dm/read.h (Results 1 – 25 of 25)
Revision Date Author Comments
# 8f7de514 02-Feb-2023 Shawn Lin <shawn.lin@rock-chips.com>

ufs: backport ufs from upstream

Add ufs directory and cover some SCSI interface to fit for current
SCSI model.

Change-Id: I24c13fc494b1596905d9397a551b10f965dcb4dd
Signed-off-by: Shawn Lin <shawn.l

ufs: backport ufs from upstream

Add ufs directory and cover some SCSI interface to fit for current
SCSI model.

Change-Id: I24c13fc494b1596905d9397a551b10f965dcb4dd
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>

show more ...


# 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


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

Merge branch 'next-dev' into thunder-boot


# 270d4d86 21-Nov-2019 Joseph Chen <chenjh@rock-chips.com>

core: read: add dev_read_s32_default()

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


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


# b283d2ae 24-Jan-2018 Kever Yang <kever.yang@rock-chips.com>

core: read: fix some device may not have of node

Some device like syscon, blk do not have of node, return directly.

Change-Id: Icc4629632522f4a3af6532c6a9f2152b0e45de8b
Signed-off-by: Kever Yang <k

core: read: fix some device may not have of node

Some device like syscon, blk do not have of node, return directly.

Change-Id: Icc4629632522f4a3af6532c6a9f2152b0e45de8b
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>

show more ...


# 57a9c706 21-Sep-2017 Jean-Jacques Hiblot <jjhiblot@ti.com>

UPSTREAM: dm: core: Add functions to get strings and the string count from a stringlist

dev_read_string_count() is used to get the number of strings in a
stringlist.
dev_read_string_index() is used

UPSTREAM: dm: core: Add functions to get strings and the string count from a stringlist

dev_read_string_count() is used to get the number of strings in a
stringlist.
dev_read_string_index() is used to get a string in the stringlist based on
its position in the list.

Change-Id: I0e144e7c2048030a9b43ca6153225f6267d58c89
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit b5a144a5014be5e3b065e2061a7d17e653d739ae)

show more ...


# 18a0c4a6 11-Sep-2017 Philipp Tomsich <philipp.tomsich@theobroma-systems.com>

UPSTREAM: dm: core: add dev_read_addr_ptr()

The dev_read_addr_ptr() mimics the behaviour of the devfdt_get_addr_ptr(),
retrieving the first address of the node's reg-property and returning
it as a p

UPSTREAM: dm: core: add dev_read_addr_ptr()

The dev_read_addr_ptr() mimics the behaviour of the devfdt_get_addr_ptr(),
retrieving the first address of the node's reg-property and returning
it as a pointer (or NULL on failure).

Change-Id: Iaac920b89296fd53504b071e7617f24ac6dd2fc8
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Acked-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 c131c8bca86b428daef7a25c26a96af42658be21)

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


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


# fd73621c 17-Jul-2017 Masahiro Yamada <yamada.masahiro@socionext.com>

dm: ofnode: change return type of dev_read_prop() to opaque pointer

DT property values can be strings as well as integers. This is why
of_get_property/fdt_getprop returns an opaque pointer.

Signed

dm: ofnode: change return type of dev_read_prop() to opaque pointer

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


# 8d3a2568 12-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 ...


# f7d6fcf7 12-Jun-2017 Simon Glass <sjg@chromium.org>

dm: core: Add dev_read_enabled() to check if a device is enabled

This function allows a device's status to be read. This indicates whether
the device should be enabled or disabled.

Note: In normal

dm: core: Add dev_read_enabled() to check if a device is enabled

This function allows a device's status to be read. This indicates whether
the device should be enabled or disabled.

Note: In normal operation disabled devices will not be present in the
driver-model tree.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Tested-on: Beaver, Jetson-TK1

show more ...


# a4481012 12-Jun-2017 Simon Glass <sjg@chromium.org>

dm: core: Add dev_read_resource() to read device resources

Add a function which reads resources from a device, such as the device
hardware address. This uses the "reg" property in the device.

Unlik

dm: core: Add dev_read_resource() to read device resources

Add a function which reads resources from a device, such as the device
hardware address. This uses the "reg" property in the device.

Unlike other functions there is little sense in inlining this when
livetree is not being used because it has some logic in it and this would
just bloat the code size.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Tested-on: Beaver, Jetson-TK1

show more ...


# 47a0fd3b 19-May-2017 Simon Glass <sjg@chromium.org>

dm: core: Implement live tree 'read' functions

When the live tree is supported some functions need to change a little.
Add an implementation which is used when not inlining these functions.

Signed-

dm: core: Implement live tree 'read' functions

When the live tree is supported some functions need to change a little.
Add an implementation which is used when not inlining these functions.

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

show more ...


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

dm: core: Add device-based 'read' functions to access DT

It is common to read a device-tree property from the node associated with
a device. Add convenience functions to do this so that drivers do n

dm: core: Add device-based 'read' functions to access DT

It is common to read a device-tree property from the node associated with
a device. Add convenience functions to do this so that drivers do not need
to deal with accessing the ofnode from the device.

These functions all start with 'dev_read_' to provide consistent naming
for all functions which read information from a device's device tree node.

These are inlined when using the flat DT to save code size. The live tree
implementation is added in a later commit.

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

show more ...