diff options
| author | John Crispin <blogic@openwrt.org> | 2012-04-30 13:30:47 -0400 |
|---|---|---|
| committer | David Woodhouse <David.Woodhouse@intel.com> | 2012-05-14 00:16:53 -0400 |
| commit | b4f7aa84d6ff44327ab91a2973ebf0c2a7797d24 (patch) | |
| tree | a9210282810f07266f7b86cc2f1a6402ea6ac6bb | |
| parent | a4f203512be974dbd7425f8f1d3d40720bf36997 (diff) | |
mtd: add read_byte support to plat_nand
Lantiq SoCs have a External Bus Unit (EBU) that is used to attach MTD media.
As we need to co-exist with PCI on the same bus, certain swapping settings must
be applied. Similar to the NOR map driver we need to apply a fix to make NAND
work. The easiest way is to use byte reads.
Signed-off-by: John Crispin <blogic@openwrt.org>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| -rw-r--r-- | drivers/mtd/nand/plat_nand.c | 1 | ||||
| -rw-r--r-- | include/linux/mtd/nand.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mtd/nand/plat_nand.c b/drivers/mtd/nand/plat_nand.c index fd2d2a1b78b..1bcb5204042 100644 --- a/drivers/mtd/nand/plat_nand.c +++ b/drivers/mtd/nand/plat_nand.c | |||
| @@ -79,6 +79,7 @@ static int __devinit plat_nand_probe(struct platform_device *pdev) | |||
| 79 | data->chip.select_chip = pdata->ctrl.select_chip; | 79 | data->chip.select_chip = pdata->ctrl.select_chip; |
| 80 | data->chip.write_buf = pdata->ctrl.write_buf; | 80 | data->chip.write_buf = pdata->ctrl.write_buf; |
| 81 | data->chip.read_buf = pdata->ctrl.read_buf; | 81 | data->chip.read_buf = pdata->ctrl.read_buf; |
| 82 | data->chip.read_byte = pdata->ctrl.read_byte; | ||
| 82 | data->chip.chip_delay = pdata->chip.chip_delay; | 83 | data->chip.chip_delay = pdata->chip.chip_delay; |
| 83 | data->chip.options |= pdata->chip.options; | 84 | data->chip.options |= pdata->chip.options; |
| 84 | data->chip.bbt_options |= pdata->chip.bbt_options; | 85 | data->chip.bbt_options |= pdata->chip.bbt_options; |
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index 627f0c575ac..94a6679bfc2 100644 --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h | |||
| @@ -654,6 +654,7 @@ struct platform_nand_ctrl { | |||
| 654 | void (*cmd_ctrl)(struct mtd_info *mtd, int dat, unsigned int ctrl); | 654 | void (*cmd_ctrl)(struct mtd_info *mtd, int dat, unsigned int ctrl); |
| 655 | void (*write_buf)(struct mtd_info *mtd, const uint8_t *buf, int len); | 655 | void (*write_buf)(struct mtd_info *mtd, const uint8_t *buf, int len); |
| 656 | void (*read_buf)(struct mtd_info *mtd, uint8_t *buf, int len); | 656 | void (*read_buf)(struct mtd_info *mtd, uint8_t *buf, int len); |
| 657 | unsigned char (*read_byte)(struct mtd_info *mtd); | ||
| 657 | void *priv; | 658 | void *priv; |
| 658 | }; | 659 | }; |
| 659 | 660 | ||
