hw/misc/mps2-scc: Factor out which-board conditionals
authorPeter Maydell <peter.maydell@linaro.org>
Tue, 6 Feb 2024 13:29:24 +0000 (13:29 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 15 Feb 2024 14:32:38 +0000 (14:32 +0000)
commit5f3bbbdbd0d2c87855936c20b78f1e538802bcd9
tree40be6975876f40dc5f9b304fe323a4a836d03fc3
parenta72e625078d4766367510887552f8c2f49bd7039
hw/misc/mps2-scc: Factor out which-board conditionals

The MPS SCC device has a lot of different flavours for the various
different MPS FPGA images, which look mostly similar but have
differences in how particular registers are handled.  Currently we
deal with this with a lot of open-coded checks on scc_partno(), but
as we add more board types this is getting a bit hard to read.

Factor out the conditions into some functions which we can
give more descriptive names to.

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-7-peter.maydell@linaro.org
hw/misc/mps2-scc.c