[PATCH net-next v2] net: ti: icssg-prueth: Read firmware-names from device tree
Simon Horman
horms at kernel.org
Sat Jun 14 09:34:16 PDT 2025
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 at ti.com>
> ---
> v1 - v2: Changed commit message to include an example as suggested by
> Jakub Kicinski <kuba at 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 at kernel.org>
More information about the linux-arm-kernel
mailing list