All of lore.kernel.org
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Chuanhong Guo <gch981213@gmail.com>
Cc: SkyLake Huang <SkyLake.Huang@mediatek.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
	"mmkurbanov@salutedevices.com" <mmkurbanov@salutedevices.com>,
	"kernel@sberdevices.ru" <kernel@sberdevices.ru>,
	 "d-gole@ti.com" <d-gole@ti.com>,
	 "dev@kicherer.org" <dev@kicherer.org>,
	"vigneshr@ti.com" <vigneshr@ti.com>,
	 "richard@nod.at" <richard@nod.at>
Subject: Re: [PATCH v2] mtd: spinand: add support for FORESEE F35SQA002G
Date: Mon, 18 Nov 2024 08:43:56 +0100	[thread overview]
Message-ID: <87ttc5c7gj.fsf@bootlin.com> (raw)
In-Reply-To: <CAJsYDVLYE1=sAj5Pvni17xQ=4akFCA+UqtuB5RKq77HxL4ux9w@mail.gmail.com> (Chuanhong Guo's message of "Wed, 13 Nov 2024 18:10:20 +0800")

Hello,

> Several SPI-MEM controller don't allow software controlled CS, or for some
> other reasons are unable to execute a longer spi-mem op.
> spi_mem_dirmap_write returns the actual request size it's able to make,
> and spinand_write_to_cache_op use a while loop to split one update_cache
> request into multiple ones.
>
> This only works using the Random Program Load instruction (84h/34h)
> which preserves the previous written data in the flash data cache.
> All current supported flashes are exclusively using 84h/34h as the command
> to write the page cache.
>
> Load Program Data(02h/32h) will clear the entire page cache. As a
> result, when a request is split as described above, the previous written
> data will be cleared, breaking the page cache writing procedure.
>
> We can change write_to_cache_op to use Load Program Data on the
> first request. If that doesn't finish writing, use Random Program Load
> on subsequent data loading.

Sounds reasonable indeed, feel free to send a patch.

Thanks,
Miquèl

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

WARNING: multiple messages have this Message-ID (diff)
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Chuanhong Guo <gch981213@gmail.com>
Cc: SkyLake Huang <SkyLake.Huang@mediatek.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
	"mmkurbanov@salutedevices.com" <mmkurbanov@salutedevices.com>,
	"kernel@sberdevices.ru" <kernel@sberdevices.ru>,
	 "d-gole@ti.com" <d-gole@ti.com>,
	 "dev@kicherer.org" <dev@kicherer.org>,
	"vigneshr@ti.com" <vigneshr@ti.com>,
	 "richard@nod.at" <richard@nod.at>
Subject: Re: [PATCH v2] mtd: spinand: add support for FORESEE F35SQA002G
Date: Mon, 18 Nov 2024 08:43:56 +0100	[thread overview]
Message-ID: <87ttc5c7gj.fsf@bootlin.com> (raw)
In-Reply-To: <CAJsYDVLYE1=sAj5Pvni17xQ=4akFCA+UqtuB5RKq77HxL4ux9w@mail.gmail.com> (Chuanhong Guo's message of "Wed, 13 Nov 2024 18:10:20 +0800")

Hello,

> Several SPI-MEM controller don't allow software controlled CS, or for some
> other reasons are unable to execute a longer spi-mem op.
> spi_mem_dirmap_write returns the actual request size it's able to make,
> and spinand_write_to_cache_op use a while loop to split one update_cache
> request into multiple ones.
>
> This only works using the Random Program Load instruction (84h/34h)
> which preserves the previous written data in the flash data cache.
> All current supported flashes are exclusively using 84h/34h as the command
> to write the page cache.
>
> Load Program Data(02h/32h) will clear the entire page cache. As a
> result, when a request is split as described above, the previous written
> data will be cleared, breaking the page cache writing procedure.
>
> We can change write_to_cache_op to use Load Program Data on the
> first request. If that doesn't finish writing, use Random Program Load
> on subsequent data loading.

Sounds reasonable indeed, feel free to send a patch.

Thanks,
Miquèl

  reply	other threads:[~2024-11-18  7:44 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-08 16:34 [PATCH net-next v3 0/5] Re-organize MediaTek ethernet phy drivers and propose mtk-phy-lib Sky Huang
2024-11-08 16:34 ` [PATCH net-next v3 1/5] net: phy: mediatek: Re-organize MediaTek ethernet phy drivers Sky Huang
2024-11-08 16:34 ` [PATCH net-next v3 2/5] net: phy: mediatek: Move LED helper functions into mtk phy lib Sky Huang
2024-11-08 16:34 ` [PATCH net-next v3 3/5] net: phy: mediatek: Improve readability of mtk-phy-lib.c's mtk_phy_led_hw_ctrl_set() Sky Huang
2024-11-12 10:08   ` [PATCH v2] mtd: spinand: add support for FORESEE F35SQA002G SkyLake Huang (黃啟澤)
2024-11-12 10:08     ` SkyLake Huang (黃啟澤)
2024-11-12 10:48     ` Miquel Raynal
2024-11-12 10:48       ` Miquel Raynal
2024-11-12 11:25       ` SkyLake Huang (黃啟澤)
2024-11-12 11:25         ` SkyLake Huang (黃啟澤)
2024-11-13  9:05         ` Miquel Raynal
2024-11-13  9:05           ` Miquel Raynal
2024-11-13 10:10           ` Chuanhong Guo
2024-11-13 10:10             ` Chuanhong Guo
2024-11-18  7:43             ` Miquel Raynal [this message]
2024-11-18  7:43               ` Miquel Raynal
2024-11-19 10:29             ` SkyLake Huang (黃啟澤)
2024-11-19 10:29               ` SkyLake Huang (黃啟澤)
2024-11-08 16:34 ` [PATCH net-next v3 4/5] net: phy: mediatek: Integrate read/write page helper functions Sky Huang
2024-11-08 16:34 ` [PATCH net-next v3 5/5] net: phy: mediatek: add MT7530 & MT7531's PHY ID macros Sky Huang
2024-11-13 13:10 ` [PATCH net-next v3 0/5] Re-organize MediaTek ethernet phy drivers and propose mtk-phy-lib patchwork-bot+netdevbpf
  -- strict thread matches above, loose matches on Subject: below --
2023-10-02 14:04 [PATCH v2] mtd: spinand: add support for FORESEE F35SQA002G Martin Kurbanov
2023-10-02 14:04 ` Martin Kurbanov
2023-10-16  9:29 ` Miquel Raynal
2023-10-16  9:29   ` Miquel Raynal

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=87ttc5c7gj.fsf@bootlin.com \
    --to=miquel.raynal@bootlin.com \
    --cc=SkyLake.Huang@mediatek.com \
    --cc=d-gole@ti.com \
    --cc=dev@kicherer.org \
    --cc=gch981213@gmail.com \
    --cc=kernel@sberdevices.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=mmkurbanov@salutedevices.com \
    --cc=richard@nod.at \
    --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 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.