aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTianrui Zhao <zhaotianrui@loongson.cn>2022-12-14 09:57:18 +0800
committerSong Gao <gaosong@loongson.cn>2023-01-06 14:12:26 +0800
commit270950b49d36659372acbc12e65ff34969bed678 (patch)
tree6339ab29ab622befe9fd58b423ad4d863e3203ab /include
parent6027d2740524cf04ab38564c0c299fddbeaa6723 (diff)
downloadqemu-270950b49d36659372acbc12e65ff34969bed678.zip
qemu-270950b49d36659372acbc12e65ff34969bed678.tar.gz
qemu-270950b49d36659372acbc12e65ff34969bed678.tar.bz2
hw/intc/loongarch_pch_pic: add irq number property
With loongarch 7A1000 manual, irq number supported can be set in PCH_PIC_INT_ID_HI register. This patch adds irq number property for loongarch_pch_pic, so that virt machine can set different irq number when pch_pic intc is added. Signed-off-by: Tianrui Zhao <zhaotianrui@loongson.cn> Reviewed-by: Song Gao <gaosong@loongson.cn> Message-Id: <20230104020518.2564263-3-zhaotianrui@loongson.cn> Signed-off-by: Song Gao <gaosong@loongson.cn>
Diffstat (limited to 'include')
-rw-r--r--include/hw/intc/loongarch_pch_pic.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/include/hw/intc/loongarch_pch_pic.h b/include/hw/intc/loongarch_pch_pic.h
index 2d4aa9e..efae5fa 100644
--- a/include/hw/intc/loongarch_pch_pic.h
+++ b/include/hw/intc/loongarch_pch_pic.h
@@ -9,11 +9,9 @@
#define PCH_PIC_NAME(name) TYPE_LOONGARCH_PCH_PIC#name
OBJECT_DECLARE_SIMPLE_TYPE(LoongArchPCHPIC, LOONGARCH_PCH_PIC)
-#define PCH_PIC_IRQ_START 0
-#define PCH_PIC_IRQ_END 63
#define PCH_PIC_IRQ_NUM 64
#define PCH_PIC_INT_ID_VAL 0x7000000UL
-#define PCH_PIC_INT_ID_NUM 0x3f0001UL
+#define PCH_PIC_INT_ID_VER 0x1UL
#define PCH_PIC_INT_ID_LO 0x00
#define PCH_PIC_INT_ID_HI 0x04
@@ -66,4 +64,5 @@ struct LoongArchPCHPIC {
MemoryRegion iomem32_low;
MemoryRegion iomem32_high;
MemoryRegion iomem8;
+ unsigned int irq_num;
};