u-boot/drivers/mtd
Ezequiel Garcia 07c5cbbd1e nand: zynq: Fix driver initialization
This driver is currently broken, refusing to initialize properly.

The reason is that get_nand_dev_by_index() was being called before
nand_register(), thus returning a pointer into uninitialized memory.
In other words, the struct mtd_info used by the driver is total junk.

Fix it by getting the correct struct mtd_info, via nand_to_mtd()
on the driver's struct nand_chip.

Tested on a custom board, where the CPU is halted without this patch.

Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Reviewed-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-04-23 13:15:27 +02:00
..
nand nand: zynq: Fix driver initialization 2018-04-23 13:15:27 +02:00
onenand mtd: replace MTDDEBUG() with pr_debug() 2017-10-23 14:07:26 -04:00
spi spi: spi_flash: do not fail silently on bad user input 2018-03-22 13:25:20 -04:00
ubi Convert CONFIG_UBI_SILENCE_MSG to Kconfig 2018-03-24 06:37:25 +01:00
ubispl spl: Lightweight UBI and UBI fastmap support 2016-07-22 09:53:00 -04:00
altera_qspi.c fdt: Rename a few functions in fdt_support 2017-06-01 07:03:11 -06:00
cfi_flash.c mtd: cfi_flash: Make live-tree compatible 2018-04-16 09:55:59 +02:00
cfi_mtd.c treewide: replace #include <asm/errno.h> with <linux/errno.h> 2016-09-23 17:55:42 -04:00
ftsmc020.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
jedec_flash.c mtd: Handle 29LV800BT 2014-11-19 08:48:41 +01:00
Kconfig mtd: rpc: Add Renesas RPC Hyperflash driver 2018-04-11 23:12:00 +02:00
Makefile mtd: rpc: Add Renesas RPC Hyperflash driver 2018-04-11 23:12:00 +02:00
mtd-uclass.c dm: implement a MTD uclass 2015-11-12 08:26:58 +08:00
mtd_uboot.c mtd: uboot: Add meaningful error message 2015-11-12 13:17:28 -05:00
mtdconcat.c kbuild: force to define __UBOOT__ in all the C sources 2014-09-16 12:23:56 -04:00
mtdcore.c mtd: add mtd_ooblayout_xxx() helper functions 2017-11-29 00:28:58 +09:00
mtdcore.h mtd, ubi, ubifs: resync with Linux-3.14 2014-08-25 19:25:55 -04:00
mtdpart.c treewide: replace #include <asm/errno.h> with <linux/errno.h> 2016-09-23 17:55:42 -04:00
mw_eeprom.c Update i386 code (sc520_cdp) 2008-09-09 11:48:53 +02:00
pic32_flash.c flash: Fix spelling of "ERR_TIMOUT" 2018-01-29 07:48:59 +01:00
renesas_rpc_hf.c mtd: rpc: Add Renesas RPC Hyperflash driver 2018-04-11 23:12:00 +02:00
st_smi.c flash: complete CONFIG_SYS_NO_FLASH move with renaming 2017-02-12 14:30:25 -05:00
stm32_flash.c arch-stm32: Factorize stm32.h for STM32F4 and F7 2018-03-13 21:45:37 -04:00
stm32_flash.h stm32: stm32f4: move flash driver to mtd driver location 2016-03-26 18:49:28 -04:00