]> Git Repo - qemu.git/blame - hw/spapr_vio.h
Implement the bus structure for PAPR virtual IO
[qemu.git] / hw / spapr_vio.h
CommitLineData
4040ab72
DG
1#ifndef _HW_SPAPR_VIO_H
2#define _HW_SPAPR_VIO_H
3/*
4 * QEMU sPAPR VIO bus definitions
5 *
6 * Copyright (c) 2010 David Gibson, IBM Corporation <[email protected]>
7 * Based on the s390 virtio bus definitions:
8 * Copyright (c) 2009 Alexander Graf <[email protected]>
9 *
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation; either
13 * version 2 of the License, or (at your option) any later version.
14 *
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
19 *
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library; if not, see <http://www.gnu.org/licenses/>.
22 */
23
24typedef struct VIOsPAPRDevice {
25 DeviceState qdev;
26 uint32_t reg;
27} VIOsPAPRDevice;
28
29typedef struct VIOsPAPRBus {
30 BusState bus;
31} VIOsPAPRBus;
32
33typedef struct {
34 DeviceInfo qdev;
35 const char *dt_name, *dt_type, *dt_compatible;
36 int (*init)(VIOsPAPRDevice *dev);
37 void (*hcalls)(VIOsPAPRBus *bus);
38 int (*devnode)(VIOsPAPRDevice *dev, void *fdt, int node_off);
39} VIOsPAPRDeviceInfo;
40
41extern VIOsPAPRBus *spapr_vio_bus_init(void);
42extern VIOsPAPRDevice *spapr_vio_find_by_reg(VIOsPAPRBus *bus, uint32_t reg);
43extern void spapr_vio_bus_register_withprop(VIOsPAPRDeviceInfo *info);
44extern int spapr_populate_vdevice(VIOsPAPRBus *bus, void *fdt);
45
46void vty_putchars(VIOsPAPRDevice *sdev, uint8_t *buf, int len);
47void spapr_vty_create(VIOsPAPRBus *bus,
48 uint32_t reg, CharDriverState *chardev);
49
50#endif /* _HW_SPAPR_VIO_H */
This page took 0.028137 seconds and 4 git commands to generate.