[PATCH 8/9] Serial: mpc5xxx: Fix setup mode at port initialization
Sascha Hauer
s.hauer at pengutronix.de
Tue Apr 30 03:39:42 EDT 2013
On Fri, Apr 26, 2013 at 08:41:13PM +0400, Alexander Shiyan wrote:
>
> 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;
Without this patch psc->mode gets configured differently on mpc5200 and
on mgt5100, then afterwards overwritten on both. This surely was not
intended, but nevertheless the driver works as expected. Was this patch
tested?
BTW CONFIG_MGT5100 could be removed, we do not have support for this
SoC.
Meanwhile I applied most patches of this series.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
More information about the barebox
mailing list