diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2013-01-06 23:55:02 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-16 01:02:51 -0500 |
commit | 82313e66b1a449b08682043929003fab38ebf037 (patch) | |
tree | c56f9ac95ebba4fce5c07377ced6b2c3eeaca731 | |
parent | 905f4ba252f933344e43a32ef4524bc8412c2e90 (diff) |
serial: imx: Fix checkpatch errors related to spacing
Fixed checkpatch errors and warnings related to incorrect spacing.
Cc: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/tty/serial/imx.c | 222 |
1 files changed, 111 insertions, 111 deletions
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index 59819121fe9b..d6bce6c6329f 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c | |||
@@ -73,102 +73,102 @@ | |||
73 | #define IMX21_UTS 0xb4 /* UART Test Register on all other i.mx*/ | 73 | #define IMX21_UTS 0xb4 /* UART Test Register on all other i.mx*/ |
74 | 74 | ||
75 | /* UART Control Register Bit Fields.*/ | 75 | /* UART Control Register Bit Fields.*/ |
76 | #define URXD_CHARRDY (1<<15) | 76 | #define URXD_CHARRDY (1<<15) |
77 | #define URXD_ERR (1<<14) | 77 | #define URXD_ERR (1<<14) |
78 | #define URXD_OVRRUN (1<<13) | 78 | #define URXD_OVRRUN (1<<13) |
79 | #define URXD_FRMERR (1<<12) | 79 | #define URXD_FRMERR (1<<12) |
80 | #define URXD_BRK (1<<11) | 80 | #define URXD_BRK (1<<11) |
81 | #define URXD_PRERR (1<<10) | 81 | #define URXD_PRERR (1<<10) |
82 | #define UCR1_ADEN (1<<15) /* Auto detect interrupt */ | 82 | #define UCR1_ADEN (1<<15) /* Auto detect interrupt */ |
83 | #define UCR1_ADBR (1<<14) /* Auto detect baud rate */ | 83 | #define UCR1_ADBR (1<<14) /* Auto detect baud rate */ |
84 | #define UCR1_TRDYEN (1<<13) /* Transmitter ready interrupt enable */ | 84 | #define UCR1_TRDYEN (1<<13) /* Transmitter ready interrupt enable */ |
85 | #define UCR1_IDEN (1<<12) /* Idle condition interrupt */ | 85 | #define UCR1_IDEN (1<<12) /* Idle condition interrupt */ |
86 | #define UCR1_RRDYEN (1<<9) /* Recv ready interrupt enable */ | 86 | #define UCR1_RRDYEN (1<<9) /* Recv ready interrupt enable */ |
87 | #define UCR1_RDMAEN (1<<8) /* Recv ready DMA enable */ | 87 | #define UCR1_RDMAEN (1<<8) /* Recv ready DMA enable */ |
88 | #define UCR1_IREN (1<<7) /* Infrared interface enable */ | 88 | #define UCR1_IREN (1<<7) /* Infrared interface enable */ |
89 | #define UCR1_TXMPTYEN (1<<6) /* Transimitter empty interrupt enable */ | 89 | #define UCR1_TXMPTYEN (1<<6) /* Transimitter empty interrupt enable */ |
90 | #define UCR1_RTSDEN (1<<5) /* RTS delta interrupt enable */ | 90 | #define UCR1_RTSDEN (1<<5) /* RTS delta interrupt enable */ |
91 | #define UCR1_SNDBRK (1<<4) /* Send break */ | 91 | #define UCR1_SNDBRK (1<<4) /* Send break */ |
92 | #define UCR1_TDMAEN (1<<3) /* Transmitter ready DMA enable */ | 92 | #define UCR1_TDMAEN (1<<3) /* Transmitter ready DMA enable */ |
93 | #define IMX1_UCR1_UARTCLKEN (1<<2) /* UART clock enabled, i.mx1 only */ | 93 | #define IMX1_UCR1_UARTCLKEN (1<<2) /* UART clock enabled, i.mx1 only */ |
94 | #define UCR1_DOZE (1<<1) /* Doze */ | 94 | #define UCR1_DOZE (1<<1) /* Doze */ |
95 | #define UCR1_UARTEN (1<<0) /* UART enabled */ | 95 | #define UCR1_UARTEN (1<<0) /* UART enabled */ |
96 | #define UCR2_ESCI (1<<15) /* Escape seq interrupt enable */ | 96 | #define UCR2_ESCI (1<<15) /* Escape seq interrupt enable */ |
97 | #define UCR2_IRTS (1<<14) /* Ignore RTS pin */ | 97 | #define UCR2_IRTS (1<<14) /* Ignore RTS pin */ |
98 | #define UCR2_CTSC (1<<13) /* CTS pin control */ | 98 | #define UCR2_CTSC (1<<13) /* CTS pin control */ |
99 | #define UCR2_CTS (1<<12) /* Clear to send */ | 99 | #define UCR2_CTS (1<<12) /* Clear to send */ |
100 | #define UCR2_ESCEN (1<<11) /* Escape enable */ | 100 | #define UCR2_ESCEN (1<<11) /* Escape enable */ |
101 | #define UCR2_PREN (1<<8) /* Parity enable */ | 101 | #define UCR2_PREN (1<<8) /* Parity enable */ |
102 | #define UCR2_PROE (1<<7) /* Parity odd/even */ | 102 | #define UCR2_PROE (1<<7) /* Parity odd/even */ |
103 | #define UCR2_STPB (1<<6) /* Stop */ | 103 | #define UCR2_STPB (1<<6) /* Stop */ |
104 | #define UCR2_WS (1<<5) /* Word size */ | 104 | #define UCR2_WS (1<<5) /* Word size */ |
105 | #define UCR2_RTSEN (1<<4) /* Request to send interrupt enable */ | 105 | #define UCR2_RTSEN (1<<4) /* Request to send interrupt enable */ |
106 | #define UCR2_ATEN (1<<3) /* Aging Timer Enable */ | 106 | #define UCR2_ATEN (1<<3) /* Aging Timer Enable */ |
107 | #define UCR2_TXEN (1<<2) /* Transmitter enabled */ | 107 | #define UCR2_TXEN (1<<2) /* Transmitter enabled */ |
108 | #define UCR2_RXEN (1<<1) /* Receiver enabled */ | 108 | #define UCR2_RXEN (1<<1) /* Receiver enabled */ |
109 | #define UCR2_SRST (1<<0) /* SW reset */ | 109 | #define UCR2_SRST (1<<0) /* SW reset */ |
110 | #define UCR3_DTREN (1<<13) /* DTR interrupt enable */ | 110 | #define UCR3_DTREN (1<<13) /* DTR interrupt enable */ |
111 | #define UCR3_PARERREN (1<<12) /* Parity enable */ | 111 | #define UCR3_PARERREN (1<<12) /* Parity enable */ |
112 | #define UCR3_FRAERREN (1<<11) /* Frame error interrupt enable */ | 112 | #define UCR3_FRAERREN (1<<11) /* Frame error interrupt enable */ |
113 | #define UCR3_DSR (1<<10) /* Data set ready */ | 113 | #define UCR3_DSR (1<<10) /* Data set ready */ |
114 | #define UCR3_DCD (1<<9) /* Data carrier detect */ | 114 | #define UCR3_DCD (1<<9) /* Data carrier detect */ |
115 | #define UCR3_RI (1<<8) /* Ring indicator */ | 115 | #define UCR3_RI (1<<8) /* Ring indicator */ |
116 | #define UCR3_TIMEOUTEN (1<<7) /* Timeout interrupt enable */ | 116 | #define UCR3_TIMEOUTEN (1<<7) /* Timeout interrupt enable */ |
117 | #define UCR3_RXDSEN (1<<6) /* Receive status interrupt enable */ | 117 | #define UCR3_RXDSEN (1<<6) /* Receive status interrupt enable */ |
118 | #define UCR3_AIRINTEN (1<<5) /* Async IR wake interrupt enable */ | 118 | #define UCR3_AIRINTEN (1<<5) /* Async IR wake interrupt enable */ |
119 | #define UCR3_AWAKEN (1<<4) /* Async wake interrupt enable */ | 119 | #define UCR3_AWAKEN (1<<4) /* Async wake interrupt enable */ |
120 | #define IMX21_UCR3_RXDMUXSEL (1<<2) /* RXD Muxed Input Select */ | 120 | #define IMX21_UCR3_RXDMUXSEL (1<<2) /* RXD Muxed Input Select */ |
121 | #define UCR3_INVT (1<<1) /* Inverted Infrared transmission */ | 121 | #define UCR3_INVT (1<<1) /* Inverted Infrared transmission */ |
122 | #define UCR3_BPEN (1<<0) /* Preset registers enable */ | 122 | #define UCR3_BPEN (1<<0) /* Preset registers enable */ |
123 | #define UCR4_CTSTL_SHF 10 /* CTS trigger level shift */ | 123 | #define UCR4_CTSTL_SHF 10 /* CTS trigger level shift */ |
124 | #define UCR4_CTSTL_MASK 0x3F /* CTS trigger is 6 bits wide */ | 124 | #define UCR4_CTSTL_MASK 0x3F /* CTS trigger is 6 bits wide */ |
125 | #define UCR4_INVR (1<<9) /* Inverted infrared reception */ | 125 | #define UCR4_INVR (1<<9) /* Inverted infrared reception */ |
126 | #define UCR4_ENIRI (1<<8) /* Serial infrared interrupt enable */ | 126 | #define UCR4_ENIRI (1<<8) /* Serial infrared interrupt enable */ |
127 | #define UCR4_WKEN (1<<7) /* Wake interrupt enable */ | 127 | #define UCR4_WKEN (1<<7) /* Wake interrupt enable */ |
128 | #define UCR4_REF16 (1<<6) /* Ref freq 16 MHz */ | 128 | #define UCR4_REF16 (1<<6) /* Ref freq 16 MHz */ |
129 | #define UCR4_IRSC (1<<5) /* IR special case */ | 129 | #define UCR4_IRSC (1<<5) /* IR special case */ |
130 | #define UCR4_TCEN (1<<3) /* Transmit complete interrupt enable */ | 130 | #define UCR4_TCEN (1<<3) /* Transmit complete interrupt enable */ |
131 | #define UCR4_BKEN (1<<2) /* Break condition interrupt enable */ | 131 | #define UCR4_BKEN (1<<2) /* Break condition interrupt enable */ |
132 | #define UCR4_OREN (1<<1) /* Receiver overrun interrupt enable */ | 132 | #define UCR4_OREN (1<<1) /* Receiver overrun interrupt enable */ |
133 | #define UCR4_DREN (1<<0) /* Recv data ready interrupt enable */ | 133 | #define UCR4_DREN (1<<0) /* Recv data ready interrupt enable */ |
134 | #define UFCR_RXTL_SHF 0 /* Receiver trigger level shift */ | 134 | #define UFCR_RXTL_SHF 0 /* Receiver trigger level shift */ |
135 | #define UFCR_DCEDTE (1<<6) /* DCE/DTE mode select */ | 135 | #define UFCR_DCEDTE (1<<6) /* DCE/DTE mode select */ |
136 | #define UFCR_RFDIV (7<<7) /* Reference freq divider mask */ | 136 | #define UFCR_RFDIV (7<<7) /* Reference freq divider mask */ |
137 | #define UFCR_RFDIV_REG(x) (((x) < 7 ? 6 - (x) : 6) << 7) | 137 | #define UFCR_RFDIV_REG(x) (((x) < 7 ? 6 - (x) : 6) << 7) |
138 | #define UFCR_TXTL_SHF 10 /* Transmitter trigger level shift */ | 138 | #define UFCR_TXTL_SHF 10 /* Transmitter trigger level shift */ |
139 | #define USR1_PARITYERR (1<<15) /* Parity error interrupt flag */ | 139 | #define USR1_PARITYERR (1<<15) /* Parity error interrupt flag */ |
140 | #define USR1_RTSS (1<<14) /* RTS pin status */ | 140 | #define USR1_RTSS (1<<14) /* RTS pin status */ |
141 | #define USR1_TRDY (1<<13) /* Transmitter ready interrupt/dma flag */ | 141 | #define USR1_TRDY (1<<13) /* Transmitter ready interrupt/dma flag */ |
142 | #define USR1_RTSD (1<<12) /* RTS delta */ | 142 | #define USR1_RTSD (1<<12) /* RTS delta */ |
143 | #define USR1_ESCF (1<<11) /* Escape seq interrupt flag */ | 143 | #define USR1_ESCF (1<<11) /* Escape seq interrupt flag */ |
144 | #define USR1_FRAMERR (1<<10) /* Frame error interrupt flag */ | 144 | #define USR1_FRAMERR (1<<10) /* Frame error interrupt flag */ |
145 | #define USR1_RRDY (1<<9) /* Receiver ready interrupt/dma flag */ | 145 | #define USR1_RRDY (1<<9) /* Receiver ready interrupt/dma flag */ |
146 | #define USR1_TIMEOUT (1<<7) /* Receive timeout interrupt status */ | 146 | #define USR1_TIMEOUT (1<<7) /* Receive timeout interrupt status */ |
147 | #define USR1_RXDS (1<<6) /* Receiver idle interrupt flag */ | 147 | #define USR1_RXDS (1<<6) /* Receiver idle interrupt flag */ |
148 | #define USR1_AIRINT (1<<5) /* Async IR wake interrupt flag */ | 148 | #define USR1_AIRINT (1<<5) /* Async IR wake interrupt flag */ |
149 | #define USR1_AWAKE (1<<4) /* Aysnc wake interrupt flag */ | 149 | #define USR1_AWAKE (1<<4) /* Aysnc wake interrupt flag */ |
150 | #define USR2_ADET (1<<15) /* Auto baud rate detect complete */ | 150 | #define USR2_ADET (1<<15) /* Auto baud rate detect complete */ |
151 | #define USR2_TXFE (1<<14) /* Transmit buffer FIFO empty */ | 151 | #define USR2_TXFE (1<<14) /* Transmit buffer FIFO empty */ |
152 | #define USR2_DTRF (1<<13) /* DTR edge interrupt flag */ | 152 | #define USR2_DTRF (1<<13) /* DTR edge interrupt flag */ |
153 | #define USR2_IDLE (1<<12) /* Idle condition */ | 153 | #define USR2_IDLE (1<<12) /* Idle condition */ |
154 | #define USR2_IRINT (1<<8) /* Serial infrared interrupt flag */ | 154 | #define USR2_IRINT (1<<8) /* Serial infrared interrupt flag */ |
155 | #define USR2_WAKE (1<<7) /* Wake */ | 155 | #define USR2_WAKE (1<<7) /* Wake */ |
156 | #define USR2_RTSF (1<<4) /* RTS edge interrupt flag */ | 156 | #define USR2_RTSF (1<<4) /* RTS edge interrupt flag */ |
157 | #define USR2_TXDC (1<<3) /* Transmitter complete */ | 157 | #define USR2_TXDC (1<<3) /* Transmitter complete */ |
158 | #define USR2_BRCD (1<<2) /* Break condition */ | 158 | #define USR2_BRCD (1<<2) /* Break condition */ |
159 | #define USR2_ORE (1<<1) /* Overrun error */ | 159 | #define USR2_ORE (1<<1) /* Overrun error */ |
160 | #define USR2_RDR (1<<0) /* Recv data ready */ | 160 | #define USR2_RDR (1<<0) /* Recv data ready */ |
161 | #define UTS_FRCPERR (1<<13) /* Force parity error */ | 161 | #define UTS_FRCPERR (1<<13) /* Force parity error */ |
162 | #define UTS_LOOP (1<<12) /* Loop tx and rx */ | 162 | #define UTS_LOOP (1<<12) /* Loop tx and rx */ |
163 | #define UTS_TXEMPTY (1<<6) /* TxFIFO empty */ | 163 | #define UTS_TXEMPTY (1<<6) /* TxFIFO empty */ |
164 | #define UTS_RXEMPTY (1<<5) /* RxFIFO empty */ | 164 | #define UTS_RXEMPTY (1<<5) /* RxFIFO empty */ |
165 | #define UTS_TXFULL (1<<4) /* TxFIFO full */ | 165 | #define UTS_TXFULL (1<<4) /* TxFIFO full */ |
166 | #define UTS_RXFULL (1<<3) /* RxFIFO full */ | 166 | #define UTS_RXFULL (1<<3) /* RxFIFO full */ |
167 | #define UTS_SOFTRST (1<<0) /* Software reset */ | 167 | #define UTS_SOFTRST (1<<0) /* Software reset */ |
168 | 168 | ||
169 | /* We've been assigned a range on the "Low-density serial ports" major */ | 169 | /* We've been assigned a range on the "Low-density serial ports" major */ |
170 | #define SERIAL_IMX_MAJOR 207 | 170 | #define SERIAL_IMX_MAJOR 207 |
171 | #define MINOR_START 16 | 171 | #define MINOR_START 16 |
172 | #define DEV_NAME "ttymxc" | 172 | #define DEV_NAME "ttymxc" |
173 | 173 | ||
174 | /* | 174 | /* |
@@ -199,7 +199,7 @@ struct imx_port { | |||
199 | struct uart_port port; | 199 | struct uart_port port; |
200 | struct timer_list timer; | 200 | struct timer_list timer; |
201 | unsigned int old_status; | 201 | unsigned int old_status; |
202 | int txirq,rxirq,rtsirq; | 202 | int txirq, rxirq, rtsirq; |
203 | unsigned int have_rtscts:1; | 203 | unsigned int have_rtscts:1; |
204 | unsigned int use_irda:1; | 204 | unsigned int use_irda:1; |
205 | unsigned int irda_inv_rx:1; | 205 | unsigned int irda_inv_rx:1; |
@@ -397,7 +397,7 @@ static void imx_stop_rx(struct uart_port *port) | |||
397 | unsigned long temp; | 397 | unsigned long temp; |
398 | 398 | ||
399 | temp = readl(sport->port.membase + UCR2); | 399 | temp = readl(sport->port.membase + UCR2); |
400 | writel(temp &~ UCR2_RXEN, sport->port.membase + UCR2); | 400 | writel(temp & ~UCR2_RXEN, sport->port.membase + UCR2); |
401 | } | 401 | } |
402 | 402 | ||
403 | /* | 403 | /* |
@@ -490,7 +490,7 @@ static irqreturn_t imx_txint(int irq, void *dev_id) | |||
490 | struct circ_buf *xmit = &sport->port.state->xmit; | 490 | struct circ_buf *xmit = &sport->port.state->xmit; |
491 | unsigned long flags; | 491 | unsigned long flags; |
492 | 492 | ||
493 | spin_lock_irqsave(&sport->port.lock,flags); | 493 | spin_lock_irqsave(&sport->port.lock, flags); |
494 | if (sport->port.x_char) | 494 | if (sport->port.x_char) |
495 | { | 495 | { |
496 | /* Send next char */ | 496 | /* Send next char */ |
@@ -509,18 +509,18 @@ static irqreturn_t imx_txint(int irq, void *dev_id) | |||
509 | uart_write_wakeup(&sport->port); | 509 | uart_write_wakeup(&sport->port); |
510 | 510 | ||
511 | out: | 511 | out: |
512 | spin_unlock_irqrestore(&sport->port.lock,flags); | 512 | spin_unlock_irqrestore(&sport->port.lock, flags); |
513 | return IRQ_HANDLED; | 513 | return IRQ_HANDLED; |
514 | } | 514 | } |
515 | 515 | ||
516 | static irqreturn_t imx_rxint(int irq, void *dev_id) | 516 | static irqreturn_t imx_rxint(int irq, void *dev_id) |
517 | { | 517 | { |
518 | struct imx_port *sport = dev_id; | 518 | struct imx_port *sport = dev_id; |
519 | unsigned int rx,flg,ignored = 0; | 519 | unsigned int rx, flg, ignored = 0; |
520 | struct tty_struct *tty = sport->port.state->port.tty; | 520 | struct tty_struct *tty = sport->port.state->port.tty; |
521 | unsigned long flags, temp; | 521 | unsigned long flags, temp; |
522 | 522 | ||
523 | spin_lock_irqsave(&sport->port.lock,flags); | 523 | spin_lock_irqsave(&sport->port.lock, flags); |
524 | 524 | ||
525 | while (readl(sport->port.membase + USR2) & USR2_RDR) { | 525 | while (readl(sport->port.membase + USR2) & USR2_RDR) { |
526 | flg = TTY_NORMAL; | 526 | flg = TTY_NORMAL; |
@@ -574,7 +574,7 @@ static irqreturn_t imx_rxint(int irq, void *dev_id) | |||
574 | } | 574 | } |
575 | 575 | ||
576 | out: | 576 | out: |
577 | spin_unlock_irqrestore(&sport->port.lock,flags); | 577 | spin_unlock_irqrestore(&sport->port.lock, flags); |
578 | tty_flip_buffer_push(tty); | 578 | tty_flip_buffer_push(tty); |
579 | return IRQ_HANDLED; | 579 | return IRQ_HANDLED; |
580 | } | 580 | } |
@@ -654,7 +654,7 @@ static void imx_break_ctl(struct uart_port *port, int break_state) | |||
654 | 654 | ||
655 | temp = readl(sport->port.membase + UCR1) & ~UCR1_SNDBRK; | 655 | temp = readl(sport->port.membase + UCR1) & ~UCR1_SNDBRK; |
656 | 656 | ||
657 | if ( break_state != 0 ) | 657 | if (break_state != 0) |
658 | temp |= UCR1_SNDBRK; | 658 | temp |= UCR1_SNDBRK; |
659 | 659 | ||
660 | writel(temp, sport->port.membase + UCR1); | 660 | writel(temp, sport->port.membase + UCR1); |
@@ -696,8 +696,8 @@ static int imx_startup(struct uart_port *port) | |||
696 | temp |= UCR4_IRSC; | 696 | temp |= UCR4_IRSC; |
697 | 697 | ||
698 | /* set the trigger level for CTS */ | 698 | /* set the trigger level for CTS */ |
699 | temp &= ~(UCR4_CTSTL_MASK<< UCR4_CTSTL_SHF); | 699 | temp &= ~(UCR4_CTSTL_MASK << UCR4_CTSTL_SHF); |
700 | temp |= CTSTL<< UCR4_CTSTL_SHF; | 700 | temp |= CTSTL << UCR4_CTSTL_SHF; |
701 | 701 | ||
702 | writel(temp & ~UCR4_DREN, sport->port.membase + UCR4); | 702 | writel(temp & ~UCR4_DREN, sport->port.membase + UCR4); |
703 | 703 | ||
@@ -799,7 +799,7 @@ static int imx_startup(struct uart_port *port) | |||
799 | * Enable modem status interrupts | 799 | * Enable modem status interrupts |
800 | */ | 800 | */ |
801 | imx_enable_ms(&sport->port); | 801 | imx_enable_ms(&sport->port); |
802 | spin_unlock_irqrestore(&sport->port.lock,flags); | 802 | spin_unlock_irqrestore(&sport->port.lock, flags); |
803 | 803 | ||
804 | if (USE_IRDA(sport)) { | 804 | if (USE_IRDA(sport)) { |
805 | struct imxuart_platform_data *pdata; | 805 | struct imxuart_platform_data *pdata; |
@@ -909,7 +909,7 @@ imx_set_termios(struct uart_port *port, struct ktermios *termios, | |||
909 | ucr2 = UCR2_SRST | UCR2_IRTS; | 909 | ucr2 = UCR2_SRST | UCR2_IRTS; |
910 | 910 | ||
911 | if (termios->c_cflag & CRTSCTS) { | 911 | if (termios->c_cflag & CRTSCTS) { |
912 | if( sport->have_rtscts ) { | 912 | if (sport->have_rtscts) { |
913 | ucr2 &= ~UCR2_IRTS; | 913 | ucr2 &= ~UCR2_IRTS; |
914 | ucr2 |= UCR2_CTSC; | 914 | ucr2 |= UCR2_CTSC; |
915 | } else { | 915 | } else { |
@@ -969,12 +969,12 @@ imx_set_termios(struct uart_port *port, struct ktermios *termios, | |||
969 | writel(old_ucr1 & ~(UCR1_TXMPTYEN | UCR1_RRDYEN | UCR1_RTSDEN), | 969 | writel(old_ucr1 & ~(UCR1_TXMPTYEN | UCR1_RRDYEN | UCR1_RTSDEN), |
970 | sport->port.membase + UCR1); | 970 | sport->port.membase + UCR1); |
971 | 971 | ||
972 | while ( !(readl(sport->port.membase + USR2) & USR2_TXDC)) | 972 | while (!(readl(sport->port.membase + USR2) & USR2_TXDC)) |
973 | barrier(); | 973 | barrier(); |
974 | 974 | ||
975 | /* then, disable everything */ | 975 | /* then, disable everything */ |
976 | old_txrxen = readl(sport->port.membase + UCR2); | 976 | old_txrxen = readl(sport->port.membase + UCR2); |
977 | writel(old_txrxen & ~( UCR2_TXEN | UCR2_RXEN), | 977 | writel(old_txrxen & ~(UCR2_TXEN | UCR2_RXEN), |
978 | sport->port.membase + UCR2); | 978 | sport->port.membase + UCR2); |
979 | old_txrxen &= (UCR2_TXEN | UCR2_RXEN); | 979 | old_txrxen &= (UCR2_TXEN | UCR2_RXEN); |
980 | 980 | ||
@@ -1255,7 +1255,7 @@ imx_console_get_options(struct imx_port *sport, int *baud, | |||
1255 | 1255 | ||
1256 | if (readl(sport->port.membase + UCR1) & UCR1_UARTEN) { | 1256 | if (readl(sport->port.membase + UCR1) & UCR1_UARTEN) { |
1257 | /* ok, the port was enabled */ | 1257 | /* ok, the port was enabled */ |
1258 | unsigned int ucr2, ubir,ubmr, uartclk; | 1258 | unsigned int ucr2, ubir, ubmr, uartclk; |
1259 | unsigned int baud_raw; | 1259 | unsigned int baud_raw; |
1260 | unsigned int ucfr_rfdiv; | 1260 | unsigned int ucfr_rfdiv; |
1261 | 1261 | ||
@@ -1301,7 +1301,7 @@ imx_console_get_options(struct imx_port *sport, int *baud, | |||
1301 | *baud = (baud_raw + 50) / 100 * 100; | 1301 | *baud = (baud_raw + 50) / 100 * 100; |
1302 | } | 1302 | } |
1303 | 1303 | ||
1304 | if(*baud != baud_raw) | 1304 | if (*baud != baud_raw) |
1305 | printk(KERN_INFO "Serial: Console IMX rounded baud rate from %d to %d\n", | 1305 | printk(KERN_INFO "Serial: Console IMX rounded baud rate from %d to %d\n", |
1306 | baud_raw, *baud); | 1306 | baud_raw, *baud); |
1307 | } | 1307 | } |
@@ -1324,7 +1324,7 @@ imx_console_setup(struct console *co, char *options) | |||
1324 | if (co->index == -1 || co->index >= ARRAY_SIZE(imx_ports)) | 1324 | if (co->index == -1 || co->index >= ARRAY_SIZE(imx_ports)) |
1325 | co->index = 0; | 1325 | co->index = 0; |
1326 | sport = imx_ports[co->index]; | 1326 | sport = imx_ports[co->index]; |
1327 | if(sport == NULL) | 1327 | if (sport == NULL) |
1328 | return -ENODEV; | 1328 | return -ENODEV; |
1329 | 1329 | ||
1330 | if (options) | 1330 | if (options) |