linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Darren Hart <dvhart@linux.intel.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Tomoya MORINAGA <tomoya.rohm@gmail.com>,
	Feng Tang <feng.tang@intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Alan Cox <alan@linux.intel.com>,
	linux-serial@vger.kernel.org
Subject: Re: [PATCH 2/4] pch_uart: Add Fish River Island II uart clock quirks
Date: Wed, 22 Feb 2012 01:46:06 -0800	[thread overview]
Message-ID: <4F44B95E.3030307@linux.intel.com> (raw)
In-Reply-To: <20120222085250.193096c9@pyramind.ukuu.org.uk>



On 02/22/2012 12:52 AM, Alan Cox wrote:
>> +	/* Setup UART clock, checking for board specific clocks. */
>> +	uartclk = DEFAULT_UARTCLK;
>> +
>> +	board_name = dmi_get_system_info(DMI_BOARD_NAME);
>> +	if (board_name && strstr(board_name, "CM-iTC"))
>> +		uartclk = CMITC_UARTCLK;
>> +
>> +	board_name = dmi_get_system_info(DMI_PRODUCT_NAME);
>> +	if (board_name && strstr(board_name, "Fish River Island II"))
>> +		uartclk = FRI2_UARTCLK;
>> +
>> +	port->uartclk = uartclk;
> 
> This is confusing, you load product name into a variable called
> board_name ?? perhaps "name" would be clearer ?

OK, done.

> 
>>  
>>  	if (options)
>>  		uart_parse_options(options, &baud, &parity, &bits, &flow);
>> @@ -1566,12 +1580,16 @@ static struct eg20t_port *pch_uart_init_port(struct pci_dev *pdev,
>>  	if (!rxbuf)
>>  		goto init_port_free_txbuf;
>>  
>> +	/* Setup UART clock, checking for board specific clocks. */
>>  	uartclk = DEFAULT_UARTCLK;
>>  
>> -	/* quirk for CM-iTC board */
>>  	board_name = dmi_get_system_info(DMI_BOARD_NAME);
>>  	if (board_name && strstr(board_name, "CM-iTC"))
>> -		uartclk = 192000000; /* 192.0MHz */
>> +		uartclk = CMITC_UARTCLK;
>> +
>> +	board_name = dmi_get_system_info(DMI_PRODUCT_NAME);
>> +	if (board_name && strstr(board_name, "Fish River Island II"))
>> +		uartclk = FRI2_UARTCLK;
> 
> And we have two locations so this is going to get missed on updates. Can
> we have one function for this please ?

Right, bad dvhart. Done. That cleans things up nicely. I'll resend as V2
after considering your 0/4 response....

-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel

  reply	other threads:[~2012-02-22  9:46 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-22  1:59 [PATCH 0/4] pch_uart: Cleanups, board quirks, and user uartclk parameter Darren Hart
2012-02-22  1:59 ` [PATCH 1/4] pch_uart: Use uartclk instead of base_baud Darren Hart
2012-02-22  1:59 ` [PATCH 2/4] pch_uart: Add Fish River Island II uart clock quirks Darren Hart
2012-02-22  8:52   ` Alan Cox
2012-02-22  9:46     ` Darren Hart [this message]
2012-02-24 21:53       ` Greg Kroah-Hartman
2012-02-24 22:25         ` Darren Hart
2012-02-24 23:39           ` Greg Kroah-Hartman
2012-02-22  1:59 ` [PATCH 3/4] pch_uart: Add user_uartclk parameter Darren Hart
2012-02-22  1:59 ` [PATCH 4/4] pch_uart: Use existing default_baud in setup_console Darren Hart
2012-02-22  3:10 ` [PATCH 0/4] pch_uart: Cleanups, board quirks, and user uartclk parameter Tomoya MORINAGA
2012-02-22  3:36   ` Darren Hart
2012-02-22  4:26     ` Tomoya MORINAGA
2012-02-22  6:39       ` Darren Hart
2012-02-22  8:16         ` Tomoya MORINAGA
2012-02-22  8:59           ` Darren Hart
2012-02-22  9:25             ` Feng Tang
2012-02-22  8:58   ` Alan Cox
2012-02-22  9:55     ` Darren Hart
  -- strict thread matches above, loose matches on Subject: below --
2012-02-29 18:24 [PATCH 1/4] pch_uart: Use uartclk instead of base_baud Darren Hart
2012-02-29 18:24 ` [PATCH 0/4 V2] pch_uart: Cleanups, board quirks, and user uartclk parameter Darren Hart
2012-02-29 18:24   ` [PATCH 2/4] pch_uart: Add Fish River Island II uart clock quirks Darren Hart

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=4F44B95E.3030307@linux.intel.com \
    --to=dvhart@linux.intel.com \
    --cc=alan@linux.intel.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=feng.tang@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=tomoya.rohm@gmail.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;
as well as URLs for NNTP newsgroup(s).