提交 80e1ca69 编写于 作者: B Bayi Cheng 提交者: Brian Norris

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: NBayi Cheng <bayi.cheng@mediatek.com>
Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
上级 8142b47e
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册