hw/pci-host/astro: Encode Astro version numbers
Add enum which encodes the Astro version numbers. Signed-off-by: Helge Deller <deller@gmx.de> Suggested-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Helge Deller committed
Mar 29, 2026 at 00:36 UTC
ec60364de23117f86ad90e8d8d52a90e92b9afc9
1 file changed
+4
-1
hw/pci-host/astro.c
+4
-1
@@ -41,6 +41,9 @@ static const int elroy_hpa_offsets[ELROY_NUM] = {
41
static const char elroy_rope_nr[ELROY_NUM] = {
42
0, 1, 4, 6 }; /* busnum path, e.g. [10:6] */
43
44
+/* Astro version numbers */
45
+enum { ID_ASTRO_1_0 = 0, ID_ASTRO_2_1 = 9, ID_ASTRO_3_0 = 2 };
46
+
47
/*
48
* Helper functions
49
*/
@@ -738,7 +741,7 @@ static MemTxResult astro_chip_read_with_attrs(void *opaque, hwaddr addr,
741
switch ((addr >> 3) << 3) {
742
/* R2I registers */
743
case 0x0000: /* ID */
741
- val = (0x01 << 3) | 0x01ULL;
744
+ val = ID_ASTRO_2_1;
745
break;
746
case 0x0008: /* IOC_CTRL */
747
val = s->ioc_ctrl;