aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorVitaly Wool <vitalywool@gmail.com>2007-05-06 10:46:57 -0400
committerDavid Woodhouse <dwmw2@infradead.org>2007-05-07 19:40:32 -0400
commit972edcb79ec8c8512ed5b29ca6718065328d6992 (patch)
tree308a84b81b776012003c1d9e6d1ab22d1c974368 /include/linux
parent1c97964520503c60aa91680d4b525236c2885a36 (diff)
[MTD] [NAND] platform NAND driver: update header
This patch extends nand.h in order to enable platform NAND driver. Signed-off-by: Vitaly Wool <vitalywool@gmail.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mtd/nand.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index cf197ad62da6..d2365c8dcacc 100644
--- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h
@@ -560,6 +560,7 @@ extern int nand_do_read(struct mtd_info *mtd, loff_t from, size_t len,
560 * @chip_delay: R/B delay value in us 560 * @chip_delay: R/B delay value in us
561 * @options: Option flags, e.g. 16bit buswidth 561 * @options: Option flags, e.g. 16bit buswidth
562 * @ecclayout: ecc layout info structure 562 * @ecclayout: ecc layout info structure
563 * @part_probe_types: NULL-terminated array of probe types
563 * @priv: hardware controller specific settings 564 * @priv: hardware controller specific settings
564 */ 565 */
565struct platform_nand_chip { 566struct platform_nand_chip {
@@ -570,6 +571,7 @@ struct platform_nand_chip {
570 struct nand_ecclayout *ecclayout; 571 struct nand_ecclayout *ecclayout;
571 int chip_delay; 572 int chip_delay;
572 unsigned int options; 573 unsigned int options;
574 const char **part_probe_types;
573 void *priv; 575 void *priv;
574}; 576};
575 577
@@ -578,6 +580,8 @@ struct platform_nand_chip {
578 * @hwcontrol: platform specific hardware control structure 580 * @hwcontrol: platform specific hardware control structure
579 * @dev_ready: platform specific function to read ready/busy pin 581 * @dev_ready: platform specific function to read ready/busy pin
580 * @select_chip: platform specific chip select function 582 * @select_chip: platform specific chip select function
583 * @cmd_ctrl: platform specific function for controlling
584 * ALE/CLE/nCE. Also used to write command and address
581 * @priv: private data to transport driver specific settings 585 * @priv: private data to transport driver specific settings
582 * 586 *
583 * All fields are optional and depend on the hardware driver requirements 587 * All fields are optional and depend on the hardware driver requirements
@@ -586,9 +590,21 @@ struct platform_nand_ctrl {
586 void (*hwcontrol)(struct mtd_info *mtd, int cmd); 590 void (*hwcontrol)(struct mtd_info *mtd, int cmd);
587 int (*dev_ready)(struct mtd_info *mtd); 591 int (*dev_ready)(struct mtd_info *mtd);
588 void (*select_chip)(struct mtd_info *mtd, int chip); 592 void (*select_chip)(struct mtd_info *mtd, int chip);
593 void (*cmd_ctrl)(struct mtd_info *mtd, int dat,
594 unsigned int ctrl);
589 void *priv; 595 void *priv;
590}; 596};
591 597
598/**
599 * struct platform_nand_data - container structure for platform-specific data
600 * @chip: chip level chip structure
601 * @ctrl: controller level device structure
602 */
603struct platform_nand_data {
604 struct platform_nand_chip chip;
605 struct platform_nand_ctrl ctrl;
606};
607
592/* Some helpers to access the data structures */ 608/* Some helpers to access the data structures */
593static inline 609static inline
594struct platform_nand_chip *get_platform_nandchip(struct mtd_info *mtd) 610struct platform_nand_chip *get_platform_nandchip(struct mtd_info *mtd)