| #
18aa8da9 |
| 15-Jan-2018 |
Mario Six <mario.six@gdsys.cc> |
UPSTREAM: core: Make device_is_compatible live-tree compatible
Judging from its name and parameters, device_is_compatible looks like it is compatible with a live device tree, but it actually isn't.
UPSTREAM: core: Make device_is_compatible live-tree compatible
Judging from its name and parameters, device_is_compatible looks like it is compatible with a live device tree, but it actually isn't.
Make it compatible with a live device tree.
Reviewed-by: Simon Glass <sjg@chromium.org> Change-Id: I892142d611ab5068d4ec6bdb51666a673b679794 Signed-off-by: Mario Six <mario.six@gdsys.cc> Signed-off-by: Kever Yang <kever.yang@rock-chips.com> (cherry picked from commit 29d11b8838bb2aa324b8873159cbd7088870a75b)
show more ...
|
| #
89f947ec |
| 07-Feb-2018 |
Kever Yang <kever.yang@rock-chips.com> |
core: device: skip bind device already there
With kernel dtb support, there have two dtb and some device may the same, skip it if already in the list, node in u-boot dtb will be used.
Change-Id: Ic
core: device: skip bind device already there
With kernel dtb support, there have two dtb and some device may the same, skip it if already in the list, node in u-boot dtb will be used.
Change-Id: Ic9f8b73e3708a03416a9dc4ab6c72fa0184a6fdb Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
show more ...
|
| #
9ab2e5eb |
| 19-Sep-2017 |
Faiz Abbas <faiz_abbas@ti.com> |
UPSTREAM: dm: core: Round up size when allocating so that it is cache line aligned
The size variable may not be always be a mulitple of ARCH_DMA_MINALIGN and using it to flush cache leads to cache m
UPSTREAM: dm: core: Round up size when allocating so that it is cache line aligned
The size variable may not be always be a mulitple of ARCH_DMA_MINALIGN and using it to flush cache leads to cache misaligned warnings.
Therefore, round up the size to a multiple of ARCH_DMA_MINLAIGN when allocating private data.
Change-Id: I29c4fb89f4be628518c2f5350d3efbccd28acd36 Signed-off-by: Faiz Abbas <faiz_abbas@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Kever Yang <kever.yang@rock-chips.com> (cherry picked from commit 5924da1dfe56d32a45b8adf29bdc8caf788bd4c8)
show more ...
|
| #
d42197e4 |
| 29-Sep-2017 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
UPSTREAM: dm: replace dm_dbg() with pr_debug()
As we discussed before in ML, dm_dbg() causes undefined reference error if #define DEBUG is added to users, but not drivers/core/util.c
We do not need
UPSTREAM: dm: replace dm_dbg() with pr_debug()
As we discussed before in ML, dm_dbg() causes undefined reference error if #define DEBUG is added to users, but not drivers/core/util.c
We do not need this macro because we can use pr_debug() instead, and it is pretty easy to enable it for the DM core by using ccflags-y.
Change-Id: I0732d1fec827d434b1163093920a3c5bd682803e Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Kever Yang <kever.yang@rock-chips.com> (cherry picked from commit ceb9190969e458dcd1427566f762dbb9cfdfdc94)
show more ...
|
| #
396e343b |
| 19-May-2017 |
Simon Glass <sjg@chromium.org> |
dm: core: Allow binding a device from a live tree
When a live tree is being used we need to record the node that was used to create the device. Update device_bind_with_driver_data() to support this.
dm: core: Allow binding a device from a live tree
When a live tree is being used we need to record the node that was used to create the device. Update device_bind_with_driver_data() to support this.
Signed-off-by: Simon Glass <sjg@chromium.org>
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 ...
|
| #
7a61b0b5 |
| 17-May-2017 |
Simon Glass <sjg@chromium.org> |
dm: core: Adjust device_bind_common() to take an ofnode
This core function will need to work with a live tree also. Update it to accept an ofnode instead of an offset.
Signed-off-by: Simon Glass <s
dm: core: Adjust device_bind_common() to take an ofnode
This core function will need to work with a live tree also. Update it to accept an ofnode instead of an offset.
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 ...
|
| #
b7b24a7a |
| 13-Apr-2017 |
Tom Rini <trini@konsulko.com> |
Merge git://git.denx.de/u-boot-dm
Here with some DM changes as well as the long-standing AT91 DM/DT conversion patches which I have picked up via dm.
|
| #
5a8a8045 |
| 04-Apr-2017 |
Simon Glass <sjg@chromium.org> |
dm: core: Ensure DMA regions start up with the cache clean
There is a strange interaction with drivers which use DMA if the cache starts off in a dirty state. Buffer space which the driver reads (bu
dm: core: Ensure DMA regions start up with the cache clean
There is a strange interaction with drivers which use DMA if the cache starts off in a dirty state. Buffer space which the driver reads (but has not previously written) can contain zero bytes from alloc_priv(). This can cause corruption of the memory used by DMA for incoming data.
Fix this and add a comment to explain the problem.
This allows the dwc2 driver to work correctly with driver model, for example.
Signed-off-by: Simon Glass <sjg@chromium.org>
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 ...
|
| #
6e67f176 |
| 17-Oct-2016 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
Fix codying style broken by recent libfdt sync
Commit b02e4044ff8e ("libfdt: Bring in upstream stringlist functions") broke codying style in some places especially by inserting an extra whitespace b
Fix codying style broken by recent libfdt sync
Commit b02e4044ff8e ("libfdt: Bring in upstream stringlist functions") broke codying style in some places especially by inserting an extra whitespace before fdt_stringlist_count().
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
4504062b |
| 14-Oct-2016 |
Tom Rini <trini@konsulko.com> |
Merge git://git.denx.de/u-boot-fdt
|
| #
b02e4044 |
| 02-Oct-2016 |
Simon Glass <sjg@chromium.org> |
libfdt: Bring in upstream stringlist functions
These have now landed upstream. The naming is different and in one case the function signature has changed. Update the code to match.
This applies the
libfdt: Bring in upstream stringlist functions
These have now landed upstream. The naming is different and in one case the function signature has changed. Update the code to match.
This applies the following upstream commits by Thierry Reding <treding@nvidia.com> :
604e61e fdt: Add functions to retrieve strings 8702bd1 fdt: Add a function to get the index of a string 2218387 fdt: Add a function to count strings
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
f4b0df18 |
| 12-Aug-2016 |
Tom Rini <trini@konsulko.com> |
Merge git://git.denx.de/u-boot-dm
|
| #
6e06acb7 |
| 05-Aug-2016 |
Stephen Warren <swarren@nvidia.com> |
fdt: allow fdtdec_get_addr_size_*() to translate addresses
Some code may want to read reg values from DT, but from nodes that aren't associated with DM devices, so using dev_get_addr_index() isn't a
fdt: allow fdtdec_get_addr_size_*() to translate addresses
Some code may want to read reg values from DT, but from nodes that aren't associated with DM devices, so using dev_get_addr_index() isn't appropriate. In this case, fdtdec_get_addr_size_*() are the functions to use. However, "translation" (via the chain of ranges properties in parent nodes) may still be desirable. Add a function parameter to request that, and implement it. Update all call sites to default to the original behaviour.
Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Simon Glass <sjg@chromium.org> Squashed in build fix from Stephen: 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>
|