From: Fabio Estevam <festevam@denx.de>
To: Tudor Ambarus <tudor.ambarus@linaro.org>
Cc: Takahiro Kuwano <Takahiro.Kuwano@infineon.com>,
michael@walle.cc, pratyush@kernel.org,
linux-mtd@lists.infradead.org,
linux-arm-kernel@lists.infradead.org, bacem.daassi@infineon.com,
miquel.raynal@bootlin.com, richard@nod.at
Subject: Re: [PATCH v2 2/6] mtd: spi-nor: add erase die (chip) capability
Date: Fri, 03 Nov 2023 09:30:27 -0300 [thread overview]
Message-ID: <e665266fc1565f9d346c95215df39f12@denx.de> (raw)
In-Reply-To: <95c16eb0-a785-4a8d-bb42-c5a09b034d0a@linaro.org>
Hi Tudor,
On 03/11/2023 08:47, Tudor Ambarus wrote:
> I think I know what happens with your flash. Please try the debug patch
> from https://github.com/ambarus/linux-0day.git
> spi-nor/next-die-erase-v2-debug.
>
> I assume your flash works in 3-byte mode. The die erase cmd needs an
> extended register in 3-byte mode otherwise is ignored. Please try the
> patch and let me know if it works.
Progress: with this one, I see that the whole flash was erased:
~# flash_erase /dev/mtd0 0 0
Erasing 131072 Kibyte @ 0 -- 0 [ 39.865773] spi-nor spi0.0: *****
nor->reg_proto = 0x00010101
% complete [ 39.874441] spi-nor spi0.0: *****
[ 39.878712] spi-nor spi0.0: ***** op.cmd.nbytes = 0x01
[ 39.883983] spi-nor spi0.0: ***** op.cmd.buswidth = 0x01
[ 39.889402] spi-nor spi0.0: ***** op.cmd.opcode = 0xc4
[ 39.894648] spi-nor spi0.0: *****
[ 39.897979] spi-nor spi0.0: ***** op.addr.nbytes = 0x04
[ 39.903309] spi-nor spi0.0: ***** op.addr.buswidth = 0x01
[ 39.908810] spi-nor spi0.0: ***** op.addr.buswidth = 0x0
[ 39.914226] spi-nor spi0.0: *****
[ 39.917558] spi-nor spi0.0: ***** op.dummy.nbytes = 0x00
[ 39.922981] spi-nor spi0.0: ***** op.dummy.buswidth = 0x00
[ 39.928570] spi-nor spi0.0: *****
[ 39.931905] spi-nor spi0.0: ***** op.data.buswidth = 0x00
[ 39.937403] spi-nor spi0.0: ***** op.data.nbytes = 0
[ 157.398677] spi-nor spi0.0: ***** nor->reg_proto = 0x00010101
[ 157.404543] spi-nor spi0.0: *****
[ 157.407878] spi-nor spi0.0: ***** op.cmd.nbytes = 0x01
[ 157.413133] spi-nor spi0.0: ***** op.cmd.buswidth = 0x01
[ 157.418549] spi-nor spi0.0: ***** op.cmd.opcode = 0xc4
[ 157.423799] spi-nor spi0.0: *****
[ 157.427130] spi-nor spi0.0: ***** op.addr.nbytes = 0x04
[ 157.432461] spi-nor spi0.0: ***** op.addr.buswidth = 0x01
[ 157.437963] spi-nor spi0.0: ***** op.addr.buswidth = 0x4000000
[ 157.443900] spi-nor spi0.0: *****
[ 157.447229] spi-nor spi0.0: ***** op.dummy.nbytes = 0x00
[ 157.452648] spi-nor spi0.0: ***** op.dummy.buswidth = 0x00
[ 157.458239] spi-nor spi0.0: *****
[ 157.461558] spi-nor spi0.0: ***** op.data.buswidth = 0x00
[ 157.467066] spi-nor spi0.0: ***** op.data.nbytes = 0
Erasing 131072 Kibyte @ 0 -- 100 % complete
~# hexdump /dev/mtd0
0000000 ffff ffff ffff ffff ffff ffff ffff ffff
*
8000000
The problem I see is that the erase operation was super slow.
Please see the timestamps to get an idea.
Is this slow-erase behavior expected? Please note that the
SPI controller on the i.MX8MP does not have DMA support at the moment.
Thanks!
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
WARNING: multiple messages have this Message-ID (diff)
From: Fabio Estevam <festevam@denx.de>
To: Tudor Ambarus <tudor.ambarus@linaro.org>
Cc: Takahiro Kuwano <Takahiro.Kuwano@infineon.com>,
michael@walle.cc, pratyush@kernel.org,
linux-mtd@lists.infradead.org,
linux-arm-kernel@lists.infradead.org, bacem.daassi@infineon.com,
miquel.raynal@bootlin.com, richard@nod.at
Subject: Re: [PATCH v2 2/6] mtd: spi-nor: add erase die (chip) capability
Date: Fri, 03 Nov 2023 09:30:27 -0300 [thread overview]
Message-ID: <e665266fc1565f9d346c95215df39f12@denx.de> (raw)
In-Reply-To: <95c16eb0-a785-4a8d-bb42-c5a09b034d0a@linaro.org>
Hi Tudor,
On 03/11/2023 08:47, Tudor Ambarus wrote:
> I think I know what happens with your flash. Please try the debug patch
> from https://github.com/ambarus/linux-0day.git
> spi-nor/next-die-erase-v2-debug.
>
> I assume your flash works in 3-byte mode. The die erase cmd needs an
> extended register in 3-byte mode otherwise is ignored. Please try the
> patch and let me know if it works.
Progress: with this one, I see that the whole flash was erased:
~# flash_erase /dev/mtd0 0 0
Erasing 131072 Kibyte @ 0 -- 0 [ 39.865773] spi-nor spi0.0: *****
nor->reg_proto = 0x00010101
% complete [ 39.874441] spi-nor spi0.0: *****
[ 39.878712] spi-nor spi0.0: ***** op.cmd.nbytes = 0x01
[ 39.883983] spi-nor spi0.0: ***** op.cmd.buswidth = 0x01
[ 39.889402] spi-nor spi0.0: ***** op.cmd.opcode = 0xc4
[ 39.894648] spi-nor spi0.0: *****
[ 39.897979] spi-nor spi0.0: ***** op.addr.nbytes = 0x04
[ 39.903309] spi-nor spi0.0: ***** op.addr.buswidth = 0x01
[ 39.908810] spi-nor spi0.0: ***** op.addr.buswidth = 0x0
[ 39.914226] spi-nor spi0.0: *****
[ 39.917558] spi-nor spi0.0: ***** op.dummy.nbytes = 0x00
[ 39.922981] spi-nor spi0.0: ***** op.dummy.buswidth = 0x00
[ 39.928570] spi-nor spi0.0: *****
[ 39.931905] spi-nor spi0.0: ***** op.data.buswidth = 0x00
[ 39.937403] spi-nor spi0.0: ***** op.data.nbytes = 0
[ 157.398677] spi-nor spi0.0: ***** nor->reg_proto = 0x00010101
[ 157.404543] spi-nor spi0.0: *****
[ 157.407878] spi-nor spi0.0: ***** op.cmd.nbytes = 0x01
[ 157.413133] spi-nor spi0.0: ***** op.cmd.buswidth = 0x01
[ 157.418549] spi-nor spi0.0: ***** op.cmd.opcode = 0xc4
[ 157.423799] spi-nor spi0.0: *****
[ 157.427130] spi-nor spi0.0: ***** op.addr.nbytes = 0x04
[ 157.432461] spi-nor spi0.0: ***** op.addr.buswidth = 0x01
[ 157.437963] spi-nor spi0.0: ***** op.addr.buswidth = 0x4000000
[ 157.443900] spi-nor spi0.0: *****
[ 157.447229] spi-nor spi0.0: ***** op.dummy.nbytes = 0x00
[ 157.452648] spi-nor spi0.0: ***** op.dummy.buswidth = 0x00
[ 157.458239] spi-nor spi0.0: *****
[ 157.461558] spi-nor spi0.0: ***** op.data.buswidth = 0x00
[ 157.467066] spi-nor spi0.0: ***** op.data.nbytes = 0
Erasing 131072 Kibyte @ 0 -- 100 % complete
~# hexdump /dev/mtd0
0000000 ffff ffff ffff ffff ffff ffff ffff ffff
*
8000000
The problem I see is that the erase operation was super slow.
Please see the timestamps to get an idea.
Is this slow-erase behavior expected? Please note that the
SPI controller on the i.MX8MP does not have DMA support at the moment.
Thanks!
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-11-03 12:30 UTC|newest]
Thread overview: 82+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-01 14:58 [PATCH v2 0/6] mtd: spi-nor: introduce die erase Tudor Ambarus
2023-11-01 14:58 ` Tudor Ambarus
2023-11-01 14:58 ` [PATCH v2 1/6] mtd: spi-nor: use kernel sized types instead of c99 types Tudor Ambarus
2023-11-01 14:58 ` Tudor Ambarus
2023-11-01 14:58 ` [PATCH v2 2/6] mtd: spi-nor: add erase die (chip) capability Tudor Ambarus
2023-11-01 14:58 ` Tudor Ambarus
2023-11-01 16:04 ` Tudor Ambarus
2023-11-01 16:04 ` Tudor Ambarus
2023-11-01 16:17 ` Fabio Estevam
2023-11-01 16:17 ` Fabio Estevam
2023-11-01 17:27 ` Tudor Ambarus
2023-11-01 17:27 ` Tudor Ambarus
2023-11-02 16:43 ` Fabio Estevam
2023-11-02 16:43 ` Fabio Estevam
2023-11-02 17:36 ` Tudor Ambarus
2023-11-02 17:36 ` Tudor Ambarus
2023-11-02 17:40 ` Fabio Estevam
2023-11-02 17:40 ` Fabio Estevam
2023-11-02 17:47 ` Tudor Ambarus
2023-11-02 17:47 ` Tudor Ambarus
2023-11-02 17:54 ` Tudor Ambarus
2023-11-02 17:54 ` Tudor Ambarus
2023-11-02 17:59 ` Tudor Ambarus
2023-11-02 17:59 ` Tudor Ambarus
2023-11-02 18:01 ` Fabio Estevam
2023-11-02 18:01 ` Fabio Estevam
2023-11-02 18:21 ` Tudor Ambarus
2023-11-02 18:21 ` Tudor Ambarus
2023-11-02 18:33 ` Fabio Estevam
2023-11-02 18:33 ` Fabio Estevam
2023-11-02 18:46 ` Tudor Ambarus
2023-11-02 18:46 ` Tudor Ambarus
2023-11-02 18:56 ` Tudor Ambarus
2023-11-02 18:56 ` Tudor Ambarus
2023-11-02 21:42 ` Fabio Estevam
2023-11-02 21:42 ` Fabio Estevam
2023-11-03 11:47 ` Tudor Ambarus
2023-11-03 11:47 ` Tudor Ambarus
2023-11-03 12:30 ` Fabio Estevam [this message]
2023-11-03 12:30 ` Fabio Estevam
2023-11-03 12:53 ` Fabio Estevam
2023-11-03 12:53 ` Fabio Estevam
2023-11-03 13:26 ` Tudor Ambarus
2023-11-03 13:26 ` Tudor Ambarus
2023-11-03 13:37 ` Fabio Estevam
2023-11-03 13:37 ` Fabio Estevam
2023-11-03 13:48 ` Tudor Ambarus
2023-11-03 13:48 ` Tudor Ambarus
2023-11-03 14:16 ` Fabio Estevam
2023-11-03 14:16 ` Fabio Estevam
2023-11-03 14:37 ` Tudor Ambarus
2023-11-03 14:37 ` Tudor Ambarus
2023-11-03 14:58 ` Fabio Estevam
2023-11-03 14:58 ` Fabio Estevam
2023-11-06 14:24 ` Tudor Ambarus
2023-11-06 14:24 ` Tudor Ambarus
2023-11-06 9:34 ` Michael Walle
2023-11-06 9:34 ` Michael Walle
2023-11-06 14:23 ` Tudor Ambarus
2023-11-06 14:23 ` Tudor Ambarus
2023-11-06 14:56 ` Tudor Ambarus
2023-11-06 14:56 ` Tudor Ambarus
2023-11-09 9:09 ` Michael Walle
2023-11-09 9:09 ` Michael Walle
2023-11-15 7:06 ` Tudor Ambarus
2023-11-15 7:06 ` Tudor Ambarus
2023-11-08 8:06 ` Takahiro Kuwano
2023-11-08 8:06 ` Takahiro Kuwano
2023-11-08 8:54 ` Tudor Ambarus
2023-11-08 8:54 ` Tudor Ambarus
2023-11-01 14:58 ` [PATCH v2 3/6] mtd: spi-nor: spansion: enable die erase for multi die flashes Tudor Ambarus
2023-11-01 14:58 ` Tudor Ambarus
2023-11-01 14:58 ` [PATCH v2 4/6] mtd: spi-nor: micron-st: " Tudor Ambarus
2023-11-01 14:58 ` Tudor Ambarus
2023-11-01 14:58 ` [PATCH v2 5/6] mtd: spi-nor: remove NO_CHIP_ERASE flag Tudor Ambarus
2023-11-01 14:58 ` Tudor Ambarus
2023-11-01 14:58 ` [PATCH v2 6/6] mtd: spi-nor: micron-st: Add support for mt25qu01g Tudor Ambarus
2023-11-01 14:58 ` Tudor Ambarus
2023-11-01 15:54 ` [PATCH v2 0/6] mtd: spi-nor: introduce die erase Fabio Estevam
2023-11-01 15:54 ` Fabio Estevam
2023-11-15 6:10 ` Re (subset): " Tudor Ambarus
2023-11-15 6:10 ` Tudor Ambarus
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=e665266fc1565f9d346c95215df39f12@denx.de \
--to=festevam@denx.de \
--cc=Takahiro.Kuwano@infineon.com \
--cc=bacem.daassi@infineon.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mtd@lists.infradead.org \
--cc=michael@walle.cc \
--cc=miquel.raynal@bootlin.com \
--cc=pratyush@kernel.org \
--cc=richard@nod.at \
--cc=tudor.ambarus@linaro.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 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.