Commit 972edcb7 authored by Vitaly Wool's avatar Vitaly Wool Committed by David Woodhouse

[MTD] [NAND] platform NAND driver: update header

This patch extends nand.h in order to enable platform NAND driver.
Signed-off-by: default avatarVitaly Wool <vitalywool@gmail.com>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarDavid Woodhouse <dwmw2@infradead.org>
parent 1c979645
...@@ -560,6 +560,7 @@ extern int nand_do_read(struct mtd_info *mtd, loff_t from, size_t len, ...@@ -560,6 +560,7 @@ extern int nand_do_read(struct mtd_info *mtd, loff_t from, size_t len,
* @chip_delay: R/B delay value in us * @chip_delay: R/B delay value in us
* @options: Option flags, e.g. 16bit buswidth * @options: Option flags, e.g. 16bit buswidth
* @ecclayout: ecc layout info structure * @ecclayout: ecc layout info structure
* @part_probe_types: NULL-terminated array of probe types
* @priv: hardware controller specific settings * @priv: hardware controller specific settings
*/ */
struct platform_nand_chip { struct platform_nand_chip {
...@@ -570,6 +571,7 @@ struct platform_nand_chip { ...@@ -570,6 +571,7 @@ struct platform_nand_chip {
struct nand_ecclayout *ecclayout; struct nand_ecclayout *ecclayout;
int chip_delay; int chip_delay;
unsigned int options; unsigned int options;
const char **part_probe_types;
void *priv; void *priv;
}; };
...@@ -578,6 +580,8 @@ struct platform_nand_chip { ...@@ -578,6 +580,8 @@ struct platform_nand_chip {
* @hwcontrol: platform specific hardware control structure * @hwcontrol: platform specific hardware control structure
* @dev_ready: platform specific function to read ready/busy pin * @dev_ready: platform specific function to read ready/busy pin
* @select_chip: platform specific chip select function * @select_chip: platform specific chip select function
* @cmd_ctrl: platform specific function for controlling
* ALE/CLE/nCE. Also used to write command and address
* @priv: private data to transport driver specific settings * @priv: private data to transport driver specific settings
* *
* All fields are optional and depend on the hardware driver requirements * All fields are optional and depend on the hardware driver requirements
...@@ -586,9 +590,21 @@ struct platform_nand_ctrl { ...@@ -586,9 +590,21 @@ struct platform_nand_ctrl {
void (*hwcontrol)(struct mtd_info *mtd, int cmd); void (*hwcontrol)(struct mtd_info *mtd, int cmd);
int (*dev_ready)(struct mtd_info *mtd); int (*dev_ready)(struct mtd_info *mtd);
void (*select_chip)(struct mtd_info *mtd, int chip); void (*select_chip)(struct mtd_info *mtd, int chip);
void (*cmd_ctrl)(struct mtd_info *mtd, int dat,
unsigned int ctrl);
void *priv; void *priv;
}; };
/**
* struct platform_nand_data - container structure for platform-specific data
* @chip: chip level chip structure
* @ctrl: controller level device structure
*/
struct platform_nand_data {
struct platform_nand_chip chip;
struct platform_nand_ctrl ctrl;
};
/* Some helpers to access the data structures */ /* Some helpers to access the data structures */
static inline static inline
struct platform_nand_chip *get_platform_nandchip(struct mtd_info *mtd) struct platform_nand_chip *get_platform_nandchip(struct mtd_info *mtd)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment