}
}
-static int mxc_nand_set_features(struct mtd_info *mtd, struct nand_chip *chip,
- int addr, u8 *subfeature_param)
+static int mxc_nand_set_features(struct nand_chip *chip, int addr,
+ u8 *subfeature_param)
{
- struct nand_chip *nand_chip = mtd_to_nand(mtd);
- struct mxc_nand_host *host = nand_get_controller_data(nand_chip);
+ struct mtd_info *mtd = nand_to_mtd(chip);
+ struct mxc_nand_host *host = nand_get_controller_data(chip);
int i;
host->buf_start = 0;
return 0;
}
-static int mxc_nand_get_features(struct mtd_info *mtd, struct nand_chip *chip,
- int addr, u8 *subfeature_param)
+static int mxc_nand_get_features(struct nand_chip *chip, int addr,
+ u8 *subfeature_param)
{
- struct nand_chip *nand_chip = mtd_to_nand(mtd);
- struct mxc_nand_host *host = nand_get_controller_data(nand_chip);
+ struct mtd_info *mtd = nand_to_mtd(chip);
+ struct mxc_nand_host *host = nand_get_controller_data(chip);
int i;
host->devtype_data->send_cmd(host, NAND_CMD_GET_FEATURES, false);
int nand_get_features(struct nand_chip *chip, int addr,
u8 *subfeature_param)
{
- struct mtd_info *mtd = nand_to_mtd(chip);
-
if (!nand_supports_get_features(chip, addr))
return -ENOTSUPP;
- return chip->get_features(mtd, chip, addr, subfeature_param);
+ return chip->get_features(chip, addr, subfeature_param);
}
EXPORT_SYMBOL_GPL(nand_get_features);
int nand_set_features(struct nand_chip *chip, int addr,
u8 *subfeature_param)
{
- struct mtd_info *mtd = nand_to_mtd(chip);
-
if (!nand_supports_set_features(chip, addr))
return -ENOTSUPP;
- return chip->set_features(mtd, chip, addr, subfeature_param);
+ return chip->set_features(chip, addr, subfeature_param);
}
EXPORT_SYMBOL_GPL(nand_set_features);
/**
* nand_default_set_features- [REPLACEABLE] set NAND chip features
- * @mtd: MTD device structure
* @chip: nand chip info structure
* @addr: feature address.
* @subfeature_param: the subfeature parameters, a four bytes array.
*/
-static int nand_default_set_features(struct mtd_info *mtd,
- struct nand_chip *chip, int addr,
+static int nand_default_set_features(struct nand_chip *chip, int addr,
uint8_t *subfeature_param)
{
return nand_set_features_op(chip, addr, subfeature_param);
/**
* nand_default_get_features- [REPLACEABLE] get NAND chip features
- * @mtd: MTD device structure
* @chip: nand chip info structure
* @addr: feature address.
* @subfeature_param: the subfeature parameters, a four bytes array.
*/
-static int nand_default_get_features(struct mtd_info *mtd,
- struct nand_chip *chip, int addr,
+static int nand_default_get_features(struct nand_chip *chip, int addr,
uint8_t *subfeature_param)
{
return nand_get_features_op(chip, addr, subfeature_param);
/**
* nand_get_set_features_notsupp - set/get features stub returning -ENOTSUPP
- * @mtd: MTD device structure
* @chip: nand chip info structure
* @addr: feature address.
* @subfeature_param: the subfeature parameters, a four bytes array.
* Should be used by NAND controller drivers that do not support the SET/GET
* FEATURES operations.
*/
-int nand_get_set_features_notsupp(struct mtd_info *mtd, struct nand_chip *chip,
- int addr, u8 *subfeature_param)
+int nand_get_set_features_notsupp(struct nand_chip *chip, int addr,
+ u8 *subfeature_param)
{
return -ENOTSUPP;
}
const struct nand_operation *op,
bool check_only);
int (*erase)(struct nand_chip *chip, int page);
- int (*set_features)(struct mtd_info *mtd, struct nand_chip *chip,
- int feature_addr, uint8_t *subfeature_para);
- int (*get_features)(struct mtd_info *mtd, struct nand_chip *chip,
- int feature_addr, uint8_t *subfeature_para);
+ int (*set_features)(struct nand_chip *chip, int feature_addr,
+ uint8_t *subfeature_para);
+ int (*get_features)(struct nand_chip *chip, int feature_addr,
+ uint8_t *subfeature_para);
int (*setup_read_retry)(struct mtd_info *mtd, int retry_mode);
int (*setup_data_interface)(struct mtd_info *mtd, int chipnr,
const struct nand_data_interface *conf);
int nand_get_features(struct nand_chip *chip, int addr, u8 *subfeature_param);
int nand_set_features(struct nand_chip *chip, int addr, u8 *subfeature_param);
/* Stub used by drivers that do not support GET/SET FEATURES operations */
-int nand_get_set_features_notsupp(struct mtd_info *mtd, struct nand_chip *chip,
- int addr, u8 *subfeature_param);
+int nand_get_set_features_notsupp(struct nand_chip *chip, int addr,
+ u8 *subfeature_param);
/* Default read_page_raw implementation */
int nand_read_page_raw(struct nand_chip *chip, uint8_t *buf, int oob_required,