It's more natural that any write that happens to touch the reset
register should cause a reset, rather than just a write that starts at
that offset.
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
/* Write the register */
memcpy(plat->reg + offset, ptr, len);
- if (offset == REG_RESET)
+ /* If the reset register was written to, do reset. */
+ if (offset <= REG_RESET && REG_RESET < offset + len)
reset_time(emul);
}
}