File: apbuart.h

package info (click to toggle)
u-boot 2016.11%2Bdfsg1-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 104,408 kB
  • ctags: 428,706
  • sloc: ansic: 1,260,674; asm: 33,807; python: 10,106; perl: 8,014; makefile: 7,111; sh: 1,975; cpp: 1,829; yacc: 604; lex: 363; tcl: 28; sed: 24; awk: 6
file content (47 lines) | stat: -rw-r--r-- 1,639 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/* GRLIB APBUART definitions
 *
 * (C) Copyright 2010, 2015
 * Daniel Hellstrom, Cobham Gaisler, daniel@gaisler.com
 *
 * SPDX-License-Identifier:	GPL-2.0+
 */

#ifndef __GRLIB_APBUART_H__
#define __GRLIB_APBUART_H__

/* APBUART Register map */
typedef struct {
	volatile unsigned int data;
	volatile unsigned int status;
	volatile unsigned int ctrl;
	volatile unsigned int scaler;
} ambapp_dev_apbuart;

/*
 *  The following defines the bits in the LEON UART Status Registers.
 */

#define APBUART_STATUS_DR   0x00000001	/* Data Ready */
#define APBUART_STATUS_TSE  0x00000002	/* TX Send Register Empty */
#define APBUART_STATUS_THE  0x00000004	/* TX Hold Register Empty */
#define APBUART_STATUS_BR   0x00000008	/* Break Error */
#define APBUART_STATUS_OE   0x00000010	/* RX Overrun Error */
#define APBUART_STATUS_PE   0x00000020	/* RX Parity Error */
#define APBUART_STATUS_FE   0x00000040	/* RX Framing Error */
#define APBUART_STATUS_ERR  0x00000078	/* Error Mask */

/*
 *  The following defines the bits in the LEON UART Ctrl Registers.
 */

#define APBUART_CTRL_RE     0x00000001	/* Receiver enable */
#define APBUART_CTRL_TE     0x00000002	/* Transmitter enable */
#define APBUART_CTRL_RI     0x00000004	/* Receiver interrupt enable */
#define APBUART_CTRL_TI     0x00000008	/* Transmitter interrupt enable */
#define APBUART_CTRL_PS     0x00000010	/* Parity select */
#define APBUART_CTRL_PE     0x00000020	/* Parity enable */
#define APBUART_CTRL_FL     0x00000040	/* Flow control enable */
#define APBUART_CTRL_LB     0x00000080	/* Loop Back enable */
#define APBUART_CTRL_DBG    (1<<11)	/* Debug Bit used by GRMON */

#endif