提交 cce02464 编写于 作者: B Baruch Siach 提交者: Sascha Hauer

mxc_nand: add support for platform defined partitions

Signed-off-by: NBaruch Siach <baruch@tkos.co.il>
Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de>
上级 5ea32021
......@@ -20,9 +20,13 @@
#ifndef __ASM_ARCH_NAND_H
#define __ASM_ARCH_NAND_H
#include <linux/mtd/partitions.h>
struct mxc_nand_platform_data {
int width; /* data bus width in bytes */
int hw_ecc:1; /* 0 if supress hardware ECC */
int flash_bbt:1; /* set to 1 to use a flash based bbt */
struct mtd_partition *parts; /* partition table */
int nr_parts; /* size of parts */
};
#endif /* __ASM_ARCH_NAND_H */
......@@ -832,6 +832,8 @@ static int __init mxcnd_probe(struct platform_device *pdev)
parse_mtd_partitions(mtd, part_probes, &host->parts, 0);
if (nr_parts > 0)
add_mtd_partitions(mtd, host->parts, nr_parts);
else if (pdata->parts)
add_mtd_partitions(mtd, pdata->parts, pdata->nr_parts);
else
#endif
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册