提交 e9cbbcac 编写于 作者: E Edgar E. Iglesias 提交者: Edgar E. Iglesias

pflash: Dont open memarea for full IO if already done.

When wcycle is non zero the area is already opened for readable IO.
Avoiding the re-registration of the memarea significantly speeds up
the flash emulation. In particular for flashes connected through 8 or
16-bit buses.
Signed-off-by: NEdgar E. Iglesias <edgar.iglesias@petalogix.com>
上级 4737fa26
......@@ -247,8 +247,10 @@ static void pflash_write(pflash_t *pfl, target_phys_addr_t offset,
DPRINTF("%s: writing offset " TARGET_FMT_plx " value %08x width %d wcycle 0x%x\n",
__func__, offset, value, width, pfl->wcycle);
/* Set the device in I/O access mode */
cpu_register_physical_memory(pfl->base, pfl->total_len, pfl->fl_mem);
if (!pfl->wcycle) {
/* Set the device in I/O access mode */
cpu_register_physical_memory(pfl->base, pfl->total_len, pfl->fl_mem);
}
switch (pfl->wcycle) {
case 0:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册