From: Mattijs Korpershoek <mkorpershoek@kernel.org>
To: Ariel D'Alessandro <ariel.dalessandro@collabora.com>,
u-boot@lists.denx.de
Cc: mkorpershoek@kernel.org, trini@konsulko.com,
jerome.forissier@linaro.org, patrice.chotard@foss.st.com,
ilias.apalodimas@linaro.org, andre.przywara@arm.com,
casey.connolly@linaro.org, mwalle@kernel.org,
Ariel D'Alessandro <ariel.dalessandro@collabora.com>
Subject: Re: [PATCH v2] drivers: fastboot: Add support for SPI flash memory
Date: Thu, 17 Jul 2025 08:30:23 +0200 [thread overview]
Message-ID: <87y0sn2utc.fsf@kernel.org> (raw)
In-Reply-To: <20250715191109.329588-1-ariel.dalessandro@collabora.com>
Hi Ariel,
Thank you for the patch.
On Tue, Jul 15, 2025 at 16:11, Ariel D'Alessandro <ariel.dalessandro@collabora.com> wrote:
> Fastboot currently supports MMC and NAND flash devices. Similarly,
> extend the support to SPI flash memories.
>
> Note that in this initial implementation, partitions on the device are
> not supported yet, but raw partitions can be set in u-boot environment.
nitpick: u-boot -> U-Boot
>
> To define a raw partition descriptor, add an environment variable
> similar to the MMC case:
>
> ```
> fastboot_raw_partition_<raw partition name>=<offset> <size>
> ```
>
> for example:
>
> ```
> fastboot_raw_partition_boot=0x0 0x1000000
> ```
>
> Signed-off-by: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
> ---
> drivers/fastboot/Kconfig | 6 +-
> drivers/fastboot/Makefile | 1 +
> drivers/fastboot/fb_command.c | 8 +
> drivers/fastboot/fb_getvar.c | 6 +
> drivers/fastboot/fb_spi_flash.c | 249 ++++++++++++++++++++++++++++++++
> include/fb_spi_flash.h | 40 +++++
Can we also include a doc change to doc/android/fastboot.rst ?
The current doc mentions:
"Support for both eMMC and NAND devices is included."
We should add SPI flash to that sentence.
Maybe also mention in the "Raw partition descriptors" that this is
supported for SPI flash as well.
> 6 files changed, 309 insertions(+), 1 deletion(-)
> create mode 100644 drivers/fastboot/fb_spi_flash.c
> create mode 100644 include/fb_spi_flash.h
>
[...]
> +
> +/**
> + * fastboot_spi_flash_get_part_info() - Lookup SPI flash partition by name
> + *
> + * @part_name: Named device to lookup
> + * @part_info: Pointer to returned struct disk_partition
> + * @response: Pointer to fastboot response buffer
Can we add a Return: line to document the return code?
> + */
> +int fastboot_spi_flash_get_part_info(const char *part_name,
> + struct disk_partition *part_info,
> + char *response);
> +
> +/**
> + * fastboot_spi_flash_write() - Write image to SPI flash for fastboot
> + *
> + * @cmd: Named device to write image to
> + * @download_buffer: Pointer to image data
> + * @download_bytes: Size of image data
> + * @response: Pointer to fastboot response buffer
> + */
> +void fastboot_spi_flash_write(const char *cmd, void *download_buffer,
> + u32 download_bytes, char *response);
> +
> +/**
> + * fastboot_spi_flash_erase() - Erase SPI flash for fastboot
> + *
> + * @cmd: Named device to erase
> + * @response: Pointer to fastboot response buffer
> + */
> +void fastboot_spi_flash_erase(const char *cmd, char *response);
> +#endif
> 2.50.0
next prev parent reply other threads:[~2025-07-17 6:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-15 19:11 [PATCH v2] drivers: fastboot: Add support for SPI flash memory Ariel D'Alessandro
2025-07-17 6:30 ` Mattijs Korpershoek [this message]
2025-07-17 13:56 ` Ariel D'Alessandro
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=87y0sn2utc.fsf@kernel.org \
--to=mkorpershoek@kernel.org \
--cc=andre.przywara@arm.com \
--cc=ariel.dalessandro@collabora.com \
--cc=casey.connolly@linaro.org \
--cc=ilias.apalodimas@linaro.org \
--cc=jerome.forissier@linaro.org \
--cc=mwalle@kernel.org \
--cc=patrice.chotard@foss.st.com \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
/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.