aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/asm-arm
diff options
context:
space:
mode:
authorJulien Grall <julien.grall@linaro.org>2013-08-01 17:09:26 +0100
committerIan Campbell <ian.campbell@citrix.com>2013-08-05 10:23:15 +0100
commit33440c3f60b8922d39ff1bc64ba92f5f8d355e37 (patch)
treee52949c6ffdb795780294538dcc1a6c878fb4097 /xen/include/asm-arm
parent56b20c4f5dbfcc612dc7b7fb0a1545ced6e70163 (diff)
downloadxen-33440c3f60b8922d39ff1bc64ba92f5f8d355e37.tar.gz
xen-33440c3f60b8922d39ff1bc64ba92f5f8d355e37.tar.bz2
xen-33440c3f60b8922d39ff1bc64ba92f5f8d355e37.zip
pl011: Move registers' definition in a separate file
Signed-off-by: Julien Grall <julien.grall@linaro.org> Reviewed-by: Tim Deegan <tim@xen.org>
Diffstat (limited to 'xen/include/asm-arm')
-rw-r--r--xen/include/asm-arm/pl011-uart.h80
1 files changed, 80 insertions, 0 deletions
diff --git a/xen/include/asm-arm/pl011-uart.h b/xen/include/asm-arm/pl011-uart.h
new file mode 100644
index 0000000000..8c4edd4a48
--- /dev/null
+++ b/xen/include/asm-arm/pl011-uart.h
@@ -0,0 +1,80 @@
+/*
+ * xen/include/asm-arm/pl011-uart.h
+ *
+ * Common constant definition between early printk and the UART driver
+ * for the pl011 UART
+ *
+ * Tim Deegan <tim@xen.org>
+ * Copyright (c) 2011 Citrix Systems.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef __ASM_ARM_PL011_H
+#define __ASM_ARM_PL011_H
+
+/* PL011 register addresses */
+#define DR (0x00)
+#define RSR (0x04)
+#define FR (0x18)
+#define ILPR (0x20)
+#define IBRD (0x24)
+#define FBRD (0x28)
+#define LCR_H (0x2c)
+#define CR (0x30)
+#define IFLS (0x34)
+#define IMSC (0x38)
+#define RIS (0x3c)
+#define MIS (0x40)
+#define ICR (0x44)
+#define DMACR (0x48)
+
+/* CR bits */
+#define RXE (1<<9) /* Receive enable */
+#define TXE (1<<8) /* Transmit enable */
+#define UARTEN (1<<0) /* UART enable */
+
+/* FR bits */
+#define TXFE (1<<7) /* TX FIFO empty */
+#define RXFE (1<<4) /* RX FIFO empty */
+
+/* LCR_H bits */
+#define SPS (1<<7) /* Stick parity select */
+#define FEN (1<<4) /* FIFO enable */
+#define STP2 (1<<3) /* Two stop bits select */
+#define EPS (1<<2) /* Even parity select */
+#define PEN (1<<1) /* Parity enable */
+#define BRK (1<<0) /* Send break */
+
+/* Interrupt bits (IMSC, MIS, ICR) */
+#define OEI (1<<10) /* Overrun Error interrupt mask */
+#define BEI (1<<9) /* Break Error interrupt mask */
+#define PEI (1<<8) /* Parity Error interrupt mask */
+#define FEI (1<<7) /* Framing Error interrupt mask */
+#define RTI (1<<6) /* Receive Timeout interrupt mask */
+#define TXI (1<<5) /* Transmit interrupt mask */
+#define RXI (1<<4) /* Receive interrupt mask */
+#define DSRMI (1<<3) /* nUARTDSR Modem interrupt mask */
+#define DCDMI (1<<2) /* nUARTDCD Modem interrupt mask */
+#define CTSMI (1<<1) /* nUARTCTS Modem interrupt mask */
+#define RIMI (1<<0) /* nUARTRI Modem interrupt mask */
+#define ALLI OEI|BEI|PEI|FEI|RTI|TXI|RXI|DSRMI|DCDMI|CTSMI|RIMI
+
+#endif /* __ASM_ARM_PL011_H */
+
+/*
+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ */