From: Tom Rini <trini@konsulko.com>
To: Patrick Delaunay <patrick.delaunay@foss.st.com>
Cc: u-boot@lists.denx.de, "Pali Rohár" <pali@kernel.org>,
"Marek Vasut" <marex@denx.de>,
"Jagan Teki" <jagan@amarulasolutions.com>,
"Christophe KERELLO" <christophe.kerello@foss.st.com>,
"Miquel Raynal" <miquel.raynal@bootlin.com>,
"Priyanka Jain" <priyanka.jain@nxp.com>,
"Patrice Chotard" <patrice.chotard@foss.st.com>,
"Heiko Schocher" <hs@denx.de>, "Marek Behún" <marek.behun@nic.cz>,
"Simon Glass" <sjg@chromium.org>, "Vignesh R" <vigneshr@ti.com>,
"U-Boot STM32" <uboot-stm32@st-md-mailman.stormreply.com>
Subject: Re: [PATCH v4 2/2] mtd: spi: nor: force mtd name to "nor%d"
Date: Tue, 28 Sep 2021 14:45:20 -0400 [thread overview]
Message-ID: <20210928184520.GX31748@bill-the-cat> (raw)
In-Reply-To: <20210922182841.v4.2.Ia461e670c7438478aa8f8939209d45c818ccd284@changeid>
[-- Attachment #1: Type: text/plain, Size: 2469 bytes --]
On Wed, Sep 22, 2021 at 06:29:08PM +0200, Patrick Delaunay wrote:
> Force the mtd name of spi-nor to "nor" + the driver sequence number:
> "nor0", "nor1"... beginning after the existing nor devices.
>
> This patch is coherent with existing "nand" and "spi-nand"
> mtd device names.
>
> When CFI MTD NOR device are supported, the spi-nor index is chosen after
> the last CFI device defined by CONFIG_SYS_MAX_FLASH_BANKS.
>
> When CONFIG_SYS_MAX_FLASH_BANKS_DETECT is activated, this config
> is replaced by to cfi_flash_num_flash_banks in the include file
> mtd/cfi_flash.h.
>
> This generic name "nor%d" can be use to identify the mtd spi-nor device
> without knowing the real device name or the DT path of the device,
> used with API get_mtd_device_nm() and is used in mtdparts command.
>
> This patch also avoids issue when the same NOR device is present 2 times,
> for example on STM32MP15F-EV1:
>
> STM32MP> mtd list
> SF: Detected mx66l51235l with page size 256 Bytes, erase size 64 KiB, \
> total 64 MiB
>
> List of MTD devices:
> * nand0
> - type: NAND flash
> - block size: 0x40000 bytes
> - min I/O: 0x1000 bytes
> - OOB size: 224 bytes
> - OOB available: 118 bytes
> - ECC strength: 8 bits
> - ECC step size: 512 bytes
> - bitflip threshold: 6 bits
> - 0x000000000000-0x000040000000 : "nand0"
> * mx66l51235l
> - device: mx66l51235l@0
> - parent: spi@58003000
> - driver: jedec_spi_nor
> - path: /soc/spi@58003000/mx66l51235l@0
> - type: NOR flash
> - block size: 0x10000 bytes
> - min I/O: 0x1 bytes
> - 0x000000000000-0x000004000000 : "mx66l51235l"
> * mx66l51235l
> - device: mx66l51235l@1
> - parent: spi@58003000
> - driver: jedec_spi_nor
> - path: /soc/spi@58003000/mx66l51235l@1
> - type: NOR flash
> - block size: 0x10000 bytes
> - min I/O: 0x1 bytes
> - 0x000000000000-0x000004000000 : "mx66l51235l"
>
> The same mtd name "mx66l51235l" identify the 2 instances
> mx66l51235l@0 and mx66l51235l@1.
>
> This patch fixes a ST32CubeProgrammer / stm32prog command issue
> with nor0 target on STM32MP157C-EV1 board introduced by
> commit b7f060565e31 ("mtd: spi-nor: allow registering multiple MTDs when
> DM is enabled").
>
> Fixes: b7f060565e31 ("mtd: spi-nor: allow registering multiple MTDs when DM is enabled")
> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Applied to u-boot/master, thanks!
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
next prev parent reply other threads:[~2021-09-28 18:46 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-22 16:29 [PATCH v4 0/2] mtd: spi: nor: force mtd name to "nor%d" Patrick Delaunay
2021-09-22 16:29 ` [PATCH v4 1/2] mtd: cfi_flash: use cfi_flash_num_flash_banks only when supported Patrick Delaunay
2021-09-28 18:45 ` Tom Rini
2021-09-22 16:29 ` [PATCH v4 2/2] mtd: spi: nor: force mtd name to "nor%d" Patrick Delaunay
2021-09-28 18:45 ` Tom Rini [this message]
2021-09-22 17:29 ` [PATCH v4 0/2] " Marek Behún
2021-09-22 18:24 ` Marek Vasut
2021-09-22 18:42 ` Tom Rini
2021-09-22 19:08 ` Marek Behún
2021-09-22 19:12 ` Marek Vasut
2021-09-22 19:05 ` Marek Behún
2021-09-22 19:23 ` Tom Rini
2021-09-22 19:39 ` Marek Vasut
2021-09-22 19:24 ` Marek Vasut
2021-09-22 19:41 ` Tom Rini
2021-09-22 19:42 ` Tom Rini
2021-09-22 19:46 ` Tom Rini
2021-09-22 19:56 ` Marek Vasut
2021-09-22 20:00 ` Tom Rini
2021-09-23 1:32 ` Marek Vasut
2021-09-23 9:04 ` Patrick DELAUNAY
2021-09-24 18:22 ` Tom Rini
2021-09-24 19:25 ` Marek Behún
2021-09-24 20:09 ` Marek Vasut
2021-09-25 0:12 ` Marek Behún
2021-09-25 3:06 ` Marek Vasut
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=20210928184520.GX31748@bill-the-cat \
--to=trini@konsulko.com \
--cc=christophe.kerello@foss.st.com \
--cc=hs@denx.de \
--cc=jagan@amarulasolutions.com \
--cc=marek.behun@nic.cz \
--cc=marex@denx.de \
--cc=miquel.raynal@bootlin.com \
--cc=pali@kernel.org \
--cc=patrice.chotard@foss.st.com \
--cc=patrick.delaunay@foss.st.com \
--cc=priyanka.jain@nxp.com \
--cc=sjg@chromium.org \
--cc=u-boot@lists.denx.de \
--cc=uboot-stm32@st-md-mailman.stormreply.com \
--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;
as well as URLs for NNTP newsgroup(s).