public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Roger Quadros <rogerq@kernel.org>
To: Chintan Vankar <c-vankar@ti.com>,
	AKASHI Takahiro <akashi.tkhro@gmail.com>,
	Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>,
	Marek Vasut <marek.vasut+renesas@mailbox.org>,
	Christian Marangi <ansuelsmth@gmail.com>,
	Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	Sughosh Ganu <sughosh.ganu@linaro.org>,
	Nishanth Menon <nm@ti.com>, Hari Nagalla <hnagalla@ti.com>,
	Jonathan Humphreys <j-humphreys@ti.com>,
	Andreas Dannenberg <dannenberg@ti.com>,
	Simon Glass <sjg@chromium.org>,
	Jayesh Choudhary <j-choudhary@ti.com>,
	Aniket Limaye <a-limaye@ti.com>,
	Aradhya Bhatia <a-bhatia1@ti.com>,
	Neha Malcom Francis <n-francis@ti.com>, Andrew Davis <afd@ti.com>,
	Ramon Fried <rfried.dev@gmail.com>,
	Joe Hershberger <joe.hershberger@ni.com>,
	Bryan Brattlof <bb@ti.com>, Vignesh Raghavendra <vigneshr@ti.com>,
	Manorit Chawdhry <m-chawdhry@ti.com>,
	Tom Rini <trini@konsulko.com>
Cc: srk@ti.com, s-vadapalli@ti.com, danishanwar@ti.com, u-boot@lists.denx.de
Subject: Re: [PATCH 09/13] arm: mach-k3: am62p5_init: Probe AM65 CPSW NUSS for R5/A53 SPL
Date: Tue, 7 Jan 2025 16:18:10 +0200	[thread overview]
Message-ID: <c8e651fa-f9e3-4901-8475-15e9bbfee0ab@kernel.org> (raw)
In-Reply-To: <20250107093840.2211381-10-c-vankar@ti.com>



On 07/01/2025 11:38, Chintan Vankar wrote:
> In order to support Ethernet boot on AM62p, probe AM65 CPSW NUSS
> driver in board_init_f().
> 
> Signed-off-by: Chintan Vankar <c-vankar@ti.com>
> ---
>  arch/arm/mach-k3/am62px/am62p5_init.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/arch/arm/mach-k3/am62px/am62p5_init.c b/arch/arm/mach-k3/am62px/am62p5_init.c
> index 34ed01cd78c..f8e98b09402 100644
> --- a/arch/arm/mach-k3/am62px/am62p5_init.c
> +++ b/arch/arm/mach-k3/am62px/am62p5_init.c
> @@ -159,6 +159,16 @@ void board_init_f(ulong dummy)
>  	}
>  
>  	spl_enable_cache();
> +
> +	if (IS_ENABLED(CONFIG_SPL_ETH) && IS_ENABLED(CONFIG_TI_AM65_CPSW_NUSS) &&
> +	    spl_boot_device() == BOOT_DEVICE_ETHERNET) {
> +		struct udevice *cpswdev;
> +
> +		if (uclass_get_device_by_driver(UCLASS_MISC, DM_DRIVER_GET(am65_cpsw_nuss),
> +						&cpswdev))
> +			printf("Failed to probe am65_cpsw_nuss driver\n");
> +	}
> +

Why do you need to do this?

from drivers/net/ti/am65-cpsw-nuss.c

U_BOOT_DRIVER(am65_cpsw_nuss) = {
        .name   = "am65_cpsw_nuss",
        .id     = UCLASS_MISC,
        .of_match = am65_cpsw_nuss_ids,
        .probe  = am65_cpsw_probe_nuss,
        .priv_auto = sizeof(struct am65_cpsw_common),
};

U_BOOT_DRIVER(am65_cpsw_nuss_port) = {
        .name   = "am65_cpsw_nuss_port",
        .id     = UCLASS_ETH,
        .probe  = am65_cpsw_port_probe,
        .ops    = &am65_cpsw_ops,
        .priv_auto      = sizeof(struct am65_cpsw_priv),
        .plat_auto      = sizeof(struct eth_pdata),
        .flags = DM_FLAG_ALLOC_PRIV_DMA | DM_FLAG_OS_PREPARE,
};

Isn't am65_cpsw_port_probe() and am65_cpsw_probe_nuss() getting called?
If not, you need to identify why and fix it the proper way. Not by hacking
it like you do now.

>  	debug("am62px_init: %s done\n", __func__);
>  }
>  

-- 
cheers,
-roger


  parent reply	other threads:[~2025-01-07 14:18 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-07  9:38 [PATCH 00/13] Add support for Ethernet boot on AM62p-SK and AM68-SK Chintan Vankar
2025-01-07  9:38 ` [PATCH 01/13] net: tftp: Increase TFTP pkt string length to include null character Chintan Vankar
2025-01-07 14:22   ` Tom Rini
2025-01-09  7:11     ` Vankar, Chintan
2025-01-09 15:27       ` Tom Rini
2025-03-20  7:14         ` Wadim Egorov
2025-03-20  7:26           ` Chintan Vankar
2025-01-07  9:38 ` [PATCH 02/13] arm: mach-k3: j721s2: Update SoC auto-gen data to enable Ethernet boot Chintan Vankar
2025-01-07 13:41   ` Bryan Brattlof
2025-01-07  9:38 ` [PATCH 03/13] arm: mach-k3: j721s2_spl: Alias Ethernet boot to CPGMAC Chintan Vankar
2025-01-07  9:38 ` [PATCH 04/13] arm: mach-k3: j721s2_init: Probe AM65 CPSW NUSS for R5/A72 SPL Chintan Vankar
2025-01-07 14:33   ` Roger Quadros
2025-01-22  8:53     ` Chintan Vankar
2025-01-23  9:40       ` Roger Quadros
2025-01-24  3:52         ` Vignesh Raghavendra
2025-01-28  4:09         ` Chintan Vankar
2025-01-28  9:56           ` Roger Quadros
2025-01-07  9:38 ` [PATCH 05/13] configs: am68: Add configs for enabling Ethboot in R5SPL Chintan Vankar
2025-01-07 14:38   ` Roger Quadros
2025-01-09  8:43     ` Vankar, Chintan
2025-01-09 16:44       ` Roger Quadros
2025-01-07  9:38 ` [PATCH 06/13] configs: am68: Enable configs required for Ethernet boot Chintan Vankar
2025-01-07 14:40   ` Roger Quadros
2025-01-07  9:38 ` [PATCH 07/13] arm: dts: k3-am68-sk-base-board-u-boot: Add bootph-all property to necessary nodes Chintan Vankar
2025-01-07  9:38 ` [PATCH 08/13] arm: mach-k3: am62p: Update SoC auto-gen data to enable CPSW boot Chintan Vankar
2025-01-07 13:58   ` Bryan Brattlof
2025-01-07  9:38 ` [PATCH 09/13] arm: mach-k3: am62p5_init: Probe AM65 CPSW NUSS for R5/A53 SPL Chintan Vankar
2025-01-07 13:38   ` Bryan Brattlof
2025-01-07 14:18   ` Roger Quadros [this message]
2025-01-07  9:38 ` [PATCH 10/13] board: ti: am62px: evm: Enable cache for AM62p Chintan Vankar
2025-01-07 14:23   ` Roger Quadros
2025-01-22  9:22     ` Chintan Vankar
2025-01-07  9:38 ` [PATCH 11/13] configs: am62p: Add configs for enabling ETHBOOT in R5SPL Chintan Vankar
2025-01-07  9:38 ` [PATCH 12/13] configs: am62p: Enable configs required for Ethboot Chintan Vankar
2025-01-07 14:12   ` Bryan Brattlof
2025-01-07  9:38 ` [PATCH 13/13] arch: arm: dts: k3-am62p5-sk-u-boot: Add bootph-all property to necessary nodes Chintan Vankar

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=c8e651fa-f9e3-4901-8475-15e9bbfee0ab@kernel.org \
    --to=rogerq@kernel.org \
    --cc=a-bhatia1@ti.com \
    --cc=a-limaye@ti.com \
    --cc=afd@ti.com \
    --cc=akashi.tkhro@gmail.com \
    --cc=ansuelsmth@gmail.com \
    --cc=bb@ti.com \
    --cc=c-vankar@ti.com \
    --cc=danishanwar@ti.com \
    --cc=dannenberg@ti.com \
    --cc=hnagalla@ti.com \
    --cc=ilias.apalodimas@linaro.org \
    --cc=j-choudhary@ti.com \
    --cc=j-humphreys@ti.com \
    --cc=joe.hershberger@ni.com \
    --cc=m-chawdhry@ti.com \
    --cc=marek.vasut+renesas@mailbox.org \
    --cc=mikhail.kshevetskiy@iopsys.eu \
    --cc=n-francis@ti.com \
    --cc=nm@ti.com \
    --cc=rfried.dev@gmail.com \
    --cc=s-vadapalli@ti.com \
    --cc=sjg@chromium.org \
    --cc=srk@ti.com \
    --cc=sughosh.ganu@linaro.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox