public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Darren Hart <dvhart@linux.intel.com>
To: Tomoya MORINAGA <tomoya.rohm@gmail.com>
Cc: Feng Tang <feng.tang@intel.com>,
	"lkml," <linux-kernel@vger.kernel.org>,
	Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Alan Cox <alan@linux.intel.com>,
	linux-serial@vger.kernel.org
Subject: Re: pch_uart and pch_phub clock selection
Date: Fri, 17 Feb 2012 10:14:33 -0800	[thread overview]
Message-ID: <4F3E9909.7010301@linux.intel.com> (raw)
In-Reply-To: <CANKRQnhfQyUrMWaXJVsjmL-yFnHa9WuR5LfTkqv=QmRGnC2aTw@mail.gmail.com>

On 02/17/2012 01:50 AM, Tomoya MORINAGA wrote:
> Hi
> 
> 2012年2月17日16:28 Feng Tang <feng.tang@intel.com>:
>> I see that the the CM-iTC board is special-cased to set a 192MHz uart_clock.
>> This is done in pch_uart.c code, but there is some register manipulation done in
>> the pch_phub.c driver and I don't understand the connection. How are the two
>> related?
> According to your use, need to configure clock registers which are in pch_phub .
> Upstreamed version, UART_CLK can be used directly(neither multiple nor
> division) as UART clock.

I'm not following. I think you are saying that I need to configure the
clock registers - but in my patch I don't touch them and it works. Are
the registers intended to be read so I can determine HOW the device is
configured, are they intended to be written in order to change how it is
configured, or both.

Firmware sets up some initial state and this has been what I'm trying to
match in order to get an early serial console.

> 
> You can get clock configuration information from SourceForge.
> (http://sourceforge.net/projects/ml7213/files/Kernel%202.6.37/Release/Ver1.2.0/EG20TPCH_ML7213_ML7223_ML7831_linux-2.6.37_v120_20110930.tar.bz2/
> and extract pch_phub. you can find readme.)
> I extract it and show below.
> 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> <Configuration>
> =======================
> 
> 1. Over 115K baud rate UART settings
>     By default, UART can communicate less than 115Kbps.
>     In case you want UART to work more than 115Kbps, the following
> clock configuration is necessary.
>     - Clock setting
>           Set BAUDSEL = usb_48mhz
>           Set PLL2VCO = "x 8" the clock
>           Set BAUDDIV = "x 1/6" the clock
>           Set UARTCLKSEL = PLL2 output
>     For details, please refer to ML7213/ML7223 EDS "5 Chip Configuration"
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> In case we want UART to work high baud rate(e.g.4Mbps), we set like above.
> and execute "setserial /dev/ttyPCH0 baud_base 4000000".
> I can see PCH_UART with 4Mbps works well.
> 
> Darren, is this answer for your question ?

Not quite. I need to be able to use the UART at boot as an early serial
console. So I believe I need to match the firmware UART configuration
early on (well before we could call setserial).

> 
>> Tomoya, do you know if we can also set it to 192MHz for ML7223 IOH Bus-m/n?
> Yes, you can.
> 

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

  reply	other threads:[~2012-02-17 18:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-17  0:57 pch_uart and pch_phub clock selection Darren Hart
2012-02-17  1:30 ` Greg Kroah-Hartman
2012-02-17 17:46   ` Darren Hart
2012-02-17  7:28 ` Feng Tang
2012-02-17  9:50   ` Tomoya MORINAGA
2012-02-17 18:14     ` Darren Hart [this message]
2012-02-20  4:28       ` Tomoya MORINAGA
2012-02-20  4:43         ` Feng Tang
2012-02-20  5:42           ` Tomoya MORINAGA
2012-02-20  5:57             ` Feng Tang
2012-02-20  6:22               ` Tomoya MORINAGA

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=4F3E9909.7010301@linux.intel.com \
    --to=dvhart@linux.intel.com \
    --cc=alan@linux.intel.com \
    --cc=arnd@arndb.de \
    --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