History log of /rk3399_rockchip-uboot/include/dm/device.h (Results 1 – 25 of 98)
Revision Date Author Comments
# 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 ...


# 8f1ef3f5 26-Sep-2017 Masahiro Yamada <yamada.masahiro@socionext.com>

UPSTREAM: dm: define dev_*() log functions in DM header

Many drivers had started to use dev_err, dev_info, etc. for log
functions. Currently, we are relying on <linux/compat.h>, but I
guess the bes

UPSTREAM: dm: define dev_*() log functions in DM header

Many drivers had started to use dev_err, dev_info, etc. for log
functions. Currently, we are relying on <linux/compat.h>, but I
guess the best home is <dm/device.h>, taking into account that
Linux defines them in <linux/device.h>.

For now, I am leaving the ones in <linux/compat.h> because lots of
Linux-originated code uses dev_*(), but the first argument is not
struct udevice, so we need to ignore the bogus argument. More
efforts are needed to iron out the issues.

Change-Id: I18f67bd63ac22d8b69bdf8e0558600c58e8703d2
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit c898cba41e94fa87c57d71911fb812cd34c7a91e)

show more ...


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

dm: core: Rename of_device_is_compatible()

The of_ prefix conflicts with the livetree version of this function.
Rename it to avoid problems when we add livetree support.

Signed-off-by: Simon Glass

dm: core: Rename of_device_is_compatible()

The of_ prefix conflicts with the livetree version of this function.
Rename it to avoid problems when we add livetree support.

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


# d6ffb00a 17-May-2017 Simon Glass <sjg@chromium.org>

dm: core: Move dev_get_addr() etc. into a separate file

Move this group of address-related functions into a new file. These use
the flat device tree. Future work will provide new versions of these w

dm: core: Move dev_get_addr() etc. into a separate file

Move this group of address-related functions into a new file. These use
the flat device tree. Future work will provide new versions of these which
can support the live tree.

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

show more ...


# ae1b9399 17-May-2017 Tom Rini <trini@konsulko.com>

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


# 426f99fa 24-Apr-2017 Stefan Roese <sr@denx.de>

dm: core: Add DM_FLAG_OS_PREPARE flag

This new flag can be added to DM device drivers, which need to do some
final configuration before U-Boot exits and the OS (e.g. Linux) is
started. The remove fu

dm: core: Add DM_FLAG_OS_PREPARE flag

This new flag can be added to DM device drivers, which need to do some
final configuration before U-Boot exits and the OS (e.g. Linux) is
started. The remove functions of those drivers will get called at
this stage to do these last-stage configuration steps.

Signed-off-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Cc: Bin Meng <bmeng.cn@gmail.com>

show more ...


# 433647a7 05-Apr-2017 Tom Rini <trini@konsulko.com>

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


# 706865af 20-Mar-2017 Stefan Roese <sr@denx.de>

dm: core: Add flags parameter to device_remove()

This patch adds the flags parameter to device_remove() and changes all
calls to this function to provide the default value of DM_REMOVE_NORMAL
for "n

dm: core: Add flags parameter to device_remove()

This patch adds the flags parameter to device_remove() and changes all
calls to this function to provide the default value of DM_REMOVE_NORMAL
for "normal" device removal.

This is in preparation for the driver specific pre-OS (e.g. DMA
cancelling) remove support.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>

show more ...


# 21342d4a 08-Feb-2017 Tom Rini <trini@konsulko.com>

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


# e160f7d4 17-Jan-2017 Simon Glass <sjg@chromium.org>

dm: core: Replace of_offset with accessor

At present devices use a simple integer offset to record the device tree
node associated with the device. In preparation for supporting a live
device tree,

dm: core: Replace of_offset with accessor

At present devices use a simple integer offset to record the device tree
node associated with the device. In preparation for supporting a live
device tree, which uses a node pointer instead, refactor existing code to
access this field through an inline function.

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

show more ...


# 73eed452 04-Dec-2016 Tom Rini <trini@konsulko.com>

Merge branch 'master' of git://www.denx.de/git/u-boot-dm


# 13f3fcac 30-Nov-2016 Stefan Roese <sr@denx.de>

dm: core: Add dev_get_addr_size_index() to retrieve addr and size

The currently available functions accessing the 'reg' property of a
device only retrieve the address. Sometimes its also necessary t

dm: core: Add dev_get_addr_size_index() to retrieve addr and size

The currently available functions accessing the 'reg' property of a
device only retrieve the address. Sometimes its also necessary to
retrieve the size described by the 'reg' property. This patch adds
the new function dev_get_addr_size_index() which retrieves both,
the address and the size described by the 'reg' property.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>

show more ...


# fe34b6a4 28-Jul-2016 Tom Rini <trini@konsulko.com>

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


# cc7f66f7 05-Jul-2016 Simon Glass <sjg@chromium.org>

dm: core: Add a function to bind child devices

We currently use dm_scan_fdt_node() to bind devices. It is an internal
function and it requires the caller to know whether we are pre- or post-
relocat

dm: core: Add a function to bind child devices

We currently use dm_scan_fdt_node() to bind devices. It is an internal
function and it requires the caller to know whether we are pre- or post-
relocation.

This requirement has become quite common in drivers, so the current function
is not ideal.

Add a new function with fewer arguments, that does not require internal
headers. This can be used directly as a post_bind() method if needed.

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

show more ...


# c57f806b 17-Jul-2016 Simon Glass <sjg@chromium.org>

dm: core: Add a way to find a device by its driver

Some SoCs have a single clock device. Provide a way to find it given its
driver name. This is handled by the linker so will fail if the name is not

dm: core: Add a way to find a device by its driver

Some SoCs have a single clock device. Provide a way to find it given its
driver name. This is handled by the linker so will fail if the name is not
found, avoiding strange errors when names change and do not match. It is
also faster than a string comparison.

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

show more ...


# ebe621d5 15-Jul-2016 Tom Rini <trini@konsulko.com>

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


# 9fa28190 04-Jul-2016 Simon Glass <sjg@chromium.org>

dm: core: Expand platdata for of-platdata devices

Devices which use of-platdata have their own platdata. However, in many
cases the driver will have its own auto-alloced platdata, for use with the
d

dm: core: Expand platdata for of-platdata devices

Devices which use of-platdata have their own platdata. However, in many
cases the driver will have its own auto-alloced platdata, for use with the
device tree. The ofdata_to_platdata() method converts the device tree
settings to platdata.

With of-platdata we would not normally allocate the platdata since it is
provided by the U_BOOT_DEVICE() declaration. However this is inconvenient
since the of-platdata struct is closely tied to the device tree properties.
It is unlikely to exactly match the platdata needed by the driver.

In fact a useful approach is to declare platdata in the driver like this:

struct r3288_mmc_platdata {
struct dtd_rockchip_rk3288_dw_mshc of_platdata;
/* the 'normal' fields go here */
};

In this case we have dt_platadata available, but the normal fields are not
present, since ofdata_to_platdata() is never called. In fact driver model
doesn't allocate any space for the 'normal' fields, since it sees that there
is already platform data attached to the device.

To make this easier, adjust driver model to allocate the full size of the
struct (i.e. platdata_auto_alloc_size from the driver) and copy in the
of-platdata. This means that when the driver's bind() method is called,
the of-platdata will be present, followed by zero bytes for the empty
'normal field' portion.

A new DM_FLAG_OF_PLATDATA flag is available that indicates that the platdata
came from of-platdata. When the allocation/copy happens, the
DM_FLAG_ALLOC_PDATA flag will be set as well. The dtoc tool is updated to
output the platdata_size field, since U-Boot has no other way of knowing
the size of the of-platdata struct.

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

show more ...


# fd1c2d9b 04-Jul-2016 Simon Glass <sjg@chromium.org>

dm: core: Rename DM_NAME_ALLOCED to DM_FLAG_NAME_ALLOCED

This is a flag. Adjust the name to be consistent with the other flags.

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


# bff97dde 11-Jul-2016 Tom Rini <trini@konsulko.com>

Merge branch 'master' of git://git.denx.de/u-boot-spi


# 7c616862 06-Jul-2016 Vignesh R <vigneshr@ti.com>

dm: core: implement dev_map_physmem()

This API helps to map physical register addresss pace of device to
virtual address space easily. Its just a wrapper around map_physmem()
with MAP_NOCACHE flag.

dm: core: implement dev_map_physmem()

This API helps to map physical register addresss pace of device to
virtual address space easily. Its just a wrapper around map_physmem()
with MAP_NOCACHE flag.

Signed-off-by: Vignesh R <vigneshr@ti.com>
Suggested-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jagan Teki <jteki@openedev.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Jagan Teki <jteki@openedev.com>

show more ...


# dc557e9a 18-Jun-2016 Stefano Babic <sbabic@denx.de>

Merge branch 'master' of git://git.denx.de/u-boot

Signed-off-by: Stefano Babic <sbabic@denx.de>


# 2ee490a0 24-May-2016 Tom Rini <trini@konsulko.com>

Merge branch 'master' of git://git.denx.de/u-boot-net

Signed-off-by: Tom Rini <trini@konsulko.com>

Conflicts:
drivers/net/zynq_gem.c


# 73443b9e 28-Apr-2016 Mugunthan V N <mugunthanvnm@ti.com>

drivers: core: device: add support to check dt compatible for a device/machine

Provide an api to check whether the given device or machine is
compatible with the given compat string which helps in m

drivers: core: device: add support to check dt compatible for a device/machine

Provide an api to check whether the given device or machine is
compatible with the given compat string which helps in making
decisions in drivers based on device or machine compatible.

Idea taken from Linux.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>

show more ...


# 08ca213a 24-May-2016 Stefano Babic <sbabic@denx.de>

Merge branch 'master' of git://git.denx.de/u-boot


1234