summaryrefslogtreecommitdiffstats
path: root/include/hw/intc
diff options
context:
space:
mode:
authorHuacai Chen2020-12-21 12:05:34 +0100
committerPhilippe Mathieu-Daudé2021-01-04 23:24:44 +0100
commitdea96332327f2651f726244cc5bb41c4f9350f8b (patch)
treebb42ec8aa5e7ceaeca85e1797dbd658826b605ae /include/hw/intc
parentclock: Define and use new clock_display_freq() (diff)
downloadqemu-dea96332327f2651f726244cc5bb41c4f9350f8b.tar.gz
qemu-dea96332327f2651f726244cc5bb41c4f9350f8b.tar.xz
qemu-dea96332327f2651f726244cc5bb41c4f9350f8b.zip
hw/intc: Rework Loongson LIOINTC
As suggested by Philippe Mathieu-Daudé, rework Loongson's liointc: 1, Move macro definitions to loongson_liointc.h; 2, Remove magic values and use macros instead; 3, Replace dead D() code by trace events. Suggested-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Huacai Chen <chenhuacai@kernel.org> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20201221110538.3186646-2-chenhuacai@kernel.org> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Diffstat (limited to 'include/hw/intc')
-rw-r--r--include/hw/intc/loongson_liointc.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/hw/intc/loongson_liointc.h b/include/hw/intc/loongson_liointc.h
new file mode 100644
index 0000000000..848e65eb35
--- /dev/null
+++ b/include/hw/intc/loongson_liointc.h
@@ -0,0 +1,22 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (c) 2020 Huacai Chen <chenhc@lemote.com>
+ * Copyright (c) 2020 Jiaxun Yang <jiaxun.yang@flygoat.com>
+ *
+ */
+
+#ifndef LOONGSON_LIOINTC_H
+#define LOONGSON_LIOINTC_H
+
+#include "qemu/units.h"
+#include "hw/sysbus.h"
+#include "qom/object.h"
+
+#define TYPE_LOONGSON_LIOINTC "loongson.liointc"
+DECLARE_INSTANCE_CHECKER(struct loongson_liointc, LOONGSON_LIOINTC,
+ TYPE_LOONGSON_LIOINTC)
+
+#endif /* LOONGSON_LIOINTC_H */