/* @cmd: Named device to erase @response: Pointer to fastboot response buffer  */
void fastboot_nand_erase(const char *cmd, char *response)
/* @cmd: Named device to erase @response: Pointer to fastboot response buffer  */
void fastboot_nand_erase(const char *cmd, char *response)
{
	struct part_info *part;
	struct mtd_info *mtd = NULL;
	int ret;
	ret = fb_nand_lookup(cmd, &mtd, &part, response);
	if (ret) {
		pr_err("invalid NAND device");
		fastboot_fail("invalid NAND device", response);
		return;
	}
	ret = board_fastboot_erase_partition_setup(part->name);
	if (ret)
		return;
	ret = _fb_nand_erase(mtd, part);
	if (ret) {
		pr_err("failed erasing from device %s", mtd->name);
		fastboot_fail("failed erasing from device", response);
		return;
	}
	fastboot_okay(NULL, response);
}