summaryrefslogtreecommitdiff
path: root/include/ns16550.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/ns16550.h')
-rw-r--r--include/ns16550.h42
1 files changed, 32 insertions, 10 deletions
diff --git a/include/ns16550.h b/include/ns16550.h
index e17a11e..996d915 100644
--- a/include/ns16550.h
+++ b/include/ns16550.h
@@ -7,6 +7,9 @@
* added prototypes for ns16550.c
* reduced no of com ports to 2
* modifications (c) Rob Taylor, Flying Pig Systems. 2000.
+ *
+ * added support for port on 64-bit bus
+ * by Richard Danter (richard.danter@windriver.com), (C) 2005 Wind River Systems
*/
#if (CFG_NS16550_REG_SIZE == 1)
@@ -45,15 +48,15 @@ struct NS16550 {
} __attribute__ ((packed));
#elif (CFG_NS16550_REG_SIZE == 4)
struct NS16550 {
- unsigned long rbr; /* 0 */
- unsigned long ier; /* 1 */
- unsigned long fcr; /* 2 */
- unsigned long lcr; /* 3 */
- unsigned long mcr; /* 4 */
- unsigned long lsr; /* 5 */
- unsigned long msr; /* 6 */
- unsigned long scr; /* 7 */
-} __attribute__ ((packed));
+ unsigned long rbr; /* 0 r */
+ unsigned long ier; /* 1 rw */
+ unsigned long fcr; /* 2 w */
+ unsigned long lcr; /* 3 rw */
+ unsigned long mcr; /* 4 rw */
+ unsigned long lsr; /* 5 r */
+ unsigned long msr; /* 6 r */
+ unsigned long scr; /* 7 rw */
+}; /* No need to pack an already aligned struct */
#elif (CFG_NS16550_REG_SIZE == -4)
struct NS16550 {
unsigned char rbr; /* 0 */
@@ -82,6 +85,25 @@ struct NS16550 {
int pad10:24;
#endif
} __attribute__ ((packed));
+#elif (CFG_NS16550_REG_SIZE == -8)
+struct NS16550 {
+ unsigned char rbr; /* 0 */
+ unsigned char pad0[7];
+ unsigned char ier; /* 1 */
+ unsigned char pad1[7];
+ unsigned char fcr; /* 2 */
+ unsigned char pad2[7];
+ unsigned char lcr; /* 3 */
+ unsigned char pad3[7];
+ unsigned char mcr; /* 4 */
+ unsigned char pad4[7];
+ unsigned char lsr; /* 5 */
+ unsigned char pad5[7];
+ unsigned char msr; /* 6 */
+ unsigned char pad6[7];
+ unsigned char scr; /* 7 */
+ unsigned char pad7[7];
+} __attribute__ ((packed));
#else
#error "Please define NS16550 registers size."
#endif
@@ -102,7 +124,7 @@ typedef volatile struct NS16550 *NS16550_t;
#define MCR_DMA_EN 0x04
#define MCR_TX_DFR 0x08
-#define LCR_WLS_MSK 0x03 /* character length slect mask */
+#define LCR_WLS_MSK 0x03 /* character length select mask */
#define LCR_WLS_5 0x00 /* 5 bit character length */
#define LCR_WLS_6 0x01 /* 6 bit character length */
#define LCR_WLS_7 0x02 /* 7 bit character length */