U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: "Abbarapu, Venkatesh" <venkatesh.abbarapu@amd.com>,
	"u-boot@lists.denx.de" <u-boot@lists.denx.de>,
	"tudor.ambarus@linaro.org" <tudor.ambarus@linaro.org>,
	"j-humphreys@ti.com" <j-humphreys@ti.com>
Cc: "Simek, Michal" <michal.simek@amd.com>,
	"jagan@amarulasolutions.com" <jagan@amarulasolutions.com>,
	"vigneshr@ti.com" <vigneshr@ti.com>,
	"u-kumar1@ti.com" <u-kumar1@ti.com>,
	"trini@konsulko.com" <trini@konsulko.com>,
	"seanga2@gmail.com" <seanga2@gmail.com>,
	"caleb.connolly@linaro.org" <caleb.connolly@linaro.org>,
	"sjg@chromium.org" <sjg@chromium.org>,
	"william.zhang@broadcom.com" <william.zhang@broadcom.com>,
	"stefan_b@posteo.net" <stefan_b@posteo.net>,
	"quentin.schulz@cherry.de" <quentin.schulz@cherry.de>,
	"Takahiro.Kuwano@infineon.com" <Takahiro.Kuwano@infineon.com>,
	"p-mantena@ti.com" <p-mantena@ti.com>,
	"git (AMD-Xilinx)" <git@amd.com>
Subject: Re: [PATCH v3] mtd: spi-nor: Fix the spi_nor_read() when config SPI_STACKED_PARALLEL is enabled
Date: Wed, 25 Dec 2024 21:20:58 +0100	[thread overview]
Message-ID: <148a7bd2-a243-4964-948d-abd3545b9e41@denx.de> (raw)
In-Reply-To: <SA1PR12MB86971D338EE7CCDED324172D98032@SA1PR12MB8697.namprd12.prod.outlook.com>

On 12/24/24 4:34 PM, Abbarapu, Venkatesh wrote:

[...]

>>> @@ -1593,18 +1595,23 @@ static int spi_nor_read(struct mtd_info *mtd, loff_t
>> from, size_t len,
>>>    	}
>>>
>>>    	while (len) {
>>> -		bank = (u32)from / SZ_16M;
>>> -		if (nor->flags & SNOR_F_HAS_PARALLEL)
>>> -			bank /= 2;
>>> -
>>> -		rem_bank_len = SZ_16M * (bank + 1);
>>> -		if (nor->flags & SNOR_F_HAS_PARALLEL)
>>> -			rem_bank_len *= 2;
>>> -		rem_bank_len -= from;
>>> -
>>> +		size_t read_len = len;
>>
>> size_t read_len should be declared at the beginning of this function.
>>
>>>    		offset = from;
>>>
>>> +	if (CONFIG_IS_ENABLED(SPI_STACKED_PARALLEL)) {
>>
>> The indent here needs to be pushed on tab RIGHT -> .
>>
>> Do you need this functionality in SPL ? If so, you might need a matching Kconfig
>> SPL_SPI_STACKED_PARALLEL symbol .
> 
> This functionality is not needed for SPL.

So SPL does use SPI NOR in non-stacked/parallel mode, and U-Boot does 
use it in stacked/parallel mode ? Doesn't that pose a problem ?

[...]

> FLASH_BAR and stacked parallel configuration doesn’t depend on each other.
Is the use of BAR register and stacked/parallel mode mutually exclusive 
or can they be used together ?

  reply	other threads:[~2024-12-25 20:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-20 14:30 [PATCH v3] mtd: spi-nor: Fix the spi_nor_read() when config SPI_STACKED_PARALLEL is enabled Venkatesh Yadav Abbarapu
2024-12-23 16:52 ` Marek Vasut
2024-12-24 15:34   ` Abbarapu, Venkatesh
2024-12-25 20:20     ` Marek Vasut [this message]
2024-12-26  3:30       ` Abbarapu, Venkatesh

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=148a7bd2-a243-4964-948d-abd3545b9e41@denx.de \
    --to=marex@denx.de \
    --cc=Takahiro.Kuwano@infineon.com \
    --cc=caleb.connolly@linaro.org \
    --cc=git@amd.com \
    --cc=j-humphreys@ti.com \
    --cc=jagan@amarulasolutions.com \
    --cc=michal.simek@amd.com \
    --cc=p-mantena@ti.com \
    --cc=quentin.schulz@cherry.de \
    --cc=seanga2@gmail.com \
    --cc=sjg@chromium.org \
    --cc=stefan_b@posteo.net \
    --cc=trini@konsulko.com \
    --cc=tudor.ambarus@linaro.org \
    --cc=u-boot@lists.denx.de \
    --cc=u-kumar1@ti.com \
    --cc=venkatesh.abbarapu@amd.com \
    --cc=vigneshr@ti.com \
    --cc=william.zhang@broadcom.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