All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4 V2] pch_uart: Cleanups, board quirks, and user uartclk parameter
@ 2012-02-29 18:24 Darren Hart
  2012-02-29 18:24 ` [PATCH 1/4] pch_uart: Use uartclk instead of base_baud Darren Hart
                   ` (4 more replies)
  0 siblings, 5 replies; 22+ messages in thread
From: Darren Hart @ 2012-02-29 18:24 UTC (permalink / raw)
  To: Linux Kernel Mailing List
  Cc: Tomoya MORINAGA, Feng Tang, Greg Kroah-Hartman, Alan Cox,
	linux-serial, Darren Hart

This series does some minor clean-up to the pch_uart driver, adds support
for the Fish River Island II UART clock quirks, and introduces a user_uartclk
parameter to aid in developing for early and changing hardware.

In order to support an early serial console, we cannot rely on the pch_phub
probe function to setup the CFGCLK register. This series relies on the board
quirks and does not force the setting of the CLKREG in the pch_phub code.
Instead, it aligns with what is the default configuration (defined by firmware)
for a given board. The user_uartclk parameter provides a mechanism to force a
specific uartclk if necessary.

I looked at the PCI code briefly to see about forcing the clock to 192MHz on
all boards early on to avoid having to use quirks, but it was not clear to me
if this could be done before PCI was initialized as the IO base is derived
from pci_iomap(pdev...). Perhaps this can be done, and I would be happy to
revisit this as a follow-up patch. As this current patch series follows existing
precedent to support a specific board and it does not impact the existing boards
or the default behavior, I'd like to see this merged as is, rather than hold out
for a much more invasive change forcing the clock to 192MHz. Is this acceptable? 

V2: Incorporates Alan Cox's feedback into 2/4: Add Fish River Island II uart
    clock quirks, refactoring the clock quirks into a new function and using
    a more appropriate name for a reused string variable.
    Add support for the two firmware variants for the FRI2.

--
Darren

The following changes since commit 164974a8f2a482f1abcb027c6d1a89dd79b14297:

  ecryptfs: fix printk format warning for size_t (2012-02-28 16:55:30 -0800)

are available in the git repository at:
  git://git.infradead.org/users/dvhart/linux-2.6.git pch_uart_v2
  http://git.infradead.org/users/dvhart/linux-2.6.git/shortlog/refs/heads/pch_uart_v2

Darren Hart (4):
  pch_uart: Use uartclk instead of base_baud
  pch_uart: Add Fish River Island II uart clock quirks
  pch_uart: Add user_uartclk parameter
  pch_uart: Use existing default_baud in setup_console

 drivers/tty/serial/pch_uart.c |   59 +++++++++++++++++++++++++++--------------
 1 files changed, 39 insertions(+), 20 deletions(-)

-- 
1.7.6.5

^ permalink raw reply	[flat|nested] 22+ messages in thread
* [PATCH 0/4] pch_uart: Cleanups, board quirks, and user uartclk parameter
@ 2012-02-22  1:59 Darren Hart
  2012-02-22  1:59 ` [PATCH 1/4] pch_uart: Use uartclk instead of base_baud Darren Hart
  0 siblings, 1 reply; 22+ messages in thread
From: Darren Hart @ 2012-02-22  1:59 UTC (permalink / raw)
  To: Linux Kernel Mailing List
  Cc: Tomoya MORINAGA, Feng Tang, Greg Kroah-Hartman, Alan Cox,
	linux-serial, Darren Hart

This series does some minor clean-up to the pch_uart driver, adds support
for the Fish River Island II UART clock, and introduces a user_uartclk
parameter to aid in developing for early and changing hardware.

Note that this series is my proposed alternative solution to that provided
by Tomoya MORNIAGA and Feng Tang which drops the board quirks and opts to
assume a 192 MHz clock on all boards. The problem with this approach is
that the CLKCFG register may have been set to something other than the
192MHz configuration by the firmware. If so, then the pch_uart will send
garbage between the time the boot console is disabled and the pch_phub
sets the CLKCFG register again. In my case, the pch_phub PCI probe occurs
after the pch_uart_console_setup. Even if it happened before, the output
up until the PCI probing would be garbage.

In order to support an early serial console, we cannot rely on the pch_phub
probe function to setup the CFGCLK register. This series relies on the board
quirks and doesn't force the setting of the CLKREG in the pch_phub code.
Instead, it aligns with what is the default configuration (defined by firmware)
for a given board. The user_uartclk provides a mechanism to force a specific
uartclk if necessary.

--
Darren

The following changes since commit 27e74da9800289e69ba907777df1e2085231eff7:

  i387: export 'fpu_owner_task' per-cpu variable (2012-02-20 19:34:10 -0800)

are available in the git repository at:
  git://git.infradead.org/users/dvhart/linux-2.6.git pch_uart
  http://git.infradead.org/users/dvhart/linux-2.6.git/shortlog/refs/heads/pch_uart
Darren Hart (4):
  pch_uart: Use uartclk instead of base_baud
  pch_uart: Add Fish River Island II uart clock quirks
  pch_uart: Add user_uartclk parameter
  pch_uart: Use existing default_baud in setup_console

 drivers/tty/serial/pch_uart.c |   52 +++++++++++++++++++++++++++++-----------
 1 files changed, 37 insertions(+), 15 deletions(-)

-- 
1.7.6.5

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2012-03-08 21:11 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 1/4] pch_uart: Use uartclk instead of base_baud Darren Hart
2012-03-08 18:58   ` Greg Kroah-Hartman
2012-02-29 18:24 ` [PATCH 2/4] pch_uart: Add Fish River Island II uart clock quirks Darren Hart
2012-02-29 18:24 ` [PATCH 3/4] pch_uart: Add user_uartclk parameter Darren Hart
2012-03-08 18:56   ` Greg Kroah-Hartman
2012-03-08 21:10     ` Darren Hart
2012-02-29 18:24 ` [PATCH 4/4] pch_uart: Use existing default_baud in setup_console Darren Hart
2012-03-01  0:38 ` [PATCH 0/4 V2] pch_uart: Cleanups, board quirks, and user uartclk parameter Tomoya MORINAGA
2012-03-01  0:47   ` Darren Hart
2012-03-01  0:53     ` Greg Kroah-Hartman
2012-03-07 18:32       ` Darren Hart
2012-03-07 18:39         ` Greg Kroah-Hartman
2012-03-01  1:06     ` Tomoya MORINAGA
2012-03-01  1:12       ` Darren Hart
2012-03-01  2:06         ` Tomoya MORINAGA
2012-03-01  2:07           ` Darren Hart
2012-03-01  2:27             ` Tomoya MORINAGA
2012-03-01  2:40         ` Feng Tang
2012-03-01  2:40           ` Feng Tang
2012-03-01 19:29           ` Darren Hart
  -- strict thread matches above, loose matches on Subject: below --
2012-02-22  1:59 [PATCH 0/4] " Darren Hart
2012-02-22  1:59 ` [PATCH 1/4] pch_uart: Use uartclk instead of base_baud Darren Hart

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.