diff options
author | Huacai Chen <chenhuacai@kernel.org> | 2020-12-21 19:05:34 +0800 |
---|---|---|
committer | Philippe Mathieu-Daudé <f4bug@amsat.org> | 2021-01-04 23:24:44 +0100 |
commit | dea96332327f2651f726244cc5bb41c4f9350f8b (patch) | |
tree | bb42ec8aa5e7ceaeca85e1797dbd658826b605ae /include/hw/intc/loongson_liointc.h | |
parent | b7cd9c1e840d511319f326ee8cab772b3ac50a3b (diff) | |
download | qemu-dea96332327f2651f726244cc5bb41c4f9350f8b.zip qemu-dea96332327f2651f726244cc5bb41c4f9350f8b.tar.gz qemu-dea96332327f2651f726244cc5bb41c4f9350f8b.tar.bz2 |
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/loongson_liointc.h')
-rw-r--r-- | include/hw/intc/loongson_liointc.h | 22 |
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 0000000..848e65e --- /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 */ |