linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "J. Neuschäfer" <j.ne@posteo.net>
To: j.ne@posteo.net
Cc: Madhavan Srinivasan <maddy@linux.ibm.com>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Nicholas Piggin <npiggin@gmail.com>,
	Christophe Leroy <christophe.leroy@csgroup.eu>,
	Naveen N Rao <naveen@kernel.org>,
	linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] powerpc/fsl_lbc: Explicitly populate bus
Date: Thu, 20 Feb 2025 13:13:37 +0000	[thread overview]
Message-ID: <Z7cqgbullhR47Bb-@probook> (raw)
In-Reply-To: <20250209-localbus-v1-1-efcd780153a0@posteo.net>

On Sun, Feb 09, 2025 at 10:58:50PM +0100, J. Neuschäfer via B4 Relay wrote:
> From: "J. Neuschäfer" <j.ne@posteo.net>
> 
> Historically, devicetree nodes representing the Freescale Enhanced
> Local Bus Controller (eLBC) have compatible strings such as:
> 
>     compatible = "fsl,mpc8313-elbc", "fsl,elbc", "simple-bus";
> 
> The "simple-bus" string causes the bus to be populated, and the memory
> devices contained within it to be discovered. The eLBC bus (as
> represented in device trees) differs from a simple-bus in a few ways,
> though:
> 
>  - Addresses are not simple/linear: The first cell of an address is a
>    chip select, the second is an linear address within the space thus
>    selected. Representing 1,0 as 100000000, for example, would decrease
>    readability[1].
>  - It is expected that the devices on a simple-bus "can be accessed
>    directly without additional configuration required"[2], but the eLBC
>    needs some configuration.
> 
> To accommodate devicetrees that declare an eLBC without "simple-bus",
> explicitly populate the bus in the eLBC driver.
> 
> [1]: dtc makes such a suggestion opon encountering an eLBC
> [2]: Quoting the Devicetree Specification Release v0.3
> 
> Signed-off-by: J. Neuschäfer <j.ne@posteo.net>
> ---

Due to advice from Crystal Wood and Rob Herring[1], I reached the
conclusion that this patch is not necessary.

[1]: https://lore.kernel.org/lkml/Z7ILej_AJYot_wKP@probook/

>  arch/powerpc/sysdev/fsl_lbc.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/powerpc/sysdev/fsl_lbc.c b/arch/powerpc/sysdev/fsl_lbc.c
> index 217cea150987df1e1b5c6dbf9e9a1607dd5ce49b..2007ced997fcf0c7059e5b780893b530764dc8b2 100644
> --- a/arch/powerpc/sysdev/fsl_lbc.c
> +++ b/arch/powerpc/sysdev/fsl_lbc.c
> @@ -20,6 +20,7 @@
>  #include <linux/of.h>
>  #include <linux/of_address.h>
>  #include <linux/of_irq.h>
> +#include <linux/of_platform.h>
>  #include <linux/slab.h>
>  #include <linux/sched.h>
>  #include <linux/platform_device.h>
> @@ -336,7 +337,7 @@ static int fsl_lbc_ctrl_probe(struct platform_device *dev)
>  	/* Enable interrupts for any detected events */
>  	out_be32(&fsl_lbc_ctrl_dev->regs->lteir, LTEIR_ENABLE);
>  
> -	return 0;
> +	return devm_of_platform_populate(&dev->dev);
>  
>  err1:
>  	free_irq(fsl_lbc_ctrl_dev->irq[0], fsl_lbc_ctrl_dev);
> 
> ---
> base-commit: 7ccde445dddcca030cd6ed66974bb80915ad9dd5
> change-id: 20250209-localbus-94a6ebb04c12
> 
> Best regards,
> -- 
> J. Neuschäfer <j.ne@posteo.net>
> 
> 


      reply	other threads:[~2025-02-20 13:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-09 21:58 [PATCH] powerpc/fsl_lbc: Explicitly populate bus J. Neuschäfer via B4 Relay
2025-02-20 13:13 ` J. Neuschäfer [this message]

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=Z7cqgbullhR47Bb-@probook \
    --to=j.ne@posteo.net \
    --cc=christophe.leroy@csgroup.eu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=maddy@linux.ibm.com \
    --cc=mpe@ellerman.id.au \
    --cc=naveen@kernel.org \
    --cc=npiggin@gmail.com \
    /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).