Revert "mtd: atmel_nand: optimize read/write buffer functions"
As in the kernel we revert as this was supposed to work but does not yet
this may need more work on the smc to be able to use it
So for now revert it
This reverts commit 809f0f6327
.
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
6d4c1c6172
commit
21a911a0de
|
@ -159,16 +159,30 @@ static int atmel_nand_device_ready(struct mtd_info *mtd)
|
|||
*/
|
||||
static void atmel_read_buf(struct mtd_info *mtd, u8 *buf, int len)
|
||||
{
|
||||
struct nand_chip *chip = mtd->priv;
|
||||
struct nand_chip *nand_chip = mtd->priv;
|
||||
|
||||
memcpy_fromio(buf, chip->IO_ADDR_R, len);
|
||||
readsb(nand_chip->IO_ADDR_R, buf, len);
|
||||
}
|
||||
|
||||
static void atmel_read_buf16(struct mtd_info *mtd, u8 *buf, int len)
|
||||
{
|
||||
struct nand_chip *nand_chip = mtd->priv;
|
||||
|
||||
readsw(nand_chip->IO_ADDR_R, buf, len / 2);
|
||||
}
|
||||
|
||||
static void atmel_write_buf(struct mtd_info *mtd, const u8 *buf, int len)
|
||||
{
|
||||
struct nand_chip *chip = mtd->priv;
|
||||
struct nand_chip *nand_chip = mtd->priv;
|
||||
|
||||
memcpy_toio(chip->IO_ADDR_W, buf, len);
|
||||
writesb(nand_chip->IO_ADDR_W, buf, len);
|
||||
}
|
||||
|
||||
static void atmel_write_buf16(struct mtd_info *mtd, const u8 *buf, int len)
|
||||
{
|
||||
struct nand_chip *nand_chip = mtd->priv;
|
||||
|
||||
writesw(nand_chip->IO_ADDR_W, buf, len / 2);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1112,11 +1126,14 @@ static int __init atmel_nand_probe(struct device_d *dev)
|
|||
|
||||
nand_chip->chip_delay = 20; /* 20us command delay time */
|
||||
|
||||
if (host->board->bus_width_16) /* 16-bit bus width */
|
||||
if (host->board->bus_width_16) { /* 16-bit bus width */
|
||||
nand_chip->options |= NAND_BUSWIDTH_16;
|
||||
|
||||
nand_chip->read_buf = atmel_read_buf;
|
||||
nand_chip->write_buf = atmel_write_buf;
|
||||
nand_chip->read_buf = atmel_read_buf16;
|
||||
nand_chip->write_buf = atmel_write_buf16;
|
||||
} else {
|
||||
nand_chip->read_buf = atmel_read_buf;
|
||||
nand_chip->write_buf = atmel_write_buf;
|
||||
}
|
||||
|
||||
atmel_nand_enable(host);
|
||||
|
||||
|
|
Loading…
Reference in New Issue