mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-27 09:02:06 +00:00
mtd: mtk-nor: adjust sequence of trigger function and assignment function
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>
This commit is contained in:
parent
8142b47ef3
commit
80e1ca6921
1 changed files with 1 additions and 1 deletions
|
@ -272,10 +272,10 @@ static int mt8173_nor_write_single_byte(struct mt8173_nor *mt8173_nor,
|
||||||
mt8173_nor_set_addr(mt8173_nor, addr);
|
mt8173_nor_set_addr(mt8173_nor, addr);
|
||||||
|
|
||||||
for (i = 0; i < length; i++) {
|
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);
|
ret = mt8173_nor_execute_cmd(mt8173_nor, MTK_NOR_PIO_WR_CMD);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
writeb(*data++, mt8173_nor->base + MTK_NOR_WDATA_REG);
|
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue