提交 6e995b84 编写于 作者: B Bin Meng 提交者: Cyrille Pitchen

spi-nor: intel-spi: Remove the unnecessary HSFSTS register RW

There is no code that alters the HSFSTS register content in between
in intel_spi_write(). Remove the unnecessary RW to save some cycles.
Signed-off-by: NBin Meng <bmeng.cn@gmail.com>
Acked-by: NMika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: NCyrille Pitchen <cyrille.pitchen@wedev4u.fr>
上级 8c473dd6
...@@ -611,7 +611,6 @@ static ssize_t intel_spi_write(struct spi_nor *nor, loff_t to, size_t len, ...@@ -611,7 +611,6 @@ static ssize_t intel_spi_write(struct spi_nor *nor, loff_t to, size_t len,
val |= HSFSTS_CTL_AEL | HSFSTS_CTL_FCERR | HSFSTS_CTL_FDONE; val |= HSFSTS_CTL_AEL | HSFSTS_CTL_FCERR | HSFSTS_CTL_FDONE;
val |= (block_size - 1) << HSFSTS_CTL_FDBC_SHIFT; val |= (block_size - 1) << HSFSTS_CTL_FDBC_SHIFT;
val |= HSFSTS_CTL_FCYCLE_WRITE; val |= HSFSTS_CTL_FCYCLE_WRITE;
writel(val, ispi->base + HSFSTS_CTL);
ret = intel_spi_write_block(ispi, write_buf, block_size); ret = intel_spi_write_block(ispi, write_buf, block_size);
if (ret) { if (ret) {
...@@ -620,8 +619,8 @@ static ssize_t intel_spi_write(struct spi_nor *nor, loff_t to, size_t len, ...@@ -620,8 +619,8 @@ static ssize_t intel_spi_write(struct spi_nor *nor, loff_t to, size_t len,
} }
/* Start the write now */ /* Start the write now */
val = readl(ispi->base + HSFSTS_CTL); val |= HSFSTS_CTL_FGO;
writel(val | HSFSTS_CTL_FGO, ispi->base + HSFSTS_CTL); writel(val, ispi->base + HSFSTS_CTL);
ret = intel_spi_wait_hw_busy(ispi); ret = intel_spi_wait_hw_busy(ispi);
if (ret) { if (ret) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册