u-boot/drivers/mtd
Michael Trimarchi c21b0ca525 mtd: nand: make Samsung SLC NAND usable again
Upstream linux commit 69fc01296c9281

commit a1286a1fc4 ("mtd: nand: Move Samsung specific init/detection
logic in nand_samsung.c") introduced a regression for Samsung SLC NAND
chips. Prior to this commit chip->bits_per_cell was initialized by calling
nand_get_bits_per_cell() before using nand_is_slc().
With the offending commit this call is skipped, leaving
chip->bits_per_cell cleared to zero when the manufacturer specific
'.detect' function calls nand_is_slc() which in turn interprets
bits_per_cell != 1 as indication for an MLC chip.
The effect is that e.g. a K9F1G08U0F NAND chip is falsely detected as
MLC NAND with 4KiB page size rather than SLC with 2KiB page size.

Add a call to nand_get_bits_per_cell() before calling the .detect hook
function in nand_manufacturer_detect(), so that the nand_is_slc()
calls in the manufacturer specific code will return correct results.

Reported-by: Marcin Gołaś <marcingol30@gmail.com>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Reviewed-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Link: https://lore.kernel.org/all/20221021060536.11747-1-michael@amarulasolutions.com
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2022-12-10 14:35:55 +01:00
..
nand mtd: nand: make Samsung SLC NAND usable again 2022-12-10 14:35:55 +01:00
onenand cyclic: Use schedule() instead of WATCHDOG_RESET() 2022-09-18 10:26:33 +02:00
spi mtd: spi-nor-core: Invert logic to reflect sst26 flash unlocked 2022-12-05 10:01:45 +01:00
ubi ubifs: Use U-Boot assert() from <log.h> in UBI/UBIFS code 2022-07-20 05:50:13 +02:00
ubispl drivers/mtd/ubispl/ubispl.c: Fix spelling of "mismatched". 2022-01-13 07:57:49 -05:00
altera_qspi.c mtd: Remove mtd_erase_callback() entirely 2021-10-23 15:47:33 +05:30
cfi_flash.c cyclic: Use schedule() instead of WATCHDOG_RESET() 2022-09-18 10:26:33 +02:00
cfi_mtd.c mtd: cfi_mtd: populate mtd->dev with flash_info->dev 2022-02-01 10:56:25 +01:00
hbmc-am654.c dm: treewide: Rename auto_alloc_size members to be shorter 2020-12-13 08:00:25 -07:00
jedec_flash.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
Kconfig Convert CONFIG_SYS_FLASH_QUIET_TEST to Kconfig 2022-08-04 16:18:47 -04:00
Makefile flash: Remove pic32_flash.c 2022-08-04 16:18:47 -04:00
mtd-uclass.c dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
mtd_uboot.c doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
mtdconcat.c mtd: Remove mtd_erase_callback() entirely 2021-10-23 15:47:33 +05:30
mtdcore.c doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
mtdcore.h mtd: move definitions to enlarge their range 2018-09-20 20:10:49 +05:30
mtdpart.c dm: core: Drop ofnode_is_available() 2022-09-29 16:11:31 -04:00
renesas_rpc_hf.c renesas: Fix RPC-IF compatible values 2022-09-02 13:25:01 +02:00
stm32_flash.c common: Drop flash.h from common header 2020-05-18 14:53:28 -04:00
stm32_flash.h stm32: stm32f4: move flash driver to mtd driver location 2016-03-26 18:49:28 -04:00