1 /* 2 * Copyright (c) 2021 EPAM Systems 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 #ifndef __XEN_CONSOLE_H__ 7 #define __XEN_CONSOLE_H__ 8 9 #include <zephyr/init.h> 10 #include <zephyr/device.h> 11 #include <zephyr/drivers/uart.h> 12 #include <zephyr/sys/device_mmio.h> 13 14 struct hvc_xen_data { 15 DEVICE_MMIO_RAM; /* should be first */ 16 const struct device *dev; 17 struct xencons_interface *intf; 18 uint64_t evtchn; 19 20 #ifdef CONFIG_UART_INTERRUPT_DRIVEN 21 uart_irq_callback_user_data_t irq_cb; 22 void *irq_cb_data; 23 #endif /* CONFIG_UART_INTERRUPT_DRIVEN */ 24 }; 25 26 int xen_console_init(const struct device *dev); 27 28 #endif /* __XEN_CONSOLE_H__ */ 29