From: bintian.wang@huawei•com (Bintian)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH v7 6/7] clk: hi6220: Clock driver support for Hisilicon hi6220 SoC
Date: Fri, 22 May 2015 13:20:36 +0800 [thread overview]
Message-ID: <555EBCA4.9030303@huawei.com> (raw)
In-Reply-To: <555E1D55.1050907@codeaurora.org>
Hello Stephen,
On 2015/5/22 2:00, Stephen Boyd wrote:
> On 05/20/15 20:57, Bintian wrote:
>>
>>>
>>>>
>>>> +
>>>> +static void __init hi6220_clk_sys_init(struct device_node *np)
>>>> +{
>>>> + struct hisi_clock_data *clk_data;
>>>> +
>>>> + clk_data = hisi_clk_init(np, HI6220_SYS_NR_CLKS);
>>>> + if (!clk_data)
>>>> + return;
>>>> +
>>>> + hisi_clk_register_gate_sep(hi6220_separated_gate_clks_sys,
>>>> + ARRAY_SIZE(hi6220_separated_gate_clks_sys), clk_data);
>>>> +
>>>> + hisi_clk_register_mux(hi6220_mux_clks_sys,
>>>> + ARRAY_SIZE(hi6220_mux_clks_sys), clk_data);
>>>> +
>>>> + hi6220_clk_register_divider(hi6220_div_clks_sys,
>>>> + ARRAY_SIZE(hi6220_div_clks_sys), clk_data);
>>>> +
>>>> + if (!clk_data_ao)
>>>> + return;
>>>> +
>>>> + /* enable high speed clock on UART1 mux */
>>>> + clk_set_parent(clk_data->clk_data.clks[HI6220_UART1_SRC],
>>>> + clk_data_ao->clk_data.clks[HI6220_150M]);
>>>
>>> Sorry I missed this one earlier. Can we do this clk_set_parent() through
>>> assigned-parents instead?
>> Uart1 has two clock parents in hi6220, and use "clk_tcxo" by default,
>> we use uart1 to connect BT in HiKey, and switch to "clk_150m" for high
>> speed mode of BT, but pl011 has no code to set clock rate or set clock
>> parents operation, so it's a easy way to do that here.
>
> Is pl011 the uart device? Does it have a node in DT somewhere? If it
> does, then we could put the assigned-parents properties in that node so
> that when the pl011 probes the uart1 clock has its parent set to
> clk_150m. See the "Assigned clock parents and rates" section of
> Documentation/devicetree/bindings/clock/clock-bindings.txt.
>
I will verify this.
If it is OK, I will remove "clk_set_parent" from this patch.
Thanks,
Bintian
next prev parent reply other threads:[~2015-05-22 5:20 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-20 10:29 [PATCH v7 5/7] clk: hisilicon: Remove __init for marking function prototypes Bintian Wang
2015-05-20 10:29 ` [PATCH v7 6/7] clk: hi6220: Clock driver support for Hisilicon hi6220 SoC Bintian Wang
2015-05-20 22:25 ` Stephen Boyd
2015-05-21 3:57 ` Bintian
2015-05-21 18:00 ` Stephen Boyd
2015-05-22 5:20 ` Bintian [this message]
2015-05-22 18:30 ` Brent Wang
2015-05-22 18:35 ` Stephen Boyd
2015-05-22 18:41 ` Stephen Boyd
2015-05-22 18:57 ` Brent Wang
2015-05-22 19:17 ` Stephen Boyd
2015-05-23 0:45 ` Brent Wang
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=555EBCA4.9030303@huawei.com \
--to=bintian.wang@huawei$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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