[PATCH 6/9] dm: core: Support accessing core tags

Simon Glass sjg at chromium.org
Tue Jun 28 15:37:56 CEST 2022


Hi Simon,

On Sun, May 08, 2022 at 04:39:24AM -0600, Simon Glass wrote:
> At present tag numbers are only allocated for non-core data, meaning that
> the 'core' data, like priv and plat, are accessed through dedicated
> functions.
>
> For debugging and consistency it is convenient to use tags for this 'core'
> data too. Add support for this, with new tag numbers and functions to
> access the pointer and size for each.
>
> Update one of the test drivers so that the uclass-private data can be
> tested here.
>
> There is some code duplication with functions like device_alloc_priv() but
> this is not addressed for now. At some point, some rationalisation may
> help to reduce code size, but more thought it needed on that.
>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
>
>  drivers/core/device.c   | 65 +++++++++++++++++++++++++++++++++
>  drivers/misc/test_drv.c |  4 ++-
>  include/dm/device.h     | 25 +++++++++++++
>  include/dm/tag.h        | 13 ++++++-
>  test/dm/core.c          | 80 +++++++++++++++++++++++++++++++++++++++++
>  tools/dtoc/test_dtoc.py |  4 +++
>  6 files changed, 189 insertions(+), 2 deletions(-)
>
Applied to u-boot-dm, thanks!


More information about the U-Boot mailing list