register: fix incorrect read mask
commit4729b3a41d11f053a6d03620ff12b266dd0ab330
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>
Tue, 14 Feb 2017 22:55:35 +0000 (14 19:55 -0300)
committerMichael Tokarev <mjt@tls.msk.ru>
Tue, 28 Feb 2017 06:03:38 +0000 (28 09:03 +0300)
treed10e815be25351150230b5aad8027f901e7c87d2
parent6048018ef6112476b529807ad603015314151bb2
register: fix incorrect read mask

The register_read() and register_write() functions expect a bitmask argument.
To avoid duplicated code, a new inlined function register_enabled_mask() is
introduced.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
hw/core/register.c