summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/sparc/shared/include/apbuart.h
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2007-09-06 13:25:42 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2007-09-06 13:25:42 +0000
commite16e0caf72ca74b2f94c04ebeaac63bc460c5e6c (patch)
tree7ac3782574e95031c0d1fbe418a45fe6117046ac /c/src/lib/libbsp/sparc/shared/include/apbuart.h
parent2007-09-06 Daniel Hellstrom <daniel@gaisler.com> (diff)
downloadrtems-e16e0caf72ca74b2f94c04ebeaac63bc460c5e6c.tar.bz2
2007-09-06 Daniel Hellstrom <daniel@gaisler.com>
* Makefile.am: Add the following new drivers: PCI, b1553BRM, SpaceWire(GRSPW), CAN (GRCAN,OC_CAN), Raw UART. * shared/include/apbuart.h, shared/include/apbuart_pci.h, shared/include/apbuart_rasta.h, shared/include/b1553brm.h, shared/include/b1553brm_pci.h, shared/include/b1553brm_rasta.h, shared/include/debug_defs.h, shared/include/grcan.h, shared/include/grcan_rasta.h, shared/include/grcan_spwrtc.h, shared/include/grspw.h, shared/include/grspw_pci.h, shared/include/grspw_rasta.h, shared/include/occan.h, shared/include/occan_pci.h, shared/include/pci.h: New files.
Diffstat (limited to '')
-rw-r--r--c/src/lib/libbsp/sparc/shared/include/apbuart.h83
1 files changed, 83 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/sparc/shared/include/apbuart.h b/c/src/lib/libbsp/sparc/shared/include/apbuart.h
new file mode 100644
index 0000000000..c8a6e35fec
--- /dev/null
+++ b/c/src/lib/libbsp/sparc/shared/include/apbuart.h
@@ -0,0 +1,83 @@
+/*
+ * Driver interface for APBUART
+ *
+ * COPYRIGHT (c) 2007.
+ * Gaisler Research
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ *
+ */
+
+#ifndef __APBUART_H__
+#define __APBUART_H__
+
+#include <ambapp.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct {
+ unsigned int hw_dovr;
+ unsigned int hw_parity;
+ unsigned int hw_frame;
+ unsigned int sw_dovr;
+ unsigned int rx_cnt;
+ unsigned int tx_cnt;
+} apbuart_stats;
+
+#define APBUART_START 0
+#define APBUART_STOP 1
+#define APBUART_SET_RXFIFO_LEN 2
+#define APBUART_SET_TXFIFO_LEN 3
+#define APBUART_SET_BAUDRATE 4
+#define APBUART_SET_SCALER 5
+#define APBUART_SET_BLOCKING 6
+#define APBUART_SET_ASCII_MODE 7
+
+
+#define APBUART_GET_STATS 16
+#define APBUART_CLR_STATS 17
+
+#define APBUART_BLK_RX 0x1
+#define APBUART_BLK_TX 0x2
+#define APBUART_BLK_FLUSH 0x4
+
+
+#define APBUART_CTRL_RE 0x1
+#define APBUART_CTRL_TE 0x2
+#define APBUART_CTRL_RI 0x4
+#define APBUART_CTRL_TI 0x8
+#define APBUART_CTRL_PS 0x10
+#define APBUART_CTRL_PE 0x20
+#define APBUART_CTRL_FL 0x40
+#define APBUART_CTRL_LB 0x80
+#define APBUART_CTRL_EC 0x100
+#define APBUART_CTRL_TF 0x200
+#define APBUART_CTRL_RF 0x400
+
+#define APBUART_STATUS_DR 0x1
+#define APBUART_STATUS_TS 0x2
+#define APBUART_STATUS_TE 0x4
+#define APBUART_STATUS_BR 0x8
+#define APBUART_STATUS_OV 0x10
+#define APBUART_STATUS_PE 0x20
+#define APBUART_STATUS_FE 0x40
+#define APBUART_STATUS_TH 0x80
+#define APBUART_STATUS_RH 0x100
+#define APBUART_STATUS_TF 0x200
+#define APBUART_STATUS_RF 0x400
+
+/* Register APBUART driver
+ * bus = pointer to AMBA bus description used to search for APBUART(s).
+ * (&amba_conf for LEON3), (LEON2: see amba_scan)
+ */
+int apbuart_register (amba_confarea_type * bus);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __APBUART_H__ */