Skip to content

Commit

Permalink
hw/misc/mps2-scc: Fix condition for CFG3 register
Browse files Browse the repository at this point in the history
We currently guard the CFG3 register read with
 (scc_partno(s) == 0x524 && scc_partno(s) == 0x547)
which is clearly wrong as it is never true.

This register is present on all board types except AN524
and AN527; correct the condition.

Fixes: 6ac8081 ("hw/misc/mps2-scc: Implement changes for AN547")
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20240206132931.38376-6-peter.maydell@linaro.org
  • Loading branch information
pm215 committed Feb 15, 2024
1 parent f2b4a98 commit a72e625
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hw/misc/mps2-scc.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ static uint64_t mps2_scc_read(void *opaque, hwaddr offset, unsigned size)
r = s->cfg2;
break;
case A_CFG3:
if (scc_partno(s) == 0x524 && scc_partno(s) == 0x547) {
if (scc_partno(s) == 0x524 || scc_partno(s) == 0x547) {
/* CFG3 reserved on AN524 */
goto bad_offset;
}
Expand Down

0 comments on commit a72e625

Please sign in to comment.