lkml.org 
[lkml]   [2012]   [Feb]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/4] pch_uart: Add Fish River Island II uart clock quirks


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


\
 
 \ /
  Last update: 2012-02-22 10:49    [W:0.052 / U:0.592 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site