[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 01/12] mos6522: add defines for IFR bit flags
From: |
Mark Cave-Ayland |
Subject: |
[PATCH v4 01/12] mos6522: add defines for IFR bit flags |
Date: |
Sat, 5 Mar 2022 15:09:46 +0000 |
These are intended to make it easier to see how the physical control lines
are wired for each instance.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
include/hw/misc/mos6522.h | 22 +++++++++++++++-------
1 file changed, 15 insertions(+), 7 deletions(-)
diff --git a/include/hw/misc/mos6522.h b/include/hw/misc/mos6522.h
index fc95d22b0f..be5c90d24d 100644
--- a/include/hw/misc/mos6522.h
+++ b/include/hw/misc/mos6522.h
@@ -41,13 +41,21 @@
#define IER_SET 0x80 /* set bits in IER */
#define IER_CLR 0 /* clear bits in IER */
-#define CA2_INT 0x01
-#define CA1_INT 0x02
-#define SR_INT 0x04 /* Shift register full/empty */
-#define CB2_INT 0x08
-#define CB1_INT 0x10
-#define T2_INT 0x20 /* Timer 2 interrupt */
-#define T1_INT 0x40 /* Timer 1 interrupt */
+#define CA2_INT_BIT 0
+#define CA1_INT_BIT 1
+#define SR_INT_BIT 2 /* Shift register full/empty */
+#define CB2_INT_BIT 3
+#define CB1_INT_BIT 4
+#define T2_INT_BIT 5 /* Timer 2 interrupt */
+#define T1_INT_BIT 6 /* Timer 1 interrupt */
+
+#define CA2_INT BIT(CA2_INT_BIT)
+#define CA1_INT BIT(CA1_INT_BIT)
+#define SR_INT BIT(SR_INT_BIT)
+#define CB2_INT BIT(CB2_INT_BIT)
+#define CB1_INT BIT(CB1_INT_BIT)
+#define T2_INT BIT(T2_INT_BIT)
+#define T1_INT BIT(T1_INT_BIT)
/* Bits in ACR */
#define T1MODE 0xc0 /* Timer 1 mode */
--
2.20.1
- [PATCH v4 00/12] mos6522: switch to gpios, add control line edge-triggering and extra debugging, Mark Cave-Ayland, 2022/03/05
- [PATCH v4 01/12] mos6522: add defines for IFR bit flags,
Mark Cave-Ayland <=
- [PATCH v4 02/12] mac_via: use IFR bit flag constants for VIA1 IRQs, Mark Cave-Ayland, 2022/03/05
- [PATCH v4 04/12] mos6522: switch over to use qdev gpios for IRQs, Mark Cave-Ayland, 2022/03/05
- [PATCH v4 03/12] mac_via: use IFR bit flag constants for VIA2 IRQs, Mark Cave-Ayland, 2022/03/05
- [PATCH v4 05/12] mos6522: remove update_irq() and set_sr_int() methods from MOS6522DeviceClass, Mark Cave-Ayland, 2022/03/05
- [PATCH v4 06/12] mos6522: use device_class_set_parent_reset() to propagate reset to parent, Mark Cave-Ayland, 2022/03/05
- [PATCH v4 07/12] mos6522: add register names to register read/write trace events, Mark Cave-Ayland, 2022/03/05
- [PATCH v4 08/12] mos6522: add "info via" HMP command for debugging, Mark Cave-Ayland, 2022/03/05
- [PATCH v4 09/12] mos6522: record last_irq_levels in mos6522_set_irq(), Mark Cave-Ayland, 2022/03/05
- [PATCH v4 10/12] mac_via: make SCSI_DATA (DRQ) bit live rather than latched, Mark Cave-Ayland, 2022/03/05
- [PATCH v4 11/12] mos6522: implement edge-triggering for CA1/2 and CB1/2 control line IRQs, Mark Cave-Ayland, 2022/03/05