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