From: Rob Herring <robh@kernel.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Arnd Bergmann <arnd@arndb.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] misc: sram: Generate unique names for subpools
Date: Tue, 18 Apr 2023 17:38:00 -0500 [thread overview]
Message-ID: <20230418223800.GA2447581-robh@kernel.org> (raw)
In-Reply-To: <20230417-ux500-sram-v1-2-5924988bb835@linaro.org>
On Mon, Apr 17, 2023 at 09:34:57AM +0200, Linus Walleij wrote:
> The current code will, if we do not specify unique labels
> for the SRAM subnodes, fail to register several nodes named
> the same.
>
> Example:
>
> sram@40020000 {
> (...)
> sram@0 {
> (...)
> };
> sram@1000 {
> (...)
> };
> };
>
> Since the child->name in both cases will be "sram" the
> gen_pool_create() will fail because the name is not unique.
> So let's use of_full_node_name() instead of child->name
> so the name is "sram@0" and "sram@1000" respectively.
>
> However if there are two or more SRAMs on the system
> with subnodes named the same (that exists on the U8500)
> then this again will not work. So catenate the top node
> name and the subnode full name to form a string that will
> always be unique.
Use the naming platform devices use which has the translated address.
How the addresses are defined should not affect the device name.
Rob
next prev parent reply other threads:[~2023-04-18 22:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-17 7:34 [PATCH 0/2] SRAM dt binding and fix Linus Walleij
2023-04-17 7:34 ` [PATCH 1/2] dt-bindings: sram: Add compatible for ST-Ericsson U8500 eSRAM Linus Walleij
2023-04-18 22:38 ` Rob Herring
2023-04-17 7:34 ` [PATCH 2/2] misc: sram: Generate unique names for subpools Linus Walleij
2023-04-18 22:38 ` Rob Herring [this message]
2023-04-19 12:56 ` Linus Walleij
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=20230418223800.GA2447581-robh@kernel.org \
--to=robh@kernel.org \
--cc=arnd@arndb.de \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).