Commit adcf98b2 authored by Miquel Raynal's avatar Miquel Raynal
Browse files

mtd: rawnand: Rename nand_has_setup_data_iface()



This is really a NAND controller hook so call it
nand_controller_can_setup_data_iface(), which makes much more sense.

Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: default avatarBoris Brezillon <boris.brezillon@collabora.com>
Link: https://lore.kernel.org/linux-mtd/20200529111322.7184-10-miquel.raynal@bootlin.com
parent fe7f7b08
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -130,7 +130,7 @@ static inline int nand_exec_op(struct nand_chip *chip,
	return chip->controller->ops->exec_op(chip, op, false);
	return chip->controller->ops->exec_op(chip, op, false);
}
}


static inline bool nand_has_setup_data_iface(struct nand_chip *chip)
static inline bool nand_controller_can_setup_data_iface(struct nand_chip *chip)
{
{
	if (!chip->controller || !chip->controller->ops ||
	if (!chip->controller || !chip->controller->ops ||
	    !chip->controller->ops->setup_data_interface)
	    !chip->controller->ops->setup_data_interface)
+3 −3
Original line number Original line Diff line number Diff line
@@ -910,7 +910,7 @@ static int nand_reset_data_interface(struct nand_chip *chip, int chipnr)
{
{
	int ret;
	int ret;


	if (!nand_has_setup_data_iface(chip))
	if (!nand_controller_can_setup_data_iface(chip))
		return 0;
		return 0;


	/*
	/*
@@ -955,7 +955,7 @@ static int nand_setup_data_interface(struct nand_chip *chip, int chipnr)
	u8 tmode_param[ONFI_SUBFEATURE_PARAM_LEN] = { mode, };
	u8 tmode_param[ONFI_SUBFEATURE_PARAM_LEN] = { mode, };
	int ret;
	int ret;


	if (!nand_has_setup_data_iface(chip))
	if (!nand_controller_can_setup_data_iface(chip))
		return 0;
		return 0;


	/* Change the mode on the chip side (if supported by the NAND chip) */
	/* Change the mode on the chip side (if supported by the NAND chip) */
@@ -1025,7 +1025,7 @@ static int nand_init_data_interface(struct nand_chip *chip)
{
{
	int modes, mode, ret;
	int modes, mode, ret;


	if (!nand_has_setup_data_iface(chip))
	if (!nand_controller_can_setup_data_iface(chip))
		return 0;
		return 0;


	/*
	/*
+1 −1
Original line number Original line Diff line number Diff line
@@ -365,7 +365,7 @@ static void nand_ccs_delay(struct nand_chip *chip)
	 * Wait tCCS_min if it is correctly defined, otherwise wait 500ns
	 * Wait tCCS_min if it is correctly defined, otherwise wait 500ns
	 * (which should be safe for all NANDs).
	 * (which should be safe for all NANDs).
	 */
	 */
	if (nand_has_setup_data_iface(chip))
	if (nand_controller_can_setup_data_iface(chip))
		ndelay(chip->data_interface.timings.sdr.tCCS_min / 1000);
		ndelay(chip->data_interface.timings.sdr.tCCS_min / 1000);
	else
	else
		ndelay(500);
		ndelay(500);