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

mtd: rawnand: Rename a NAND chip option



NAND controller drivers can set the NAND_USE_BOUNCE_BUFFER flag to a
chip 'option' field. With this flag, the core is responsible of
providing DMA-able buffers.

The current behavior is to not force the use of a bounce buffer when
the core thinks this is not needed. So in the end the name is a bit
misleading, because in theory we will always have a DMA buffer but in
practice it will not always be a bounce buffer.

Rename this flag NAND_USES_DMA to be more accurate.

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/20200507105241.14299-4-miquel.raynal@bootlin.com
parent 96d627bd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1494,7 +1494,7 @@ static void atmel_nand_init(struct atmel_nand_controller *nc,
	 * suitable for DMA.
	 */
	if (nc->dmac)
		chip->options |= NAND_USE_BOUNCE_BUFFER;
		chip->options |= NAND_USES_DMA;

	/* Default to HW ECC if pmecc is available. */
	if (nc->pmecc)
+1 −1
Original line number Diff line number Diff line
@@ -2576,7 +2576,7 @@ static int brcmnand_attach_chip(struct nand_chip *chip)
	 * to/from, and have nand_base pass us a bounce buffer instead, as
	 * needed.
	 */
	chip->options |= NAND_USE_BOUNCE_BUFFER;
	chip->options |= NAND_USES_DMA;

	if (chip->bbt_options & NAND_BBT_USE_FLASH)
		chip->bbt_options |= NAND_BBT_NO_OOB;
+1 −1
Original line number Diff line number Diff line
@@ -1226,7 +1226,7 @@ int denali_chip_init(struct denali_controller *denali,
		mtd->name = "denali-nand";

	if (denali->dma_avail) {
		chip->options |= NAND_USE_BOUNCE_BUFFER;
		chip->options |= NAND_USES_DMA;
		chip->buf_align = 16;
	}

+1 −1
Original line number Diff line number Diff line
@@ -1269,7 +1269,7 @@ meson_nfc_nand_chip_init(struct device *dev,
	nand_set_flash_node(nand, np);
	nand_set_controller_data(nand, nfc);

	nand->options |= NAND_USE_BOUNCE_BUFFER;
	nand->options |= NAND_USES_DMA;
	mtd = nand_to_mtd(nand);
	mtd->owner = THIS_MODULE;
	mtd->dev.parent = dev;
+1 −1
Original line number Diff line number Diff line
@@ -1380,7 +1380,7 @@ static int mtk_nfc_nand_chip_init(struct device *dev, struct mtk_nfc *nfc,
	nand_set_flash_node(nand, np);
	nand_set_controller_data(nand, nfc);

	nand->options |= NAND_USE_BOUNCE_BUFFER | NAND_SUBPAGE_READ;
	nand->options |= NAND_USES_DMA | NAND_SUBPAGE_READ;
	nand->legacy.dev_ready = mtk_nfc_dev_ready;
	nand->legacy.select_chip = mtk_nfc_select_chip;
	nand->legacy.write_byte = mtk_nfc_write_byte;
Loading