[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120222085250.193096c9@pyramind.ukuu.org.uk>
Date: Wed, 22 Feb 2012 08:52:50 +0000
From: Alan Cox <alan@...rguk.ukuu.org.uk>
To: Darren Hart <dvhart@...ux.intel.com>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Tomoya MORINAGA <tomoya.rohm@...il.com>,
Feng Tang <feng.tang@...el.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Alan Cox <alan@...ux.intel.com>, linux-serial@...r.kernel.org
Subject: Re: [PATCH 2/4] pch_uart: Add Fish River Island II uart clock
quirks
> + /* 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 ?
>
> 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 ?
Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists