I forgot to shift value read from real device. If the emulated
register offset is not aligned with 4 byte, the write emulation will
not be handled well because of corrupting register value read from
real device. The patch fixes this issue.
Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
if (reg_grp_entry == NULL)
goto out;
- /* adjust the write value to appropriate CFC-CFF window */
+ /* adjust the read and write value to appropriate CFC-CFF window */
+ read_val <<= ((address & 3) << 3);
val <<= ((address & 3) << 3);
emul_len = len;