fb_nand.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Copyright 2014 Broadcom Corporation.
  4. * Copyright 2015 Free Electrons.
  5. */
  6. #ifndef _FB_NAND_H_
  7. #define _FB_NAND_H_
  8. #include <jffs2/load_kernel.h>
  9. /**
  10. * fastboot_nand_get_part_info() - Lookup NAND partion by name
  11. *
  12. * @part_name: Named device to lookup
  13. * @part_info: Pointer to returned part_info pointer
  14. * @response: Pointer to fastboot response buffer
  15. */
  16. int fastboot_nand_get_part_info(const char *part_name,
  17. struct part_info **part_info, char *response);
  18. /**
  19. * fastboot_nand_flash_write() - Write image to NAND for fastboot
  20. *
  21. * @cmd: Named device to write image to
  22. * @download_buffer: Pointer to image data
  23. * @download_bytes: Size of image data
  24. * @response: Pointer to fastboot response buffer
  25. */
  26. void fastboot_nand_flash_write(const char *cmd, void *download_buffer,
  27. u32 download_bytes, char *response);
  28. /**
  29. * fastboot_nand_flash_erase() - Erase NAND for fastboot
  30. *
  31. * @cmd: Named device to erase
  32. * @response: Pointer to fastboot response buffer
  33. */
  34. void fastboot_nand_erase(const char *cmd, char *response);
  35. #endif