summaryrefslogtreecommitdiff
path: root/drivers/mtd/nand/raw/nand_spl_simple.c
diff options
context:
space:
mode:
authorAlexander Dahl <ada@thorsis.com>2023-09-22 12:08:56 +0300
committerEugen Hristev <eugen.hristev@collabora.com>2023-09-27 12:43:05 +0300
commitd6b4359e50bb1dc567f6596c67b25a3c7a8ff130 (patch)
tree8a1ee472774be2b58644ad7c8aa3baa5cc703b0a /drivers/mtd/nand/raw/nand_spl_simple.c
parent15155ab0a3d1f839509bcac620bfb38f950bead6 (diff)
downloadu-boot-d6b4359e50bb1dc567f6596c67b25a3c7a8ff130.tar.xz
mtd: nand: raw: atmel: Add error handling when rb-gpios missing
Adapt behaviour to Linux kernel driver. The return value of gpio_request_by_name_nodev() was not checked before, and thus in case 'rb-gpios' was missing in DT, rb.type was set to ATMEL_NAND_GPIO_RB nevertheless, leading to output like this for example (on sam9x60-curiosity with the line removed from dts): NAND: Could not find valid ONFI parameter page; aborting device found, Manufacturer ID: 0xc2, Chip ID: 0xdc Macronix NAND 512MiB 3,3V 8-bit 512 MiB, SLC, erase size: 256 KiB, page size: 4096, OOB size: 64 atmel-nand-controller nand-controller: NAND scan failed: -22 Failed to probe nand driver (err = -22) Failed to initialize NAND controller. (error -22) 0 MiB Note: not having that gpio assigned in dts is possible, the driver does not override nand_chip->dev_ready() then and a generic solution is used. Fixes: 6a8dfd57220d ("nand: atmel: Add DM based NAND driver") Signed-off-by: Alexander Dahl <ada@thorsis.com> Reviewed-by: Eugen Hristev <eugen.hristev@collabora.com> Acked-by: Michael Trimarchi <michael@amarulasolutions.com>
Diffstat (limited to 'drivers/mtd/nand/raw/nand_spl_simple.c')
0 files changed, 0 insertions, 0 deletions