[U-Boot] [PATCH 2/5] cmd_nand: some infrastructure fixes and refactoring