flash.h 839 B

123456789101112131415161718192021222324252627
  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. *
  10. * Board init code (in arch/.../mach-xxx/board-yyy.c files) can
  11. * provide information about SPI flash parts (such as DataFlash) to
  12. * help set up the device and its appropriate default partitioning.
  13. *
  14. * Note that for DataFlash, sizes for pages, blocks, and sectors are
  15. * rarely powers of two; and partitions should be sector-aligned.
  16. */
  17. struct flash_platform_data {
  18. char *name;
  19. struct mtd_partition *parts;
  20. unsigned int nr_parts;
  21. /* we'll likely add more ... use JEDEC IDs, etc */
  22. };
  23. #endif