blob: 2401a0887209bf15e0b8f5f5a88dab45823548cd [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
David Brownell1d6432f2006-01-08 13:34:22 -08002#ifndef LINUX_SPI_FLASH_H
3#define LINUX_SPI_FLASH_H
4
5struct 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
Masahiro Yamada8ab102d2017-02-27 14:28:55 -080011 * @nr_parts: number of mtd_partitions for static partitioning
Mike Lavender2f9f7622006-01-08 13:34:27 -080012 * @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
David Brownell1d6432f2006-01-08 13:34:22 -080014 *
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 */
22struct flash_platform_data {
23 char *name;
24 struct mtd_partition *parts;
25 unsigned int nr_parts;
26
Mike Lavender2f9f7622006-01-08 13:34:27 -080027 char *type;
28
David Brownell1d6432f2006-01-08 13:34:22 -080029 /* we'll likely add more ... use JEDEC IDs, etc */
30};
31
32#endif