[PATCH] mtd: spi-nor: Store stacked memories sizes in parameter array
Tudor Ambarus
tudor.ambarus at linaro.org
Mon Nov 4 09:46:21 CET 2024
On 10/28/24 8:27 AM, Prasad Kummari wrote:
> @@ -1155,7 +1155,35 @@ static int spi_nor_erase(struct mtd_info *mtd, struct erase_info *instr)
>
> if (len == mtd->size &&
> !(nor->flags & SNOR_F_NO_OP_CHIP_ERASE)) {
> - ret = spi_nor_erase_chip(nor);
> + if (nor->flags & SNOR_F_HAS_STACKED) {
> +
> + ret = 0; idx = 0;
> + while (idx < nor->num_flash) {
> + if (idx == 1) {
> + nor->spi->flags |= SPI_XFER_U_PAGE;
> + rc = write_enable(nor);
> + if (rc < 0)
> + goto erase_err;
how many levels of indentation do you have here? Please refactor your
code, this is unreadable.
More information about the U-Boot
mailing list