From: Timur Tabi <timur@freescale.com>
To: Kumar Gala <galak@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] qe: add function qe_clock_source
Date: Tue, 09 Oct 2007 11:21:54 -0500 [thread overview]
Message-ID: <470BAAA2.30400@freescale.com> (raw)
In-Reply-To: <2E830F97-ADAE-43CA-9BD3-BEBFEFBE1D5C@kernel.crashing.org>
Kumar Gala wrote:
> is 19 the actual value you'd end up using from the HW? or is it related
> to some random enum value?
Random enum value. Here's the code in ucc_geth:
prop = of_get_property(np, "rx-clock", NULL);
ug_info->uf_info.rx_clock = *prop;
Here's the data type:
struct ucc_fast_info {
int ucc_num;
enum qe_clock rx_clock;
enum qe_clock tx_clock;
...
As you can see, it doesn't even validate the property.
My uart driver has this:
rx-clock-source = "BRG5";
tx-clock-source = "BRG6";
sprop = of_get_property(np, "rx-clock-source", NULL);
if (!sprop) {
printk(KERN_ERR
"ucc-uart: missing rx-clock-source in device tree\n");
kfree(qe_port);
return -ENODEV;
}
qe_port->us_info.rx_clock = of_clock_source(sprop);
if ((qe_port->us_info.rx_clock < QE_BRG1) ||
(qe_port->us_info.rx_clock > QE_BRG16)) {
printk(KERN_ERR
"ucc-uart: rx-clock-source must be a BRG for UART\n");
kfree(qe_port);
return -ENODEV;
}
I will be submitting patches to ucc_geth to fix this problem.
--
Timur Tabi
Linux Kernel Developer @ Freescale
next prev parent reply other threads:[~2007-10-09 16:22 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-09 15:53 [PATCH] qe: add function qe_clock_source Timur Tabi
2007-10-09 15:56 ` Kumar Gala
2007-10-09 16:01 ` Timur Tabi
2007-10-09 16:18 ` Kumar Gala
2007-10-09 16:21 ` Timur Tabi [this message]
2007-10-09 16:38 ` Kumar Gala
2007-10-09 16:43 ` Timur Tabi
2007-10-09 16:47 ` Scott Wood
2007-10-09 16:48 ` Timur Tabi
2007-10-09 18:10 ` Kumar Gala
2007-10-09 18:12 ` Timur Tabi
2007-10-09 18:15 ` Kumar Gala
2007-10-09 18:17 ` Timur Tabi
2007-10-09 19:15 ` Kumar Gala
2007-10-09 19:18 ` Timur Tabi
2007-10-09 19:50 ` Kumar Gala
2007-10-09 16:46 ` Scott Wood
2007-10-09 16:47 ` Timur Tabi
2007-10-09 16:48 ` Scott Wood
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=470BAAA2.30400@freescale.com \
--to=timur@freescale.com \
--cc=galak@kernel.crashing.org \
--cc=linuxppc-dev@ozlabs.org \
/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 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.