Merge tag 'v9.0.0-rc3'
[qemu/ar7.git] / include / hw / intc / exynos4210_combiner.h
blobbd207a7e6e47e689dd6b2683fb330bbe0e5fe136
1 /*
2 * Samsung exynos4210 Interrupt Combiner
4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
5 * All rights reserved.
7 * Evgeny Voevodin <e.voevodin@samsung.com>
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published by the
11 * Free Software Foundation; either version 2 of the License, or (at your
12 * option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17 * See the GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License along
20 * with this program; if not, see <http://www.gnu.org/licenses/>.
23 #ifndef HW_INTC_EXYNOS4210_COMBINER_H
24 #define HW_INTC_EXYNOS4210_COMBINER_H
26 #include "hw/sysbus.h"
29 * State for each output signal of internal combiner
31 typedef struct CombinerGroupState {
32 uint8_t src_mask; /* 1 - source enabled, 0 - disabled */
33 uint8_t src_pending; /* Pending source interrupts before masking */
34 } CombinerGroupState;
36 #define TYPE_EXYNOS4210_COMBINER "exynos4210.combiner"
37 OBJECT_DECLARE_SIMPLE_TYPE(Exynos4210CombinerState, EXYNOS4210_COMBINER)
39 /* Number of groups and total number of interrupts for the internal combiner */
40 #define IIC_NGRP 64
41 #define IIC_NIRQ (IIC_NGRP * 8)
42 #define IIC_REGSET_SIZE 0x41
44 struct Exynos4210CombinerState {
45 SysBusDevice parent_obj;
47 MemoryRegion iomem;
49 struct CombinerGroupState group[IIC_NGRP];
50 uint32_t reg_set[IIC_REGSET_SIZE];
51 uint32_t icipsr[2];
52 uint32_t external; /* 1 means that this combiner is external */
54 qemu_irq output_irq[IIC_NGRP];
57 #endif