hw/arm/virt-acpi-build: name GIC CPU Interface Structure appropriately
[qemu.git] / include / hw / arm / sysbus-fdt.h
1 /*
2 * Dynamic sysbus device tree node generation API
3 *
4 * Copyright Linaro Limited, 2014
5 *
6 * Authors:
7 * Alex Graf <agraf@suse.de>
8 * Eric Auger <eric.auger@linaro.org>
9 *
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms and conditions of the GNU General Public License,
12 * version 2 or later, as published by the Free Software Foundation.
13 *
14 * This program is distributed in the hope it will be useful, but WITHOUT
15 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
16 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
17 * more details.
18 *
19 * You should have received a copy of the GNU General Public License along with
20 * this program. If not, see <http://www.gnu.org/licenses/>.
21 *
22 */
23
24 #ifndef HW_ARM_SYSBUS_FDT_H
25 #define HW_ARM_SYSBUS_FDT_H
26
27 #include "hw/arm/arm.h"
28 #include "qemu-common.h"
29 #include "hw/sysbus.h"
30
31 /*
32 * struct that contains dimensioning parameters of the platform bus
33 */
34 typedef struct {
35 hwaddr platform_bus_base; /* start address of the bus */
36 hwaddr platform_bus_size; /* size of the bus */
37 int platform_bus_first_irq; /* first hwirq assigned to the bus */
38 int platform_bus_num_irqs; /* number of hwirq assigned to the bus */
39 } ARMPlatformBusSystemParams;
40
41 /*
42 * struct that contains all relevant info to build the fdt nodes of
43 * platform bus and attached dynamic sysbus devices
44 * in the future might be augmented with additional info
45 * such as PHY, CLK handles ...
46 */
47 typedef struct {
48 const ARMPlatformBusSystemParams *system_params;
49 struct arm_boot_info *binfo;
50 const char *intc; /* parent interrupt controller name */
51 } ARMPlatformBusFDTParams;
52
53 /**
54 * arm_register_platform_bus_fdt_creator - register a machine init done
55 * notifier that creates the device tree nodes of the platform bus and
56 * associated dynamic sysbus devices
57 */
58 void arm_register_platform_bus_fdt_creator(ARMPlatformBusFDTParams *fdt_params);
59
60 #endif