From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B7362C43334 for ; Wed, 6 Jul 2022 01:27:35 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7EA30843AF; Wed, 6 Jul 2022 03:27:33 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="YabUBdAy"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D2B788451F; Wed, 6 Jul 2022 03:27:31 +0200 (CEST) Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id C47C182102 for ; Wed, 6 Jul 2022 03:27:28 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=takahiro.akashi@linaro.org Received: by mail-pj1-x102d.google.com with SMTP id z12-20020a17090a7b8c00b001ef84000b8bso8409966pjc.1 for ; Tue, 05 Jul 2022 18:27:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to; bh=+9w2HkQB/NaqtB60w08jEKn4RKuiyiNEgviqx692Muw=; b=YabUBdAyatagCtKxRmOBhzMqth7rtqMtmN57+AXJVD5zdpfo+y3R6Cj7nXnegPPyO2 8KtvKjuYgZJ63tKUnwrVw1YRLQLI8Z9VQlCytXWVxYzFkD+gVvEsxlNyfjd6/qV1VKCv Psr8ffYtJYz0k3r7DhVuJPvMdz7vQTlYImjmKrSSyzwWzQrZN+00uyM+QRpMIX9ah6Jj zqHZ6/YAYtykNG57Zpk8mxBagJrpVSv5Lh55nfCZByXfW5ljLEcGEj8awmSqMOAA90Mw GtOh/mgzXybeoT0BQLUo0ytRwxJoWp81xzkUuTFWQP138Ow4upoLk+XjYx+Ch88O7vUf HeUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to; bh=+9w2HkQB/NaqtB60w08jEKn4RKuiyiNEgviqx692Muw=; b=WMyD7E3tWx9pGHxuBDldanmygqKYwAdbOqQ0BOAWId91UZ6x5a4ZoH551JiCaHaYAN tJ9I3FFyzF/IuTVYl+r+t0OwPd9lwIlxbALstz2E7G40Zm1/8XNr0BCjWGyTR6Yn9hPg RB/XJZklyL/La46ZOyVETBeLQcJPId+0UfLJzb0VuWyy3821zbBJQqyXR9Plj1brQcoh I2nXUu1ppAyoH2MrI+VmFeG5dJKqwD6YUxI9CeNYX48aneCuzmGG6Rlv9akAfw79QzQv mPvezGFRvr38x8NCGPV7qBF4+ohp2W/Vf3leWVWd+TqFOdzNp0HQMkOtxwoEiqSu1I/A NPNQ== X-Gm-Message-State: AJIora9oWe+Etx7uTDWS2AW4tkEC0GAcHbPCvjo6f1QTyrKX67gSVat5 yiMogGr+Z8SFnCGPbOzC6TI/OQ== X-Google-Smtp-Source: AGRyM1ssWqCcY+E5uFMYPVJWS82foeyuMBx8sjqrm1Pf1BZG/s3D3ZTbAOyeNvOv9y39PbQiEwvaSQ== X-Received: by 2002:a17:902:744c:b0:16b:dacb:5724 with SMTP id e12-20020a170902744c00b0016bdacb5724mr17894010plt.57.1657070847130; Tue, 05 Jul 2022 18:27:27 -0700 (PDT) Received: from laputa ([2400:4050:c3e1:100:a4a2:c8c3:a3dd:4eca]) by smtp.gmail.com with ESMTPSA id 66-20020a620445000000b005289bfcee91sm1509540pfe.59.2022.07.05.18.27.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Jul 2022 18:27:25 -0700 (PDT) Date: Wed, 6 Jul 2022 10:27:21 +0900 From: AKASHI Takahiro To: Simon Glass Cc: Tom Rini , U-Boot Mailing List , U-Boot Custodians , Marek Vasut , Pavel Herrmann Subject: Re: [PATCH 6/9] dm: core: Support accessing core tags Message-ID: <20220706012721.GB42673@laputa> Mail-Followup-To: AKASHI Takahiro , Simon Glass , Tom Rini , U-Boot Mailing List , U-Boot Custodians , Marek Vasut , Pavel Herrmann References: <20220509045226.GA34398@laputa> <20220508103927.912854-1-sjg@chromium.org> <20220508103927.912854-7-sjg@chromium.org> <20220628141851.GA90541@laputa> <20220705123936.GK1146598@bill-the-cat> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean 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 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 > > > > > --- > > > > > > > > > > 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