@ -1864,33 +1864,6 @@ read_retry:
}
}
/**
/**
* nand_read - [ MTD Interface ] MTD compatibility function for nand_do_read_ecc
* @ mtd : MTD device structure
* @ from : offset to read from
* @ len : number of bytes to read
* @ retlen : pointer to variable to store the number of read bytes
* @ buf : the databuffer to put data
*
* Get hold of the chip and call nand_do_read .
*/
static int nand_read ( struct mtd_info * mtd , loff_t from , size_t len ,
size_t * retlen , uint8_t * buf )
{
struct mtd_oob_ops ops ;
int ret ;
nand_get_device ( mtd , FL_READING ) ;
memset ( & ops , 0 , sizeof ( ops ) ) ;
ops . len = len ;
ops . datbuf = buf ;
ops . mode = MTD_OPS_PLACE_OOB ;
ret = nand_do_read_ops ( mtd , from , & ops ) ;
* retlen = ops . retlen ;
nand_release_device ( mtd ) ;
return ret ;
}
/**
* nand_read_oob_std - [ REPLACEABLE ] the most common OOB data read function
* nand_read_oob_std - [ REPLACEABLE ] the most common OOB data read function
* @ mtd : mtd info structure
* @ mtd : mtd info structure
* @ chip : nand chip info structure
* @ chip : nand chip info structure
@ -2675,33 +2648,6 @@ static int panic_nand_write(struct mtd_info *mtd, loff_t to, size_t len,
}
}
/**
/**
* nand_write - [ MTD Interface ] NAND write with ECC
* @ mtd : MTD device structure
* @ to : offset to write to
* @ len : number of bytes to write
* @ retlen : pointer to variable to store the number of written bytes
* @ buf : the data to write
*
* NAND write with ECC .
*/
static int nand_write ( struct mtd_info * mtd , loff_t to , size_t len ,
size_t * retlen , const uint8_t * buf )
{
struct mtd_oob_ops ops ;
int ret ;
nand_get_device ( mtd , FL_WRITING ) ;
memset ( & ops , 0 , sizeof ( ops ) ) ;
ops . len = len ;
ops . datbuf = ( uint8_t * ) buf ;
ops . mode = MTD_OPS_PLACE_OOB ;
ret = nand_do_write_ops ( mtd , to , & ops ) ;
* retlen = ops . retlen ;
nand_release_device ( mtd ) ;
return ret ;
}
/**
* nand_do_write_oob - [ MTD Interface ] NAND write out - of - band
* nand_do_write_oob - [ MTD Interface ] NAND write out - of - band
* @ mtd : MTD device structure
* @ mtd : MTD device structure
* @ to : offset to write to
* @ to : offset to write to
@ -4620,8 +4566,6 @@ int nand_scan_tail(struct mtd_info *mtd)
mtd - > flags = ( chip - > options & NAND_ROM ) ? MTD_CAP_ROM :
mtd - > flags = ( chip - > options & NAND_ROM ) ? MTD_CAP_ROM :
MTD_CAP_NANDFLASH ;
MTD_CAP_NANDFLASH ;
mtd - > _erase = nand_erase ;
mtd - > _erase = nand_erase ;
mtd - > _read = nand_read ;
mtd - > _write = nand_write ;
mtd - > _panic_write = panic_nand_write ;
mtd - > _panic_write = panic_nand_write ;
mtd - > _read_oob = nand_read_oob ;
mtd - > _read_oob = nand_read_oob ;
mtd - > _write_oob = nand_write_oob ;
mtd - > _write_oob = nand_write_oob ;