From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: mfuzzey@parkeon.com
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-serial@vger.kernel.org
Subject: Re: [PATCH] TTY: serial 8250: Support MCR CLK_SEL bit.
Date: Tue, 20 Nov 2012 16:23:32 +0000 [thread overview]
Message-ID: <20121120162332.4eaa14f2@pyramind.ukuu.org.uk> (raw)
In-Reply-To: <50AB538F.6030904@parkeon.com>
> This chip is a DUART but the clksel bit, although present for
> both channels, (in MCR bit 7) is actually shared (as is the external
> CLKSEL pin). Hence if the kernel determines whether to enable
> /4 or /1 based on the requested baud rate for one channel it
> may break the baud rate for the other channel.
Gak.
> As a general question how should this type of dependency between
> ports due to them being part of the same chip be handled?
It sounds to me an even bigger reason for having the kernel 8250 termios
code have a ->clock_select() method but you'd need some way to find the
pair of the device. Ok thats uglier. Can you at least define the DT as
setting the *initial* divisor. That way we can later fix the kernel to be
smart about clocks without breaking any assumption about what the DT
entry means.
> So I've just refactored the existing code to share setting this bit -
> this shouldn't change the existing behaviour.
>
> Maybe I should have done this as a seperate patch to make it clearer.
Got it - and yes please make that a separate patch.
> If UART_CAP_EFR is not set but UART_CAP_SLEEP or UART_CAP_CLKSEL is
> set is assumed that it is not necessary to enable access via the EFR
> (whether
> that is a valid combination for any existing UART is another question).
Probably not.
Alan
prev parent reply other threads:[~2012-11-20 16:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-19 8:54 [PATCH] TTY: serial 8250: Support MCR CLK_SEL bit Martin Fuzzey
2012-11-19 12:00 ` Alan Cox
2012-11-20 9:55 ` Martin Fuzzey
2012-11-20 16:23 ` Alan Cox [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=20121120162332.4eaa14f2@pyramind.ukuu.org.uk \
--to=alan@lxorguk.ukuu.org.uk \
--cc=gregkh@linuxfoundation.org \
--cc=linux-serial@vger.kernel.org \
--cc=mfuzzey@parkeon.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox