Commit 3cece3ab authored by Boris Brezillon's avatar Boris Brezillon Committed by Miquel Raynal
Browse files

mtd: rawnand: Deprecate ->chip_delay



The wait timeouts and delays are directly extracted from the NAND
timings and ->chip_delay is only used in legacy path, so let's move it
to the nand_legacy struct to make it clear.

Signed-off-by: default avatarBoris Brezillon <boris.brezillon@bootlin.com>
Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
parent 45240367
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -240,7 +240,7 @@ necessary information about the device.
        /* Reference hardware control function */
        /* Reference hardware control function */
        this->hwcontrol = board_hwcontrol;
        this->hwcontrol = board_hwcontrol;
        /* Set command delay time, see datasheet for correct value */
        /* Set command delay time, see datasheet for correct value */
        this->chip_delay = CHIP_DEPENDEND_COMMAND_DELAY;
        this->legacy.chip_delay = CHIP_DEPENDEND_COMMAND_DELAY;
        /* Assign the device ready function, if available */
        /* Assign the device ready function, if available */
        this->legacy.dev_ready = board_dev_ready;
        this->legacy.dev_ready = board_dev_ready;
        this->eccmode = NAND_ECC_SOFT;
        this->eccmode = NAND_ECC_SOFT;
+1 −1
Original line number Original line Diff line number Diff line
@@ -221,7 +221,7 @@ static int ams_delta_init(struct platform_device *pdev)
		pr_notice("Couldn't request gpio for Delta NAND ready.\n");
		pr_notice("Couldn't request gpio for Delta NAND ready.\n");
	}
	}
	/* 25 us command delay time */
	/* 25 us command delay time */
	this->chip_delay = 30;
	this->legacy.chip_delay = 30;
	this->ecc.mode = NAND_ECC_SOFT;
	this->ecc.mode = NAND_ECC_SOFT;
	this->ecc.algo = NAND_ECC_HAMMING;
	this->ecc.algo = NAND_ECC_HAMMING;


+1 −1
Original line number Original line Diff line number Diff line
@@ -1483,7 +1483,7 @@ static void atmel_nand_init(struct atmel_nand_controller *nc,
		chip->setup_data_interface = atmel_nand_setup_data_interface;
		chip->setup_data_interface = atmel_nand_setup_data_interface;


	/* Some NANDs require a longer delay than the default one (20us). */
	/* Some NANDs require a longer delay than the default one (20us). */
	chip->chip_delay = 40;
	chip->legacy.chip_delay = 40;


	/*
	/*
	 * Use a bounce buffer when the buffer passed by the MTD user is not
	 * Use a bounce buffer when the buffer passed by the MTD user is not
+2 −2
Original line number Original line Diff line number Diff line
@@ -342,7 +342,7 @@ static void au1550_command(struct nand_chip *this, unsigned command,
		/* Apply a short delay always to ensure that we do wait tWB. */
		/* Apply a short delay always to ensure that we do wait tWB. */
		ndelay(100);
		ndelay(100);
		/* Wait for a chip to become ready... */
		/* Wait for a chip to become ready... */
		for (i = this->chip_delay;
		for (i = this->legacy.chip_delay;
		     !this->legacy.dev_ready(this) && i > 0; --i)
		     !this->legacy.dev_ready(this) && i > 0; --i)
			udelay(1);
			udelay(1);


@@ -434,7 +434,7 @@ static int au1550nd_probe(struct platform_device *pdev)
	this->legacy.cmdfunc = au1550_command;
	this->legacy.cmdfunc = au1550_command;


	/* 30 us command delay time */
	/* 30 us command delay time */
	this->chip_delay = 30;
	this->legacy.chip_delay = 30;
	this->ecc.mode = NAND_ECC_SOFT;
	this->ecc.mode = NAND_ECC_SOFT;
	this->ecc.algo = NAND_ECC_HAMMING;
	this->ecc.algo = NAND_ECC_HAMMING;


+1 −1
Original line number Original line Diff line number Diff line
@@ -393,7 +393,7 @@ int bcm47xxnflash_ops_bcm4706_init(struct bcm47xxnflash *b47n)
	b47n->nand_chip.legacy.set_features = nand_get_set_features_notsupp;
	b47n->nand_chip.legacy.set_features = nand_get_set_features_notsupp;
	b47n->nand_chip.legacy.get_features = nand_get_set_features_notsupp;
	b47n->nand_chip.legacy.get_features = nand_get_set_features_notsupp;


	nand_chip->chip_delay = 50;
	nand_chip->legacy.chip_delay = 50;
	b47n->nand_chip.bbt_options = NAND_BBT_USE_FLASH;
	b47n->nand_chip.bbt_options = NAND_BBT_USE_FLASH;
	b47n->nand_chip.ecc.mode = NAND_ECC_NONE; /* TODO: implement ECC */
	b47n->nand_chip.ecc.mode = NAND_ECC_NONE; /* TODO: implement ECC */


Loading