Merge tag 'qemu-macppc-20230206' of https://github.com/mcayland/qemu into staging
[qemu.git] / include / hw / char / goldfish_tty.h
blobd59733e5ae41f86dbdc075a7886e0c7802e21fb5
1 /*
2 * SPDX-License-Identifier: GPL-2.0-or-later
4 * Goldfish TTY
6 * (c) 2020 Laurent Vivier <laurent@vivier.eu>
8 */
10 #ifndef HW_CHAR_GOLDFISH_TTY_H
11 #define HW_CHAR_GOLDFISH_TTY_H
13 #include "qemu/fifo8.h"
14 #include "chardev/char-fe.h"
15 #include "hw/sysbus.h"
17 #define TYPE_GOLDFISH_TTY "goldfish_tty"
18 OBJECT_DECLARE_SIMPLE_TYPE(GoldfishTTYState, GOLDFISH_TTY)
20 #define GOLFISH_TTY_BUFFER_SIZE 128
22 struct GoldfishTTYState {
23 SysBusDevice parent_obj;
25 MemoryRegion iomem;
26 qemu_irq irq;
27 CharBackend chr;
29 uint32_t data_len;
30 uint64_t data_ptr;
31 bool int_enabled;
33 Fifo8 rx_fifo;
36 #endif