summaryrefslogtreecommitdiffstats
path: root/bsps/arm/csb337/include/at91rm9200_dbgu.h
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2017-12-23 18:18:56 +1100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-01-25 08:45:26 +0100
commit2afb22b7e1ebcbe40373ff7e0efae7d207c655a9 (patch)
tree44759efe9374f13200a97e96d91bd9a2b7e5ce2a /bsps/arm/csb337/include/at91rm9200_dbgu.h
parentMAINTAINERS: Add myself to Write After Approval. (diff)
downloadrtems-2afb22b7e1ebcbe40373ff7e0efae7d207c655a9.tar.bz2
Remove make preinstall
A speciality of the RTEMS build system was the make preinstall step. It copied header files from arbitrary locations into the build tree. The header files were included via the -Bsome/build/tree/path GCC command line option. This has at least seven problems: * The make preinstall step itself needs time and disk space. * Errors in header files show up in the build tree copy. This makes it hard for editors to open the right file to fix the error. * There is no clear relationship between source and build tree header files. This makes an audit of the build process difficult. * The visibility of all header files in the build tree makes it difficult to enforce API barriers. For example it is discouraged to use BSP-specifics in the cpukit. * An introduction of a new build system is difficult. * Include paths specified by the -B option are system headers. This may suppress warnings. * The parallel build had sporadic failures on some hosts. This patch removes the make preinstall step. All installed header files are moved to dedicated include directories in the source tree. Let @RTEMS_CPU@ be the target architecture, e.g. arm, powerpc, sparc, etc. Let @RTEMS_BSP_FAMILIY@ be a BSP family base directory, e.g. erc32, imx, qoriq, etc. The new cpukit include directories are: * cpukit/include * cpukit/score/cpu/@RTEMS_CPU@/include * cpukit/libnetworking The new BSP include directories are: * bsps/include * bsps/@RTEMS_CPU@/include * bsps/@RTEMS_CPU@/@RTEMS_BSP_FAMILIY@/include There are build tree include directories for generated files. The include directory order favours the most general header file, e.g. it is not possible to override general header files via the include path order. The "bootstrap -p" option was removed. The new "bootstrap -H" option should be used to regenerate the "headers.am" files. Update #3254.
Diffstat (limited to 'bsps/arm/csb337/include/at91rm9200_dbgu.h')
-rw-r--r--bsps/arm/csb337/include/at91rm9200_dbgu.h89
1 files changed, 89 insertions, 0 deletions
diff --git a/bsps/arm/csb337/include/at91rm9200_dbgu.h b/bsps/arm/csb337/include/at91rm9200_dbgu.h
new file mode 100644
index 0000000000..9a65483db0
--- /dev/null
+++ b/bsps/arm/csb337/include/at91rm9200_dbgu.h
@@ -0,0 +1,89 @@
+/*
+ * Atmel AT91RM9200_DBGU Register definitions
+ *
+ * Copyright (c) 2003 by Cogent Computer Systems
+ * Written by Mike Kelly <mike@cogcomp.com>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ */
+#ifndef __AT91RM9200_DBGU_H__
+#define __AT91RM9200_DBGU_H__
+
+#include "bits.h"
+
+/* Register Offsets */
+#define DBGU_CR 0x00 /* Control Register */
+#define DBGU_MR 0x04 /* Mode Register */
+#define DBGU_IER 0x08 /* Interrupt Enable Register */
+#define DBGU_IDR 0x0C /* Interrupt Disable Register */
+#define DBGU_IMR 0x10 /* Interrupt Mask Register */
+#define DBGU_SR 0x14 /* Channel Status Register */
+#define DBGU_RHR 0x18 /* Receiver Holding Register */
+#define DBGU_THR 0x1C /* Transmitter Holding Register */
+#define DBGU_BRGR 0x20 /* Baud Rate Generator Register */
+#define DBGU_C1R 0x40 /* Chip ID1 Register */
+#define DBGU_C2R 0x44 /* Chip ID2 Register */
+#define DBGU_FNTR 0x48 /* Force NTRST Register */
+
+/* Bit Defines */
+/* Control Register, DBGU_CR, Offset 0x00 */
+#define DBGU_CR_RSTRX BIT2 /* 1 = Reset and disable receiver */
+#define DBGU_CR_RSTTX BIT3 /* 1 = Reset and disable transmitter */
+#define DBGU_CR_RXEN BIT4 /* 1 = Receiver enable */
+#define DBGU_CR_RXDIS BIT5 /* 1 = Receiver disable */
+#define DBGU_CR_TXEN BIT6 /* 1 = Transmitter enable */
+#define DBGU_CR_TXDIS BIT7 /* 1 = Transmitter disable */
+#define DBGU_CR_RSTSTA BIT8 /* 1 = Reset PARE, FRAME and OVRE in DBGU_SR. */
+
+/* Mode Register. DBGU_MR. Offset 0x04 */
+#define DBGU_MR_PAR_EVEN (0x0 << 9) /* Even Parity */
+#define DBGU_MR_PAR_ODD (0x1 << 9) /* Odd Parity */
+#define DBGU_MR_PAR_SPACE (0x2 << 9) /* Parity forced to 0 (Space) */
+#define DBGU_MR_PAR_MARK (0x3 << 9) /* Parity forced to 1 (Mark) */
+#define DBGU_MR_PAR_NONE (0x4 << 9) /* No Parity */
+#define DBGU_MR_PAR_MDROP (0x6 << 9) /* Multi-drop mode */
+#define DBGU_MR_CHMODE_NORM (0x0 << 14) /* Normal Mode */
+#define DBGU_MR_CHMODE_AUTO (0x1 << 14) /* Auto Echo: RXD drives TXD */
+#define DBGU_MR_CHMODE_LOC (0x2 << 14) /* Local Loopback: TXD drives RXD */
+#define DBGU_MR_CHMODE_REM (0x3 << 14) /* Remote Loopback: RXD pin connected to TXD pin. */
+
+/* Interrupt Enable Register, DBGU_IER, Offset 0x08 */
+/* Interrupt Disable Register, DBGU_IDR, Offset 0x0C */
+/* Interrupt Mask Register, DBGU_IMR, Offset 0x10 */
+/* Channel Status Register, DBGU_SR, Offset 0x14 */
+#define DBGU_INT_RXRDY BIT0 /* RXRDY Interrupt */
+#define DBGU_INT_TXRDY BIT1 /* TXRDY Interrupt */
+#define DBGU_INT_ENDRX BIT3 /* End of Receive Transfer Interrupt */
+/*efine DBGU_INT_ENDTX BIT4 /* End of Transmit Interrupt */
+#define DBGU_INT_OVRE BIT5 /* Overrun Interrupt */
+#define DBGU_INT_FRAME BIT6 /* Framing Error Interrupt */
+#define DBGU_INT_PARE BIT7 /* Parity Error Interrupt */
+#define DBGU_INT_TXEMPTY BIT9 /* TXEMPTY Interrupt */
+#define DBGU_INT_TXBUFE BIT11 /* TXBUFE Interrupt */
+#define DBGU_INT_RXBUFF BIT12 /* RXBUFF Interrupt */
+#define DBGU_INT_COMM_TX BIT30 /* COMM_TX Interrupt */
+#define DBGU_INT_COMM_RX BIT31 /* COMM_RX Interrupt */
+#define DBGU_INT_ALL 0xC0001AFB /* all assigned bits */
+
+/* FORCE_NTRST Register, DBGU_FNTR, Offset 0x48 */
+#define DBGU_FNTR_NTRST BIT0 /* 1 = Force NTRST low in JTAG */
+
+typedef struct {
+ volatile uint32_t cr;
+ volatile uint32_t mr;
+ volatile uint32_t ier;
+ volatile uint32_t idr;
+ volatile uint32_t imr;
+ volatile uint32_t sr;
+ volatile uint32_t rhr;
+ volatile uint32_t thr;
+ volatile uint32_t brgr;
+ volatile uint32_t _res0[7];
+ volatile uint32_t cidr;
+ volatile uint32_t exid;
+ volatile uint32_t fnr;
+} at91rm9200_dbgu_regs_t;
+
+#endif /* __AT91RM9200_DBGU_H__ */