public inbox for linux-serial@vger.kernel.org
 help / color / mirror / Atom feed
From: "Grant Likely" <grant.likely@secretlab.ca>
To: "René Bürgel" <r.buergel@unicontrol.de>
Cc: Wolfram Sang <w.sang@pengutronix.de>,
	linuxppc-dev@ozlabs.org, linux-serial@vger.kernel.org,
	John Rigby <jcrigby@gmail.com>
Subject: Re: [PATCH V4] workaround for mpc52xx erratum #364 (serial may not be reset in break state)
Date: Fri, 14 Nov 2008 12:09:53 -0700	[thread overview]
Message-ID: <fa686aa40811141109v2892236fj5f8f85a64537cbb3@mail.gmail.com> (raw)
In-Reply-To: <4912A69B.6020707@unicontrol.de>

On Thu, Nov 6, 2008 at 1:11 AM, René Bürgel <r.buergel@unicontrol.de> wrote:
> This patch is a workaround for bug #364 found in the MPC52xx processor.
> The errata document can be found under
> http://www.freescale.com/files/32bit/doc/errata/MPC5200E.pdf?fpsp=1&WT_TYPE=Errata&WT_VENDOR=FREESCALE&WT_FILE_FORMAT=pdf&WT_ASSET=Documentation
>
> When a device with a low baudrate is connected to the serial port, but the
> processor "listens" on a higher baudrate, it might falsely receive breaks
> from the controller. During a break, the serial controller may not be reset.
> The appended patch provides a workaround for that situation by lowering the
> baudrate without resetting the controller and waiting until no break is
> received anymore.
>

I'm still don't like the state of this patch for two reasons:
1. It is enabled/disabled by a #ifdef.  It is quite possible that we
will eventually be able to build a multiplaform kernel that boots on
both mpc5200 and mpc5121.  The workaround needs to be detected and
enabled at runtime based on the data in the device tree (ie. if the
compatible property is "fsl,mpc5200-psc-uart").

2. I'm do not like the mdelay() busywait loop.  The long busy wait
just wastes CPU time.  Doing it with IRQs off means that irq latencies
become unbounded while this is happening.  This needs to be reworked
to use a workqueue or something similar.

Also, I'm not convinced that this is the best fix.  It doesn't
actually solve the problem, it just makes it less likely to occur.
What happens if you instead manipulate portconfig to change the PSC
pins to GPIO?  I wonder if that will disconnect the RX pin from the
PSC entirely.  If it does, then that might be a suitable method to
eliminate the break condition entirely.

g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      reply	other threads:[~2008-11-14 19:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <490F51E7.3020309@unicontrol.de>
     [not found] ` <fa686aa40811031255w3d9a065dgb0eb7ad4b26c9651@mail.gmail.com>
     [not found]   ` <4910274E.5030305@unicontrol.de>
     [not found]     ` <20081104111545.GB17864@pengutronix.de>
     [not found]       ` <4910A519.3030701@unicontrol.de>
2008-11-04 21:21         ` [PATCH V3] workaround for mpc52xx erratum #364 (serial may not be reset in break state) Wolfram Sang
2008-11-06  8:11           ` [PATCH V4] " René Bürgel
2008-11-14 19:09             ` Grant Likely [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fa686aa40811141109v2892236fj5f8f85a64537cbb3@mail.gmail.com \
    --to=grant.likely@secretlab.ca \
    --cc=jcrigby@gmail.com \
    --cc=linux-serial@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=r.buergel@unicontrol.de \
    --cc=w.sang@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox