[PATCH 8/9] Serial: mpc5xxx: Fix setup mode at port initialization

Alexander Shiyan shc_work at mail.ru
Fri Apr 26 12:41:13 EDT 2013


Signed-off-by: Alexander Shiyan <shc_work at mail.ru>
---
 drivers/serial/serial_mpc5xxx.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/serial/serial_mpc5xxx.c b/drivers/serial/serial_mpc5xxx.c
index 532eea3..ed77807 100644
--- a/drivers/serial/serial_mpc5xxx.c
+++ b/drivers/serial/serial_mpc5xxx.c
@@ -82,12 +82,10 @@ static int __mpc5xxx_serial_init(struct mpc5xxx_psc *psc)
 	psc->sicr = 0;
 
 	/* configure parity, bit length and so on */
+	psc->mode = PSC_MODE_8_BITS | PSC_MODE_PARNONE | PSC_MODE_ONE_STOP;
 #if defined(CONFIG_MGT5100)
-	psc->mode = PSC_MODE_ERR | PSC_MODE_8_BITS | PSC_MODE_PARNONE;
-#elif defined(CONFIG_MPC5200)
-	psc->mode = PSC_MODE_8_BITS | PSC_MODE_PARNONE;
+	psc->mode |= PSC_MODE_ERR;
 #endif
-	psc->mode = PSC_MODE_ONE_STOP;
 
 	/* disable all interrupts */
 	psc->psc_imr = 0;
-- 
1.8.1.5




More information about the barebox mailing list