All of lore.kernel.org
 help / color / mirror / Atom feed
From: Apurva Nandan <a-nandan@ti.com>
To: Nishanth Menon <nm@ti.com>
Cc: Hari Nagalla <hnagalla@ti.com>, Lukasz Majewski <lukma@denx.de>,
	Sean Anderson <seanga2@gmail.com>,
	Jaehoon Chung <jh80.chung@samsung.com>,
	Neha Malcom Francis <n-francis@ti.com>,
	Simon Glass <sjg@chromium.org>, Andrew Davis <afd@ti.com>,
	Kamlesh Gurudasani <kamlesh@ti.com>,
	Dasnavis Sabiya <sabiya.d@ti.com>,
	Manorit Chawdhry <m-chawdhry@ti.com>,
	Aradhya Bhatia <a-bhatia1@ti.com>, Bryan Brattlof <bb@ti.com>,
	Christian Gmeiner <christian.gmeiner@gmail.com>,
	Heinrich Schuchardt <xypron.glpk@gmx.de>,
	Marcel Ziswiler <marcel.ziswiler@toradex.com>,
	Roger Quadros <rogerq@kernel.org>,
	Jayesh Choudhary <j-choudhary@ti.com>,
	Ralph Siemsen <ralph.siemsen@linaro.org>,
	Marek Vasut <marek.vasut+renesas@mailbox.org>,
	Rasmus Villemoes <rasmus.villemoes@prevas.dk>,
	<u-boot@lists.denx.de>,
	Sinthu Raja M <sinthu.raja@mistralsolutions.com>,
	Udit Kumar <u-kumar1@ti.com>
Subject: Re: [PATCH v8 02/16] arm: mach-k3: Add basic support for J784S4 SoC definition
Date: Mon, 29 Jan 2024 17:02:32 +0530	[thread overview]
Message-ID: <2d566dde-5428-400e-a30e-47cb80ccf5d1@ti.com> (raw)
In-Reply-To: <20240123204710.hlv4x4y3gst7utoe@squealing>

Hi,

On 24/01/24 02:17, Nishanth Menon wrote:
> On 20:21-20240123, Apurva Nandan wrote:
> [...]
>>>> +void k3_mem_init(void)
>>>> +{
>>>> +	struct udevice *dev;
>>>> +	int ret, ctr = 1;
>>>> +
>>>> +	if (IS_ENABLED(CONFIG_K3_J721E_DDRSS)) {
>>>> +		ret = uclass_get_device(UCLASS_RAM, 0, &dev);
>>>> +		if (ret)
>>>> +			panic("DRAM 0 init failed: %d\n", ret);
>>>> +
>>>> +		while (dev) {
>>> why loop on dev? is it possible to have ret != 0 and dev = 0?
>>>
>> Some variable needs to be used for loop condition, do you want it to be ret?
>> or maybe you can suggest your idea for this please.
>>>> +			ret = uclass_next_device_err(&dev);
>>>> +			if (ret) {
>>>> +				printf("Initialized %d DRAM controllers\n", ctr);
>>>> +				break;
>>>> +			}
>>>> +			ctr++;
>>> What is the use of ctr++ ?? please do a limit check for instances.
>> This is to keep the logic independent of board evm, so that no include of
>> EVM config is needed.
>> ctr is just used to notify user about how many DDR are up during boot, else
>> it is not needed.
>>
>> I can remove the ctr and printf, if you want.
>>
>> For a limit check, how can we get number of DDR instances on the EVM, I
>> don't know, can you please suggest some way?
>>
>> There is no config that stores this info afaik.
> Why? J784s4 has only specific number of controllerns, correct?
>
> A variant of the below -> but still have a question:
>
> while (ctrl < J784S4_MAX_CONTROLLERS) {

Is J784S4_MAX_CONTROLLERS going to be a #define in j784s4_init.c

Or a Kconfig option like:

config DDR_MAX_CONTROLLERS
     int "Max number of DRAM controllers"
     default 4 if SOC_K3_J784S4
     default 1
     help

> 	ret = uclass_next_device_err(&ret);
> 	if (ret) /* Question: How do we differentiate between valid
> 		  * failure and next instance not being present? */
> 		break;

how about:

             ...
             if (ret == -ENODEV)
                 break;

             if (ret)
                  panic("DRAM %d init failed: %d\n", ctrl,  ret);
             ...

> 	ctrl++;
> }
>
> info("Initialized %d DRAM controllers\n", ctrl - 1);
>>> [...]
>>>
>>> Next time, please respond to the review comment questions so that I
>>> know that you have considered and decided something is not necessary
>>> or something was missed in the new version - for example what happened
>>> to mmc_stop/restart?
>> mmc_stop/restart were removed (mentioned in series changelog)
> Mentioning in diffstat of the patch helps give people the context of the
> change w.r.t the path itself.
okay

-- 
Regards,
Apurva Nandan,
Texas Instruments.


  reply	other threads:[~2024-01-29 11:33 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-19 17:50 [PATCH v8 00/16] Introduce initial TI's J784S4 and AM69 support Apurva Nandan
2024-01-19 17:50 ` [PATCH v8 01/16] arm: mach-k3: Kconfig: Sort SOC_K3 config entries Apurva Nandan
2024-01-22 12:40   ` Roger Quadros
2024-01-19 17:50 ` [PATCH v8 02/16] arm: mach-k3: Add basic support for J784S4 SoC definition Apurva Nandan
2024-01-19 19:34   ` Nishanth Menon
2024-01-23 14:51     ` Apurva Nandan
2024-01-23 20:47       ` Nishanth Menon
2024-01-29 11:32         ` Apurva Nandan [this message]
2024-01-29 12:19           ` Nishanth Menon
2024-01-29 18:03             ` Apurva Nandan
2024-01-19 17:50 ` [PATCH v8 03/16] arm: dts: Introduce j784s4 and am69 dts from linux kernel Apurva Nandan
2024-01-19 17:50 ` [PATCH v8 04/16] arm: dts: Add bootph-all for memory node Apurva Nandan
2024-01-19 19:25   ` Nishanth Menon
2024-01-23 14:42     ` Apurva Nandan
2024-01-19 17:50 ` [PATCH v8 05/16] arm: mach-k3: Sort SoC JTAG_ID entries Apurva Nandan
2024-01-22 12:41   ` Roger Quadros
2024-01-19 17:50 ` [PATCH v8 06/16] soc: ti: k3-socinfo: Add entry for J784S4 SoC Apurva Nandan
2024-01-22 12:41   ` Roger Quadros
2024-01-19 17:50 ` [PATCH v8 07/16] arm: mach-k3: j784s4: Add clk and power support Apurva Nandan
2024-01-22 12:43   ` Roger Quadros
2024-01-19 17:50 ` [PATCH v8 08/16] drivers: dma: Add support for J784S4 SoC Apurva Nandan
2024-01-22 12:47   ` Roger Quadros
2024-01-23 14:51     ` Apurva Nandan
2024-01-19 17:50 ` [PATCH v8 09/16] board: ti: j784s4: Add board support for J784S4 EVM Apurva Nandan
2024-01-19 19:39   ` Nishanth Menon
2024-01-23 14:42     ` Apurva Nandan
2024-01-19 17:50 ` [PATCH v8 10/16] board: ti: j748s4: Add board config yaml files Apurva Nandan
2024-01-19 17:50 ` [PATCH v8 11/16] board: ti: j784s4: Add boot environment variables Apurva Nandan
2024-01-19 17:50 ` [PATCH v8 12/16] arm: dts: Introduce j784s4 u-boot dts files Apurva Nandan
2024-01-19 19:17   ` Nishanth Menon
2024-01-23 14:58     ` Apurva Nandan
2024-01-23 20:52       ` Nishanth Menon
2024-02-15  9:03         ` Neha Malcom Francis
2024-02-16 15:58           ` Nishanth Menon
2024-02-19  4:03             ` Neha Malcom Francis
2024-01-19 17:50 ` [PATCH v8 13/16] arm: dts: Introduce am69-sk " Apurva Nandan
2024-01-22 12:58   ` Roger Quadros
2024-01-23 14:40     ` Apurva Nandan
2024-01-19 17:50 ` [PATCH v8 14/16] configs: j784s4_evm: Add defconfig for j784s4 evm board Apurva Nandan
2024-01-19 17:50 ` [PATCH v8 15/16] configs: Add am69_sk_* defconfig fragments Apurva Nandan
2024-01-19 19:13   ` Andrew Davis
2024-01-23 14:39     ` Apurva Nandan
2024-01-23 15:01       ` Andrew Davis
2024-01-29 18:26         ` Apurva Nandan
2024-01-31 22:41           ` Andrew Davis
2024-01-19 17:50 ` [PATCH v8 16/16] doc: board: ti: k3: Add J784S4 EVM and AM69 SK documentation Apurva Nandan
2024-02-15 20:44   ` Andrew Halaney
2024-02-19  9:48     ` Apurva Nandan

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=2d566dde-5428-400e-a30e-47cb80ccf5d1@ti.com \
    --to=a-nandan@ti.com \
    --cc=a-bhatia1@ti.com \
    --cc=afd@ti.com \
    --cc=bb@ti.com \
    --cc=christian.gmeiner@gmail.com \
    --cc=hnagalla@ti.com \
    --cc=j-choudhary@ti.com \
    --cc=jh80.chung@samsung.com \
    --cc=kamlesh@ti.com \
    --cc=lukma@denx.de \
    --cc=m-chawdhry@ti.com \
    --cc=marcel.ziswiler@toradex.com \
    --cc=marek.vasut+renesas@mailbox.org \
    --cc=n-francis@ti.com \
    --cc=nm@ti.com \
    --cc=ralph.siemsen@linaro.org \
    --cc=rasmus.villemoes@prevas.dk \
    --cc=rogerq@kernel.org \
    --cc=sabiya.d@ti.com \
    --cc=seanga2@gmail.com \
    --cc=sinthu.raja@mistralsolutions.com \
    --cc=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    --cc=u-kumar1@ti.com \
    --cc=xypron.glpk@gmx.de \
    /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.