fb_mmc.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Copyright 2014 Broadcom Corporation.
  4. */
  5. #ifndef _FB_MMC_H_
  6. #define _FB_MMC_H_
  7. struct blk_desc;
  8. struct disk_partition;
  9. /**
  10. * fastboot_mmc_get_part_info() - Lookup eMMC partion by name
  11. *
  12. * @part_name: Named partition to lookup
  13. * @dev_desc: Pointer to returned blk_desc pointer
  14. * @part_info: Pointer to returned struct disk_partition
  15. * @response: Pointer to fastboot response buffer
  16. */
  17. int fastboot_mmc_get_part_info(const char *part_name,
  18. struct blk_desc **dev_desc,
  19. struct disk_partition *part_info,
  20. char *response);
  21. /**
  22. * fastboot_mmc_flash_write() - Write image to eMMC for fastboot
  23. *
  24. * @cmd: Named partition to write image to
  25. * @download_buffer: Pointer to image data
  26. * @download_bytes: Size of image data
  27. * @response: Pointer to fastboot response buffer
  28. */
  29. void fastboot_mmc_flash_write(const char *cmd, void *download_buffer,
  30. u32 download_bytes, char *response);
  31. /**
  32. * fastboot_mmc_flash_erase() - Erase eMMC for fastboot
  33. *
  34. * @cmd: Named partition to erase
  35. * @response: Pointer to fastboot response buffer
  36. */
  37. void fastboot_mmc_erase(const char *cmd, char *response);
  38. #endif