[U-Boot] [PATCH 1/2] nand: zynq: Fix driver initialization

Ezequiel Garcia ezequiel at vanguardiasur.com.ar
Thu Apr 19 15:16:40 UTC 2018


Hi Michal,

On 19 April 2018 at 08:10, Michal Simek <michal.simek at xilinx.com> wrote:
> From: Ezequiel Garcia <ezequiel at vanguardiasur.com.ar>
>
> 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 at vanguardiasur.com.ar>
> Reviewed-by: Michal Simek <michal.simek at xilinx.com>
> Signed-off-by: Michal Simek <michal.simek at xilinx.com>

Thanks for collecting these and submitting them!

BTW, I thought there was no need for a reviewed-by on top
of a signed-off-by. It's kind of assumed that if you are signing
something, you have reviewed it in the first place.

Or at least that's how I've been doing it.
-- 
Ezequiel GarcĂ­a, VanguardiaSur
www.vanguardiasur.com.ar


More information about the U-Boot mailing list