mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
To: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: Lorenzo Bianconi <lorenzo@kernel.org>,
	Ray Liu <ray.liu@airoha.com>, Mark Brown <broonie@kernel.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	Andy Shevchenko <andy@kernel.org>,
	linux-arm-kernel@lists.infradead.org, linux-spi@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-mediatek@lists.infradead.org,
	Andreas Gnau <andreas.gnau@iopsys.eu>
Subject: Re: [PATCH v4 1/3] spi: airoha-snfi: en7523: workaround flash damaging if UART_TXD was short to GND
Date: Tue, 25 Nov 2025 13:04:12 +0300	[thread overview]
Message-ID: <83a15a9d-8dfa-4949-b483-020bbcf0847a@iopsys.eu> (raw)
In-Reply-To: <aSVYShXLirW--bYe@smile.fi.intel.com>


On 11/25/25 10:18, Andy Shevchenko wrote:
> On Tue, Nov 25, 2025 at 05:10:49AM +0300, Mikhail Kshevetskiy wrote:
>> Airoha EN7523 specific bug
>> --------------------------
>> We found that some serial console may pull TX line to GROUND during board
>> boot time. Airoha uses TX line as one of it's BOOT pins.
> I know the term bootstrap, what does BOOT mean?

yes, it's bootstrap pin

>
>> On the EN7523 SoC this may lead to booting in RESERVED boot mode.
>>
>> It was found that some flashes operates incorrectly in RESERVED mode.
>> Micron and Skyhigh flashes are definitely affected by the issue,
>> Winbond flashes are NOT affected.
> NOT --> not
will fix
>
>> Details:
>> --------
>> DMA reading of odd pages on affected flashes operates incorrectly. Page
>> reading offset (start of the page) on hardware level is replaced by 0x10.
>> Thus results in incorrect data reading. As result OS loading becomes
>> impossible.
>>
>> Usage of UBI make things even worse. On attaching, UBI will detects
>> corruptions (because of wrong reading of odd pages) and will try to
>> recover. For recovering UBI will erase and write 'damaged' blocks with
>> a valid information. This will destroy all UBI data.
>>
>> Non-DMA reading is OK.
>>
>> This patch detects booting in reserved mode, turn off DMA and print big
>> fat warning.
> ...
>
>> -	err = dma_set_mask(as_ctrl->dev, DMA_BIT_MASK(32));
>> -	if (err)
>> -		return err;
>> +	if (dma_enable) {
>> +		err = dma_set_mask(as_ctrl->dev, DMA_BIT_MASK(32));
>> +		if (err)
>> +			return err;
>> +	}
> Why do you need this to be conditional? The settings of DMA mask should not
> affect the (in)ability of the device to perform DMA. I.o.w. it should not
> influence PIO mode. Can you confirm this?
>
no any particular reason, just see no sense to set mask if dma will not
be used


Regards,

Mikhail Kshevetskiy 


  reply	other threads:[~2025-11-25 10:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-25  2:10 [PATCH v4 0/3] spi: airoha: add support of en7523 SoC (for 6.19) Mikhail Kshevetskiy
2025-11-25  2:10 ` [PATCH v4 1/3] spi: airoha-snfi: en7523: workaround flash damaging if UART_TXD was short to GND Mikhail Kshevetskiy
2025-11-25  7:18   ` Andy Shevchenko
2025-11-25 10:04     ` Mikhail Kshevetskiy [this message]
2025-11-25 10:14       ` Andy Shevchenko
2025-11-25 14:20         ` Mikhail Kshevetskiy
2025-11-25 18:41           ` Andy Shevchenko
2025-11-25  2:10 ` [PATCH v4 2/3] dt-bindings: spi: airoha: add compatible for EN7523 Mikhail Kshevetskiy
2025-11-25  2:10 ` [PATCH v4 3/3] arm: dts: airoha: en7523: add SNAND node Mikhail Kshevetskiy

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=83a15a9d-8dfa-4949-b483-020bbcf0847a@iopsys.eu \
    --to=mikhail.kshevetskiy@iopsys.eu \
    --cc=andreas.gnau@iopsys.eu \
    --cc=andriy.shevchenko@intel.com \
    --cc=andy@kernel.org \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=lorenzo@kernel.org \
    --cc=matthias.bgg@gmail.com \
    --cc=ray.liu@airoha.com \
    --cc=robh@kernel.org \
    /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

all inboxes | Powered by JetHome®