From: "Joe Woodward" <jw@terrafix.co.uk>
To: Paul Walmsley <paul@pwsan.com>
Cc: Kevin Hilman <khilman@ti.com>, "Raja\\,
Govindraj" <govindraj.raja@ti.com>,
linux-omap@vger.kernel.org, Felipe Balbi <balbi@ti.com>,
neilb@suse.de
Subject: Re: Suspend broken on 3.3?
Date: Thu, 29 Mar 2012 12:27:55 +0100 [thread overview]
Message-ID: <WC20120329112755.541787@terrafix.co.uk> (raw)
In-Reply-To: <alpine.DEB.2.00.1203290356190.2788@utopia.booyaka.com>
> Hello Joe,
>
> thanks for reporting this. Some thoughts -- really just pure
> speculation
> -- but I hope some of it might be useful for you...
>
> On Thu, 29 Mar 2012, Joe Woodward wrote:
>
> > After digging a bit further I found that the problem isn't lost
> characters or character corruption at all...
> >
> > The UART is actually at 430KBaud (not 900KBaud as I mentioned
> earlier).
>
> 430Kbps? Could you confirm this? OMAP UARTs don't support that rate
> as
> far as I know - the closest is 460Kbps (OMAP34xx TRM vZR Table 17-1
> "UART
> Mode Baud Rates, Divisor Values, and Error Rates). If one was
> desperate,
> it might be possible to get 430Kbps by tweaking other parts of the
> clock
> tree though...
Sorry for the confusion... It's 460KBaud - the 430 was just a typo in my previous mail...
>
> > The data received is very bursty (i.e. sets of messages every second
> or
> > so), containing a sync sequence to indicate a start of packet.
> >
> > The received bytes should be: 0x01, 0x52, 0x41 ....rest of packet.
> >
> > This works 100% of the time on 3.2, but on 3.3 I sometimes (but not
> always) get: 0x01, 0x00, 0x52, 0x41.
> >
> > i.e. there is a NULL/0x00 inserted after the first character.
>
> Is this on the serial console, or on a non-console serial port?
>
> Looking at drivers/tty/serial/omap-serial.c:receive_chars(), I wonder
> if
> the driver is somehow reading bytes from the RX FIFO when it's empty.
> It's unclear to me how this could happen. But you might want to try
> doing
> an LSR read right before entering the loop in
> drivers/tty/serial/omap-serial.c:receive_chars(). In stock v3.3, this
> would mean adding
>
> lsr = serial_in(up, UART_LSR);
>
> at line 190 of drivers/tty/serial/omap-serial.c.
>
Adding this is made no obvious difference.
>
> You might also try the DMA path as an experiment. This will totally
> wedge
> power management due to an insanely low timer expiration in that path,
> but
> at least might help narrow the problem down. To do so with a quick
> hack,
> you could set omap_serial_default_info.dma_enabled to true instead of
> false at arch/arm/mach-omap2/serial.c:76.
>
This did the trick (I've added it in addition to the LSR read above, i'll back out the LSR read and see if it still works).
When DMA is enabled the behaviour (as seen from my application in userspace) is the same as on the stock 3.2 kernel (i.e. for me it works :) ).
Cheers,
Joe
>
> And one other thing to try: does the behavior change if you set
> uart_debug
> to true at arch/arm/mach-omap2/serial.c:278 ?
>
>
> - Paul
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap"
> in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2012-03-29 11:28 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-22 11:09 Suspend broken on 3.3? Joe Woodward
2012-03-22 17:33 ` Kevin Hilman
2012-03-26 13:41 ` Joe Woodward
2012-03-27 0:34 ` Kevin Hilman
2012-03-27 13:53 ` Raja, Govindraj
2012-03-27 21:37 ` Kevin Hilman
2012-03-28 10:59 ` Raja, Govindraj
2012-03-28 15:38 ` Joe Woodward
2012-03-28 17:46 ` Kevin Hilman
2012-03-29 8:35 ` Joe Woodward
2012-03-29 9:14 ` Shubhrajyoti Datta
2012-03-29 9:46 ` Joe Woodward
2012-03-29 10:26 ` Paul Walmsley
2012-03-29 11:27 ` Joe Woodward [this message]
2012-03-29 11:40 ` Joe Woodward
2012-03-29 14:29 ` Raja, Govindraj
2012-03-30 7:53 ` Joe Woodward
2012-03-30 8:46 ` Raja, Govindraj
2012-03-30 9:26 ` Joe Woodward
2012-03-30 10:15 ` Raja, Govindraj
2012-03-30 11:04 ` Joe Woodward
2012-03-30 12:24 ` Raja, Govindraj
2012-04-02 10:43 ` Raja, Govindraj
2012-04-02 12:37 ` Joe Woodward
2012-04-03 6:56 ` Govindraj
2012-04-04 14:56 ` Paul Walmsley
2012-04-04 16:13 ` Raja, Govindraj
2012-04-06 0:29 ` Paul Walmsley
2012-04-06 14:21 ` Kevin Hilman
2012-04-09 11:27 ` Raja, Govindraj
2012-04-09 14:27 ` Kevin Hilman
2012-04-09 16:01 ` Paul Walmsley
2012-04-09 17:10 ` Kevin Hilman
2012-04-10 9:26 ` Raja, Govindraj
2012-04-10 18:03 ` Kevin Hilman
2012-04-11 13:13 ` Raja, Govindraj
2012-04-11 19:34 ` Paul Walmsley
2012-04-12 11:51 ` Raja, Govindraj
2012-03-27 14:39 ` Joe Woodward
2012-03-27 21:28 ` Kevin Hilman
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=WC20120329112755.541787@terrafix.co.uk \
--to=jw@terrafix.co.uk \
--cc=balbi@ti.com \
--cc=govindraj.raja@ti.com \
--cc=khilman@ti.com \
--cc=linux-omap@vger.kernel.org \
--cc=neilb@suse.de \
--cc=paul@pwsan.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.