flash.h 983 B

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