public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: AKASHI Takahiro <takahiro.akashi@linaro.org>
To: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>,
	U-Boot Mailing List <u-boot@lists.denx.de>,
	U-Boot Custodians <u-boot-custodians@lists.denx.de>,
	Marek Vasut <marex@denx.de>,
	Pavel Herrmann <morpheus.ibis@gmail.com>
Subject: Re: [PATCH 6/9] dm: core: Support accessing core tags
Date: Wed, 6 Jul 2022 10:27:21 +0900	[thread overview]
Message-ID: <20220706012721.GB42673@laputa> (raw)
In-Reply-To: <CAPnjgZ3=aSqhqjo3JP9BRCEymWoMrt7mi0cv9sXBP61Q5hs76A@mail.gmail.com>

Hi Simon,

On Tue, Jul 05, 2022 at 02:27:54PM +0100, Simon Glass wrote:
> Hi,
> 
> On Tue, 5 Jul 2022 at 13:39, Tom Rini <trini@konsulko.com> wrote:
> >
> > On Tue, Jun 28, 2022 at 11:18:51PM +0900, AKASHI Takahiro wrote:
> > > On Tue, Jun 28, 2022 at 09:37:56AM -0400, Simon Glass wrote:
> > > > 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@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!
> > >
> > > I expect you to reply to my comments:
> > > https://lists.denx.de/pipermail/u-boot/2022-May/483606.html
> >
> 
> Oh I missed this as I have not been reading email for some months and
> did not notice this in patchwork.
> 
> > Simon?  This is why I haven't applied the PR for -next yet, I was
> > waiting for your comments here, thanks.
> 
> The reason is that the tag functionality is optional and is not used
> for most boards. The new API is a core function.

Please let me make sure your intension: Is this your answer to my question:
  "Why not (enhance and) re-use dev_tag_get_ptr()?
   Both functions, at least, share the syntax and even the semantics
   from user's viewpoint."

> I do expect to be able to rationalise things at some point once we
> have a bit more code in there, but perhaps in the opposite direction.

So you have a concern that this kind of API (i.e. tag) might disappear
or be changed and diverge in incompatible(?) direction in the future
and you think that it's the best for now to have separate APIs for
different subsystems/users?

-Takahiro Akashi

> Regards,
> Simon

  reply	other threads:[~2022-07-06  1:27 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-08 10:39 [PATCH 0/9] dm: core: Support collecting and reporting stats Simon Glass
2022-05-08 10:39 ` [PATCH 1/9] dm: core: Rename dm_dump_all() Simon Glass
2022-06-28 13:38   ` Simon Glass
2022-05-08 10:39 ` [PATCH 2/9] dm: core: Sort dm subcommands Simon Glass
2022-06-28 13:38   ` Simon Glass
2022-05-08 10:39 ` [PATCH 3/9] dm: core: Fix addresses in the dm static command Simon Glass
2022-06-28 13:37   ` Simon Glass
2022-05-08 10:39 ` [PATCH 4/9] dm: core: Add documentation for the dm command Simon Glass
2022-06-28 13:37   ` Simon Glass
2022-05-08 10:39 ` [PATCH 5/9] dm: core: Switch the testbus driver to use a new struct Simon Glass
2022-06-28 13:37   ` Simon Glass
2022-05-08 10:39 ` [PATCH 6/9] dm: core: Support accessing core tags Simon Glass
2022-05-09  4:52   ` AKASHI Takahiro
2022-06-28 13:37     ` Simon Glass
2022-06-28 14:18       ` AKASHI Takahiro
2022-07-05 12:39         ` Tom Rini
2022-07-05 13:27           ` Simon Glass
2022-07-06  1:27             ` AKASHI Takahiro [this message]
2022-07-06  8:38               ` Simon Glass
2022-05-08 10:39 ` [PATCH 7/9] dm: core: Add a way to collect memory usage Simon Glass
2022-06-28 13:37   ` Simon Glass
2022-05-08 10:39 ` [PATCH 8/9] dm: core: Add a command to show driver model statistics Simon Glass
2022-06-28 13:37   ` Simon Glass
2022-05-08 10:39 ` [PATCH 9/9] dm: spl: Allow SPL to show memory usage Simon Glass
2022-06-28 13:37   ` Simon Glass

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220706012721.GB42673@laputa \
    --to=takahiro.akashi@linaro.org \
    --cc=marex@denx.de \
    --cc=morpheus.ibis@gmail.com \
    --cc=sjg@chromium.org \
    --cc=trini@konsulko.com \
    --cc=u-boot-custodians@lists.denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox