No, you cannot do this. Some drivers will provide their own cmdfunc,ok. got it.
so nand_command_lp() is unexpected for those drivers.
Your problem seems, instead, that you are executing this function tooyes. This is just the case i meet.
early, before nand_flash_get_type() is able to assign
nand_command_lp() to be your cmdfunc. You might just want to call thisI will send a fix patch about this patch.
function after the following lines in nand_flash_get_type():
/* Do not replace user supplied command function! */
if (mtd->writesize> 512&& chip->cmdfunc == nand_command)
chip->cmdfunc = nand_command_lp;