qemu/include/hw/intc/loongarch_pch_pic.h
Bibo Mao a41a74ca53 hw/intc/loongarch_pch: Replace legacy reset callback with new api
Replace legacy reset callback register device_class_set_legacy_reset()
with new function resettable_class_set_parent_phases(). With new API,
it will call reset callback of parent object.

The internal state has been cleared in parent object
LOONGARCH_PIC_COMMON, here parent_phases.hold() is directly called.

Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Reviewed-by: Song Gao <gaosong@loongson.cn>
2025-05-06 09:17:32 +08:00

28 lines
705 B
C

/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* LoongArch 7A1000 I/O interrupt controller definitions
*
* Copyright (c) 2021 Loongson Technology Corporation Limited
*/
#ifndef HW_LOONGARCH_PCH_PIC_H
#define HW_LOONGARCH_PCH_PIC_H
#include "hw/intc/loongarch_pic_common.h"
#define TYPE_LOONGARCH_PIC "loongarch_pic"
#define PCH_PIC_NAME(name) TYPE_LOONGARCH_PIC#name
OBJECT_DECLARE_TYPE(LoongarchPICState, LoongarchPICClass, LOONGARCH_PIC)
struct LoongarchPICState {
LoongArchPICCommonState parent_obj;
};
struct LoongarchPICClass {
LoongArchPICCommonClass parent_class;
DeviceRealize parent_realize;
ResettablePhases parent_phases;
};
#endif /* HW_LOONGARCH_PCH_PIC_H */