• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2009-2022 Huawei Technologies Co., Ltd. All rights reserved.
3  *
4  * UniProton is licensed under Mulan PSL v2.
5  * You can use this software according to the terms and conditions of the Mulan PSL v2.
6  * You may obtain a copy of Mulan PSL v2 at:
7  *          http://license.coscl.org.cn/MulanPSL2
8  * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
9  * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
10  * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
11  * See the Mulan PSL v2 for more details.
12  * Create: 2009-12-22
13  * Description: UniProton hi3093 demo
14  */
15 #ifndef __DW_UART_CORE_H__
16 #define __DW_UART_CORE_H__
17 
18 #include "uart_regs.h"
19 #include "common.h"
20 
21 #define MAX_UART_NUM          8
22 
23 extern S32 uart_reg_read(S32 uart_num, U32 offset, U32 *val);
24 extern void uart_reg_write(S32 uart_num, U32 offset, U32 val);
25 extern void uart_set_dll_dlh(S32 uart_num, U32 dll, U32 dlh);
26 extern void uart_get_dll_dlh(S32 uart_num, U32 *dll, U32 *dlh);
27 extern void uart_set_fifo_ctrl(S32 uart_num, U32 fifo_ctrl);
28 extern void uart_set_lcr(S32 uart_num, U32 lcr);
29 extern void uart_set_irq_enable(S32 uartno, U32 value);
30 extern S32 uart_is_txfifo_full(S32 uart_num);
31 extern S32 uart_is_rx_ready(S32 uart_num);
32 extern void uart_tx_char(S32 uart_num, const S8 c);
33 extern void uart_rx_char(S32 uart_num, S8 *c);
34 extern S32 uart_wait4idle(S32 uartno, U32 timeout);
35 
36 #endif /* __DW_UART_CORE_H__ */