2022-06-06 15:43:23 +03:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
/*
|
|
|
|
* LoongArch 7A1000 I/O interrupt controller definitions
|
|
|
|
*
|
|
|
|
* Copyright (C) 2021 Loongson Technology Corporation Limited
|
|
|
|
*/
|
|
|
|
|
2022-12-22 15:08:11 +03:00
|
|
|
#include "hw/sysbus.h"
|
|
|
|
|
2022-06-06 15:43:23 +03:00
|
|
|
#define TYPE_LOONGARCH_PCH_MSI "loongarch_pch_msi"
|
|
|
|
OBJECT_DECLARE_SIMPLE_TYPE(LoongArchPCHMSI, LOONGARCH_PCH_MSI)
|
|
|
|
|
2022-12-27 06:19:57 +03:00
|
|
|
/* MSI irq start from 32 to 255 */
|
|
|
|
#define PCH_MSI_IRQ_START 32
|
2022-06-06 15:43:23 +03:00
|
|
|
#define PCH_MSI_IRQ_END 255
|
2022-12-27 06:19:57 +03:00
|
|
|
#define PCH_MSI_IRQ_NUM 224
|
2022-06-06 15:43:23 +03:00
|
|
|
|
|
|
|
struct LoongArchPCHMSI {
|
|
|
|
SysBusDevice parent_obj;
|
2022-12-13 15:50:16 +03:00
|
|
|
qemu_irq *pch_msi_irq;
|
2022-06-06 15:43:23 +03:00
|
|
|
MemoryRegion msi_mmio;
|
2022-07-01 06:07:40 +03:00
|
|
|
/* irq base passed to upper extioi intc */
|
|
|
|
unsigned int irq_base;
|
2022-12-13 15:50:16 +03:00
|
|
|
unsigned int irq_num;
|
2022-06-06 15:43:23 +03:00
|
|
|
};
|