From: Darren Hart <dvhart@linux.intel.com>
To: Michael Brunner <mibru@gmx.de>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Alan Cox <alan@linux.intel.com>,
linux-serial@vger.kernel.org
Subject: Re: [PATCHv2] pch_uart: Add Kontron COMe-mTT10 uart clock quirk
Date: Fri, 23 Mar 2012 07:25:14 -0700 [thread overview]
Message-ID: <4F6C87CA.3010203@linux.intel.com> (raw)
In-Reply-To: <20120323110637.63aa2f64@hyperion>
On 03/23/2012 03:06 AM, Michael Brunner wrote:
> Add UART clock quirk for the Kontron COMe-mTT10 module.
>
> The board has previously been called nanoETXexpress-TT, therefore this
> is also checked.
>
> As suggested by Darren Hart the comparison in this patch version is
> placed after the FRI2 checks to ensure it will also work with possible
> upcoming changes to the FRI2 firmware.
>
> This patch follows the patchset submitted by Darren Hart at
> commit a46f5533ecfc7bbdd646d84fdab8656031a715c6.
>
> Signed-off-by: Michael Brunner <mibru@gmx.de>
> ---
> drivers/tty/serial/pch_uart.c | 7 +++++++
> 1 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/tty/serial/pch_uart.c b/drivers/tty/serial/pch_uart.c
> index 332f2eb..dd69c95 100644
> --- a/drivers/tty/serial/pch_uart.c
> +++ b/drivers/tty/serial/pch_uart.c
> @@ -210,6 +210,7 @@ enum {
> #define CMITC_UARTCLK 192000000 /* 192.0000 MHz */
> #define FRI2_64_UARTCLK 64000000 /* 64.0000 MHz */
> #define FRI2_48_UARTCLK 48000000 /* 48.0000 MHz */
> +#define NTC1_UARTCLK 64000000 /* 64.0000 MHz */
>
> struct pch_uart_buffer {
> unsigned char *buf;
> @@ -388,6 +389,12 @@ static int pch_uart_get_uartclk(void)
> if (cmp && strstr(cmp, "Fish River Island II"))
> return FRI2_48_UARTCLK;
>
> + /* Kontron COMe-mTT10 (nanoETXexpress-TT) */
> + cmp = dmi_get_system_info(DMI_BOARD_NAME);
> + if (cmp && (strstr(cmp, "COMe-mTT") ||
> + strstr(cmp, "nanoETXexpress-TT")))
> + return NTC1_UARTCLK;
> +
I don't know the cost of a dmi_get_system_info() call, since we already
grabbed BOARD_NAME, would it make sense to reuse that value by using a
dedicated cmp string?
...
Hrm, just appears to be an array lookup...
return dmi_ident[field];
No real loss there.
Acked-by: Darren Hart <dvhart@linux.intel.com>
--
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
prev parent reply other threads:[~2012-03-23 14:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-22 20:19 [PATCH] pch_uart: Add Kontron COMe-mTT10 uart clock quirk Michael Brunner
2012-03-22 20:39 ` Darren Hart
2012-03-22 21:31 ` Michael Brunner
2012-03-22 21:49 ` Darren Hart
2012-03-22 23:34 ` Michael Brunner
2012-03-23 10:06 ` [PATCHv2] " Michael Brunner
2012-03-23 14:25 ` Darren Hart [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=4F6C87CA.3010203@linux.intel.com \
--to=dvhart@linux.intel.com \
--cc=alan@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=mibru@gmx.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