flash.h 1023 B

1234567891011121314151617181920212223242526272829303132
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef LINUX_SPI_FLASH_H
  3. #define LINUX_SPI_FLASH_H
  4. struct mtd_partition;
  5. /**
  6. * struct flash_platform_data: board-specific flash data
  7. * @name: optional flash device name (eg, as used with mtdparts=)
  8. * @parts: optional array of mtd_partitions for static partitioning
  9. * @nr_parts: number of mtd_partitions for static partitioning
  10. * @type: optional flash device type (e.g. m25p80 vs m25p64), for use
  11. * with chips that can't be queried for JEDEC or other IDs
  12. *
  13. * Board init code (in arch/.../mach-xxx/board-yyy.c files) can
  14. * provide information about SPI flash parts (such as DataFlash) to
  15. * help set up the device and its appropriate default partitioning.
  16. *
  17. * Note that for DataFlash, sizes for pages, blocks, and sectors are
  18. * rarely powers of two; and partitions should be sector-aligned.
  19. */
  20. struct flash_platform_data {
  21. char *name;
  22. struct mtd_partition *parts;
  23. unsigned int nr_parts;
  24. char *type;
  25. /* we'll likely add more ... use JEDEC IDs, etc */
  26. };
  27. #endif