Unverified Commit 120c94a6 authored by Tudor Ambarus's avatar Tudor Ambarus
Browse files

mtd: spi-nor: spansion: Rename method to cypress_nor_get_page_size

The method queries SPINOR_REG_CYPRESS_CFR3V to determine the page size.
Rename the method accordingly, s/set/get.

Link: https://lore.kernel.org/r/cd3fb2cbc42a9576377ce4506eec72a58240805d.1680849425.git.Takahiro.Kuwano@infineon.com


Signed-off-by: default avatarTudor Ambarus <tudor.ambarus@linaro.org>
parent a9180c29
Loading
Loading
Loading
Loading
+5 −6
Original line number Original line Diff line number Diff line
@@ -302,8 +302,7 @@ static int cypress_nor_set_addr_mode_nbytes(struct spi_nor *nor)
}
}


/**
/**
 * cypress_nor_set_page_size() - Set page size which corresponds to the flash
 * cypress_nor_get_page_size() - Get flash page size configuration.
 *                               configuration.
 * @nor:	pointer to a 'struct spi_nor'
 * @nor:	pointer to a 'struct spi_nor'
 *
 *
 * The BFPT table advertises a 512B or 256B page size depending on part but the
 * The BFPT table advertises a 512B or 256B page size depending on part but the
@@ -312,7 +311,7 @@ static int cypress_nor_set_addr_mode_nbytes(struct spi_nor *nor)
 *
 *
 * Return: 0 on success, -errno otherwise.
 * Return: 0 on success, -errno otherwise.
 */
 */
static int cypress_nor_set_page_size(struct spi_nor *nor)
static int cypress_nor_get_page_size(struct spi_nor *nor)
{
{
	struct spi_mem_op op =
	struct spi_mem_op op =
		CYPRESS_NOR_RD_ANY_REG_OP(nor->params->addr_mode_nbytes,
		CYPRESS_NOR_RD_ANY_REG_OP(nor->params->addr_mode_nbytes,
@@ -368,7 +367,7 @@ s25fs256t_post_bfpt_fixup(struct spi_nor *nor,
	if (nor->bouncebuf[0])
	if (nor->bouncebuf[0])
		return -ENODEV;
		return -ENODEV;


	return cypress_nor_set_page_size(nor);
	return cypress_nor_get_page_size(nor);
}
}


static void s25fs256t_post_sfdp_fixup(struct spi_nor *nor)
static void s25fs256t_post_sfdp_fixup(struct spi_nor *nor)
@@ -407,7 +406,7 @@ s25hx_t_post_bfpt_fixup(struct spi_nor *nor,
	/* Replace Quad Enable with volatile version */
	/* Replace Quad Enable with volatile version */
	nor->params->quad_enable = cypress_nor_quad_enable_volatile;
	nor->params->quad_enable = cypress_nor_quad_enable_volatile;


	return cypress_nor_set_page_size(nor);
	return cypress_nor_get_page_size(nor);
}
}


static void s25hx_t_post_sfdp_fixup(struct spi_nor *nor)
static void s25hx_t_post_sfdp_fixup(struct spi_nor *nor)
@@ -502,7 +501,7 @@ static int s28hx_t_post_bfpt_fixup(struct spi_nor *nor,
	if (ret)
	if (ret)
		return ret;
		return ret;


	return cypress_nor_set_page_size(nor);
	return cypress_nor_get_page_size(nor);
}
}


static void s28hx_t_late_init(struct spi_nor *nor)
static void s28hx_t_late_init(struct spi_nor *nor)