Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hw/arm/exynos4210: Put external GIC into state struct
Switch the creation of the external GIC to the new-style "embedded in state struct" approach, so we can easily refer to the object elsewhere during realize. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20220404154658.565020-9-peter.maydell@linaro.org
- Loading branch information
Showing
5 changed files
with
53 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
* Samsung exynos4210 GIC implementation. Based on hw/arm_gic.c | ||
* | ||
* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. | ||
* All rights reserved. | ||
* | ||
* Evgeny Voevodin <e.voevodin@samsung.com> | ||
* | ||
* This program is free software; you can redistribute it and/or modify it | ||
* under the terms of the GNU General Public License as published by the | ||
* Free Software Foundation; either version 2 of the License, or (at your | ||
* option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
* See the GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License along | ||
* with this program; if not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
#ifndef HW_INTC_EXYNOS4210_GIC_H | ||
#define HW_INTC_EXYNOS4210_GIC_H | ||
|
||
#include "hw/sysbus.h" | ||
|
||
#define TYPE_EXYNOS4210_GIC "exynos4210.gic" | ||
OBJECT_DECLARE_SIMPLE_TYPE(Exynos4210GicState, EXYNOS4210_GIC) | ||
|
||
#define EXYNOS4210_GIC_NCPUS 2 | ||
|
||
struct Exynos4210GicState { | ||
SysBusDevice parent_obj; | ||
|
||
MemoryRegion cpu_container; | ||
MemoryRegion dist_container; | ||
MemoryRegion cpu_alias[EXYNOS4210_GIC_NCPUS]; | ||
MemoryRegion dist_alias[EXYNOS4210_GIC_NCPUS]; | ||
uint32_t num_cpu; | ||
DeviceState *gic; | ||
}; | ||
|
||
#endif |