linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Zhou Qiao(周侨)" <qiaozhou@asrmicro.com>
To: Stephen Boyd <sboyd@kernel.org>,
	Dan Carpenter <dan.carpenter@oracle.com>,
	Michael Turquette <mturquette@baylibre.com>,
	"linux-clk@vger.kernel.org" <linux-clk@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] clk: asr: clock driver support for ASR AquilaC Soc
Date: Mon, 1 Apr 2019 02:09:24 +0000	[thread overview]
Message-ID: <a652d858bd3d4c0a9670e03182d5fd8e@mail2012.asrmicro.com> (raw)
In-Reply-To: 155389787963.20095.9145169286940814698@swboyd.mtv.corp.google.com

On 2019/3/30 上午6:18, Stephen Boyd wrote:
> Quoting qiaozhou (2019-03-23 07:08:35)
>> From: Qiao Zhou <qiaozhou@asrmicro.com>
>>
>> add clock driver support for ASR AquilaC SoC.
>>
>> We add clk-gate, clk-mix, and clk-pll drivers:
>> 1. clk-gate driver is for regisers which have different enable/disable bits
>> to control gating.
>> 2. clk-mix driver is for registers which request to set div and mux
>> bits at the same time.
>> 3. clk-pll driver is for pll configuration.
>>
>> Signed-off-by: qiaozhou <qiaozhou@asrmicro.com>
> Please make this match your "From" line above.
I'll change it.
>
>> +
>> +static void __init aquilac_clk_init(struct device_node *np)
>> +{
>> +       int ret;
>> +       struct asr_clk_data *clock_data;
>> +
>> +       clock_data = kzalloc(sizeof(*clock_data), GFP_KERNEL);
>> +       if (!clock_data)
>> +               return;
>> +
>> +       ret = aquilac_clk_of_iomap(np, clock_data);
>> +       if (ret < 0)
>> +               goto out;
>> +
>> +       ret = asr_clk_init(np, &clock_data->unit, ASR_NR_CLKS);
>> +       if (ret < 0)
>> +               goto out;
>> +
>> +       aquilac_general_clk_init(clock_data);
>> +
>> +       aquilac_pll_init(clock_data);
>> +
>> +       aquilac_mix_clk_init(clock_data);
>> +
>> +       aquilac_periph_clk_init(clock_data);
>> +
>> +       asr_clks_enable((const char **)keep_on_clocks_tbl, ARRAY_SIZE(keep_on_clocks_tbl));
>> +
>> +       return;
>> +out:
>> +       kfree(clock_data);
>> +}
>> +CLK_OF_DECLARE(aquilac_clk, "asr,8751c-clock", aquilac_clk_init);
> Any reason this can't be a platform driver?
It could be a platform driver. We wrote the code by taking a reference
of Hisicon/Samsung clock drivers, and wrote it like this. I can change
it to a platform driver, just that I don't know the benefits that it's a
platform driver though. Is there any guide? Thanks.
>
>> diff --git a/drivers/clk/asr/clk-gate.c b/drivers/clk/asr/clk-gate.c
>> new file mode 100644
>> index 0000000..4ba5587
>> --- /dev/null
>> +++ b/drivers/clk/asr/clk-gate.c
>> @@ -0,0 +1,151 @@
>> +// SPDX-License-Identifier: GPL-2.0
>> +/*
>> + * asr gate clock operation source file
>> + *
>> + * Copyright (C) 2019 ASR Microelectronics(Shanghai) Co., Ltd.
>> + * Gang Wu <gangwu@asrmicro.com>
>> + * Qiao Zhou <qiaozhou@asrmicro.com>
>> + *
>> + * This file is licensed under the terms of the GNU General Public
>> + * License version 2. This program is licensed "as is" without any
>> + * warranty of any kind, whether express or implied.
> Please only have the SPDX tag and not this above paragraph.
I'll fix it.
>
>> + */
>> +
> I'm not going to review anymore as I'll wait for a resend for Dan's
> comments.
Thanks a lot for your reviewing. I'll refine and resend the patch set.
>
>


      reply	other threads:[~2019-04-01  2:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-23 14:08 [PATCH] clk: asr: clock driver support for ASR AquilaC Soc qiaozhou
2019-03-26 11:53 ` Dan Carpenter
2019-03-27  8:47   ` Zhou Qiao(周侨)
2019-03-29 22:17 ` Stephen Boyd
2019-04-01  2:09   ` Zhou Qiao(周侨) [this message]

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=a652d858bd3d4c0a9670e03182d5fd8e@mail2012.asrmicro.com \
    --to=qiaozhou@asrmicro.com \
    --cc=dan.carpenter@oracle.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=sboyd@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).