All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: MD Danish Anwar <danishanwar@ti.com>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Meghana Malladi <m-malladi@ti.com>,
	linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, srk@ti.com,
	Vignesh Raghavendra <vigneshr@ti.com>,
	Roger Quadros <rogerq@kernel.org>
Subject: Re: [PATCH net-next v2] net: ti: icssg-prueth: Read firmware-names from device tree
Date: Sat, 14 Jun 2025 17:34:16 +0100	[thread overview]
Message-ID: <20250614163416.GT414686@horms.kernel.org> (raw)
In-Reply-To: <20250613064547.44394-1-danishanwar@ti.com>

On Fri, Jun 13, 2025 at 12:15:47PM +0530, MD Danish Anwar wrote:
> Refactor the way firmware names are handled for the ICSSG PRUETH driver.
> Instead of using hardcoded firmware name arrays for different modes (EMAC,
> SWITCH, HSR), the driver now reads the firmware names from the device tree
> property "firmware-name". Only the EMAC firmware names are specified in the
> device tree property. The firmware names for all other supported modes are
> generated dynamically based on the EMAC firmware names by replacing
> substrings (e.g., "eth" with "sw" or "hsr") as appropriate.
> 
> Example: Below are the firmwares used currently for PRU0 core
> 
> EMAC: ti-pruss/am65x-sr2-pru0-prueth-fw.elf
> SW  : ti-pruss/am65x-sr2-pru0-prusw-fw.elf
> HSR : ti-pruss/am65x-sr2-pru0-pruhsr-fw.elf
> 
> All three firmware names are same except for the operating mode.
> 
> In general for PRU0 core, firmware name is,
> 
>         ti-pruss/am65x-sr2-pru0-pru<mode>-fw.elf
> 
> Since the EMAC firmware names are defined in DT, driver will read those
> directly and for other modes swap the mode name. i.e. eth -> sw or
> eth -> hsr.
> 
> This preserves backwards compatibility as ICSSG driver is supported only
> by AM65x and AM64x. Both of these have "firmware-name" property
> populated in their device tree.
> 
> Signed-off-by: MD Danish Anwar <danishanwar@ti.com>
> ---
> v1 - v2: Changed commit message to include an example as suggested by 
>          Jakub Kicinski <kuba@kernel.org>
> 
> v1: https://lore.kernel.org/all/20250610052501.3444441-1-danishanwar@ti.com/

I agree with Jakub's comment in his review of v1 that the backwards
compatibility aspects seem fine. And, overall, the patch looks good to me.

Reviewed-by: Simon Horman <horms@kernel.org>



  reply	other threads:[~2025-06-14 16:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-13  6:45 [PATCH net-next v2] net: ti: icssg-prueth: Read firmware-names from device tree MD Danish Anwar
2025-06-14 16:34 ` Simon Horman [this message]
2025-06-14 18:30 ` patchwork-bot+netdevbpf

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=20250614163416.GT414686@horms.kernel.org \
    --to=horms@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=danishanwar@ti.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m-malladi@ti.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=rogerq@kernel.org \
    --cc=srk@ti.com \
    --cc=vigneshr@ti.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.