1 /* SPDX-License-Identifier: BSD-2-Clause */ 2 /* 3 * Copyright 2022 NXP 4 */ 5 6 #ifndef __DRIVERS_HTIF_H__ 7 #define __DRIVERS_HTIF_H__ 8 9 #include <drivers/serial.h> 10 #include <types_ext.h> 11 12 #define HTIF_CMD_WRITE 1 13 #define HTIF_DEV_CONSOLE 1 14 #define HTIF_REG_SIZE (2 * RISCV_XLEN_BYTES) 15 16 struct htif_console_data { 17 struct io_pa_va base; 18 struct serial_chip chip; 19 }; 20 21 void htif_lock_global(void); 22 void htif_unlock_global(void); 23 void htif_console_init(struct htif_console_data *pd, paddr_t pbase); 24 25 #endif /*__DRIVERS_HTIF_H__*/ 26