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

Michal Simek michal.simek at xilinx.com
Fri Apr 20 07:49:32 UTC 2018


Hi Ezequiel,

On 19.4.2018 17:16, Ezequiel Garcia wrote:
> 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.

My initial goal was to send it without my SoB line but my good git setup
is adding it automatically. I didn't touch your patches that's why I
wanted to say that I have reviewed it and at the end my SoB line will be
there too because it will go via my tree.

Thanks,
Michal




More information about the U-Boot mailing list