summaryrefslogtreecommitdiffstats
path: root/include/linux/spi/flash.h
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2006-01-15 20:59:29 -0200
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-01-15 20:59:29 -0200
commitf1dccedc8148026d9071c6805f7cb77374a9e56f (patch)
treeba4a630084b8d21309930321ff53a6ed4381c0f3 /include/linux/spi/flash.h
parentc943aa859c392eb4cc76d911daa1f261555075b2 (diff)
parent0238cb4e7583c521bb3538060f98a73e65f61324 (diff)
downloadop-kernel-dev-f1dccedc8148026d9071c6805f7cb77374a9e56f.zip
op-kernel-dev-f1dccedc8148026d9071c6805f7cb77374a9e56f.tar.gz
Merge ssh://master.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'include/linux/spi/flash.h')
-rw-r--r--include/linux/spi/flash.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/include/linux/spi/flash.h b/include/linux/spi/flash.h
new file mode 100644
index 0000000..3f22932
--- /dev/null
+++ b/include/linux/spi/flash.h
@@ -0,0 +1,31 @@
+#ifndef LINUX_SPI_FLASH_H
+#define LINUX_SPI_FLASH_H
+
+struct mtd_partition;
+
+/**
+ * struct flash_platform_data: board-specific flash data
+ * @name: optional flash device name (eg, as used with mtdparts=)
+ * @parts: optional array of mtd_partitions for static partitioning
+ * @nr_parts: number of mtd_partitions for static partitoning
+ * @type: optional flash device type (e.g. m25p80 vs m25p64), for use
+ * with chips that can't be queried for JEDEC or other IDs
+ *
+ * Board init code (in arch/.../mach-xxx/board-yyy.c files) can
+ * provide information about SPI flash parts (such as DataFlash) to
+ * help set up the device and its appropriate default partitioning.
+ *
+ * Note that for DataFlash, sizes for pages, blocks, and sectors are
+ * rarely powers of two; and partitions should be sector-aligned.
+ */
+struct flash_platform_data {
+ char *name;
+ struct mtd_partition *parts;
+ unsigned int nr_parts;
+
+ char *type;
+
+ /* we'll likely add more ... use JEDEC IDs, etc */
+};
+
+#endif
OpenPOWER on IntegriCloud