[U-Boot] [RESEND PATCH v4 2/3] mtd, nand: move common functions from cmd_nand.c to common place