TX1..4 --> TX[4]
authortobylorenz <tobylorenz>
Thu, 14 Apr 2005 16:49:33 +0000 (16:49 +0000)
committertobylorenz <tobylorenz>
Thu, 14 Apr 2005 16:49:33 +0000 (16:49 +0000)
RX1..4 --> RX[4]

src/arch/armnommu/core/serial.c
src/arch/armnommu/include/hardware.h

index 3ae98d4..0fb6e79 100644 (file)
@@ -17,7 +17,7 @@ void serial_putc(int ch)
 {
        /* wait for room in the 32 byte tx FIFO */
        while ((P2001_UART->r.STATUS & 0x3f) > /* 30 */ 0) ;
-       P2001_UART->w.TX1 = ch & 0xff;
+       P2001_UART->w.TX[0] = ch & 0xff;
 }
 
 /*
@@ -27,7 +27,7 @@ void serial_putc(int ch)
 int serial_getc(void)
 {
        while (((P2001_UART->r.STATUS >> 6) & 0x3f) == 0) ;
-       return P2001_UART->r.RX1 & 0xff;
+       return P2001_UART->r.RX[0] & 0xff;
 }
 
 /*
index 8cae12a..49264d6 100644 (file)
@@ -100,10 +100,7 @@ typedef struct {                                   // 0x00130000U
 
 typedef union {                                                // 0x00140000U
        struct {        // write
-               volatile unsigned int TX1;              // 0x00000000U
-               volatile unsigned int TX2;              // 0x00000004U
-               volatile unsigned int TX3;              // 0x00000008U
-               volatile unsigned int TX4;              // 0x0000000CU
+               volatile unsigned int TX[4];            // 0x00000000-0x000CU
                volatile unsigned int Baudrate;         // 0x00000010U
                volatile unsigned int reserved1[0x3];
                volatile unsigned int Config;           // 0x00000020U
@@ -113,10 +110,7 @@ typedef union {                                            // 0x00140000U
        } w;            // write
        
        struct {        // read
-               volatile unsigned int RX1;              // 0x00000000U
-               volatile unsigned int RX2;              // 0x00000004U
-               volatile unsigned int RX3;              // 0x00000008U
-               volatile unsigned int RX4;              // 0x0000000CU
+               volatile unsigned int RX[4];            // 0x00000000-0x000CU
                volatile unsigned int reserved1[0x4];
                volatile unsigned int PRE_STATUS;       // 0x00000020U
                volatile unsigned int STATUS;           // 0x00000024U