mtd: rawnand: plat_nand: Kill pdata->ctrl.{hwcontrol, read_byte}()
None of the board files are overloading those hooks, so let's drop them from struct platform_nand_ctrl. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
This commit is contained in:
Родитель
f0f01838f7
Коммит
dc2d8856a7
|
@ -688,7 +688,6 @@ struct platform_nand_data balloon3_nand_pdata = {
|
||||||
.chip_delay = 50,
|
.chip_delay = 50,
|
||||||
},
|
},
|
||||||
.ctrl = {
|
.ctrl = {
|
||||||
.hwcontrol = 0,
|
|
||||||
.dev_ready = balloon3_nand_dev_ready,
|
.dev_ready = balloon3_nand_dev_ready,
|
||||||
.select_chip = balloon3_nand_select_chip,
|
.select_chip = balloon3_nand_select_chip,
|
||||||
.cmd_ctrl = balloon3_nand_cmd_ctl,
|
.cmd_ctrl = balloon3_nand_cmd_ctl,
|
||||||
|
|
|
@ -346,7 +346,6 @@ struct platform_nand_data em_x270_nand_platdata = {
|
||||||
.chip_delay = 20,
|
.chip_delay = 20,
|
||||||
},
|
},
|
||||||
.ctrl = {
|
.ctrl = {
|
||||||
.hwcontrol = 0,
|
|
||||||
.dev_ready = em_x270_nand_device_ready,
|
.dev_ready = em_x270_nand_device_ready,
|
||||||
.select_chip = 0,
|
.select_chip = 0,
|
||||||
.cmd_ctrl = em_x270_nand_cmd_ctl,
|
.cmd_ctrl = em_x270_nand_cmd_ctl,
|
||||||
|
|
|
@ -67,12 +67,10 @@ static int plat_nand_probe(struct platform_device *pdev)
|
||||||
data->chip.select_chip = pdata->ctrl.select_chip;
|
data->chip.select_chip = pdata->ctrl.select_chip;
|
||||||
data->chip.write_buf = pdata->ctrl.write_buf;
|
data->chip.write_buf = pdata->ctrl.write_buf;
|
||||||
data->chip.read_buf = pdata->ctrl.read_buf;
|
data->chip.read_buf = pdata->ctrl.read_buf;
|
||||||
data->chip.read_byte = pdata->ctrl.read_byte;
|
|
||||||
data->chip.chip_delay = pdata->chip.chip_delay;
|
data->chip.chip_delay = pdata->chip.chip_delay;
|
||||||
data->chip.options |= pdata->chip.options;
|
data->chip.options |= pdata->chip.options;
|
||||||
data->chip.bbt_options |= pdata->chip.bbt_options;
|
data->chip.bbt_options |= pdata->chip.bbt_options;
|
||||||
|
|
||||||
data->chip.ecc.hwctl = pdata->ctrl.hwcontrol;
|
|
||||||
data->chip.ecc.mode = NAND_ECC_SOFT;
|
data->chip.ecc.mode = NAND_ECC_SOFT;
|
||||||
data->chip.ecc.algo = NAND_ECC_HAMMING;
|
data->chip.ecc.algo = NAND_ECC_HAMMING;
|
||||||
|
|
||||||
|
|
|
@ -1572,14 +1572,12 @@ struct platform_device;
|
||||||
* struct platform_nand_ctrl - controller level device structure
|
* struct platform_nand_ctrl - controller level device structure
|
||||||
* @probe: platform specific function to probe/setup hardware
|
* @probe: platform specific function to probe/setup hardware
|
||||||
* @remove: platform specific function to remove/teardown hardware
|
* @remove: platform specific function to remove/teardown hardware
|
||||||
* @hwcontrol: platform specific hardware control structure
|
|
||||||
* @dev_ready: platform specific function to read ready/busy pin
|
* @dev_ready: platform specific function to read ready/busy pin
|
||||||
* @select_chip: platform specific chip select function
|
* @select_chip: platform specific chip select function
|
||||||
* @cmd_ctrl: platform specific function for controlling
|
* @cmd_ctrl: platform specific function for controlling
|
||||||
* ALE/CLE/nCE. Also used to write command and address
|
* ALE/CLE/nCE. Also used to write command and address
|
||||||
* @write_buf: platform specific function for write buffer
|
* @write_buf: platform specific function for write buffer
|
||||||
* @read_buf: platform specific function for read buffer
|
* @read_buf: platform specific function for read buffer
|
||||||
* @read_byte: platform specific function to read one byte from chip
|
|
||||||
* @priv: private data to transport driver specific settings
|
* @priv: private data to transport driver specific settings
|
||||||
*
|
*
|
||||||
* All fields are optional and depend on the hardware driver requirements
|
* All fields are optional and depend on the hardware driver requirements
|
||||||
|
@ -1587,13 +1585,11 @@ struct platform_device;
|
||||||
struct platform_nand_ctrl {
|
struct platform_nand_ctrl {
|
||||||
int (*probe)(struct platform_device *pdev);
|
int (*probe)(struct platform_device *pdev);
|
||||||
void (*remove)(struct platform_device *pdev);
|
void (*remove)(struct platform_device *pdev);
|
||||||
void (*hwcontrol)(struct mtd_info *mtd, int cmd);
|
|
||||||
int (*dev_ready)(struct mtd_info *mtd);
|
int (*dev_ready)(struct mtd_info *mtd);
|
||||||
void (*select_chip)(struct mtd_info *mtd, int chip);
|
void (*select_chip)(struct mtd_info *mtd, int chip);
|
||||||
void (*cmd_ctrl)(struct mtd_info *mtd, int dat, unsigned int ctrl);
|
void (*cmd_ctrl)(struct mtd_info *mtd, int dat, unsigned int ctrl);
|
||||||
void (*write_buf)(struct mtd_info *mtd, const uint8_t *buf, int len);
|
void (*write_buf)(struct mtd_info *mtd, const uint8_t *buf, int len);
|
||||||
void (*read_buf)(struct mtd_info *mtd, uint8_t *buf, int len);
|
void (*read_buf)(struct mtd_info *mtd, uint8_t *buf, int len);
|
||||||
unsigned char (*read_byte)(struct mtd_info *mtd);
|
|
||||||
void *priv;
|
void *priv;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче