projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8142b47
)
mtd: mtk-nor: adjust sequence of trigger function and assignment function
author
Bayi Cheng
<bayi.cheng@mediatek.com>
Fri, 18 Dec 2015 03:02:40 +0000
(11:02 +0800)
committer
Brian Norris
<computersforpeace@gmail.com>
Fri, 18 Dec 2015 23:05:43 +0000
(15:05 -0800)
Move write data register before excute command to avoid
missing first byte write to nor flash
Signed-off-by: Bayi Cheng <bayi.cheng@mediatek.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/spi-nor/mtk-quadspi.c
patch
|
blob
|
history
diff --git
a/drivers/mtd/spi-nor/mtk-quadspi.c
b/drivers/mtd/spi-nor/mtk-quadspi.c
index e1dd9fd16fbe0792fcb31935c99176f9882c4b29..d5f850d035bb93fb3a7c6547901ddfe84c3c6f04 100644
(file)
--- a/
drivers/mtd/spi-nor/mtk-quadspi.c
+++ b/
drivers/mtd/spi-nor/mtk-quadspi.c
@@
-272,10
+272,10
@@
static int mt8173_nor_write_single_byte(struct mt8173_nor *mt8173_nor,
mt8173_nor_set_addr(mt8173_nor, addr);
for (i = 0; i < length; i++) {
+ writeb(*data++, mt8173_nor->base + MTK_NOR_WDATA_REG);
ret = mt8173_nor_execute_cmd(mt8173_nor, MTK_NOR_PIO_WR_CMD);
if (ret < 0)
return ret;
- writeb(*data++, mt8173_nor->base + MTK_NOR_WDATA_REG);
}
return 0;
}