All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chen Feng <puck.chen@hisilicon.com>
To: Philipp Zabel <p.zabel@pengutronix.de>
Cc: <arnd@arndb.de>, <xinliang.liu@linaro.org>,
	<linux-kernel@vger.kernel.org>, <puck.chen@foxmail.com>,
	<w.f@huawei.com>
Subject: Re: [PATCH 1/2] reset: hisilicon: Add hi6220 media part of reset
Date: Tue, 23 Feb 2016 09:45:40 +0800	[thread overview]
Message-ID: <56CBB9C4.9070900@hisilicon.com> (raw)
In-Reply-To: <1456136612.5148.22.camel@pengutronix.de>

Hi,

Thanks for review.

On 2016/2/22 18:23, Philipp Zabel wrote:
> Hi Chen,
> 
> Am Montag, den 22.02.2016, 10:45 +0800 schrieb Chen Feng:
>> Signed-off-by: Chen Feng <puck.chen@hisilicon.com>
>> Signed-off-by: Xinliang Liu <xinliang.liu@linaro.org>
>> ---
>>  drivers/reset/hisilicon/hi6220_reset.c | 122 ++++++++++++++++++++++++---------
>>  1 file changed, 90 insertions(+), 32 deletions(-)
>> +/* peritheral ctrl regs
> 
> I assume this is supposed to mean "peripheral" ...
> 
>> + */
>> +#define PERITH_ASSERT_OFFSET      0x300
> 
> ... and this PERIPH_ASSERT_OFFSET, and so on.
> 

Yes...
>> +#define PERITH_DEASSERT_OFFSET    0x304
>> +#define PERITH_MAX_INDEX          0x509

>> +}
> 
> If you make these take the struct reset_controller_dev *rc_dev as first
> parameter, you can drop the two functions below an just add a second set
> of const struct reset_control_ops for the media resets.
> 
okay.
>>  static int hi6220_reset_assert(struct reset_controller_dev *rc_dev,
>>  			       unsigned long idx)
>>  {
>>  	struct hi6220_reset_data *data = to_reset_data(rc_dev);
>> +	struct regmap *regmap = data->regmap;
>>  

>>  	data->rc_dev.ops = &hi6220_reset_ops;
> 
> With media and periph resets in separate ops structures, you could chose
> here already:
> 
> 	if (type == MEDIA)
> 		data->rc_dev.ops = &hi6220_media_reset_ops;
> 	else
> 		data->rc_dev.ops = &hi6220_peripheral_reset_ops;
> 
I will add two ops next version.
>> -	data->rc_dev.of_node = pdev->dev.of_node;
>> +	data->rc_dev.of_node = np;
>> +	if (type == MEDIA)
>> +		data->rc_dev.nr_resets = MEDIA_MAX_INDEX;
>> +	else
>> +		data->rc_dev.nr_resets = PERITH_MAX_INDEX;
>>  
>>  	reset_controller_register(&data->rc_dev);
>>  
>> @@ -89,9 +139,17 @@ static int hi6220_reset_probe(struct platform_device *pdev)
>>  }
>>  
>>  static const struct of_device_id hi6220_reset_match[] = {
>> -	{ .compatible = "hisilicon,hi6220-sysctrl" },
>> -	{ },
>> +	{
>> +		.compatible = "hisilicon,hi6220-sysctrl",
>> +		.data = (void *)PERITHERAL,
>> +	},
>> +	{
>> +		.compatible = "hisilicon,hi6220-mediactrl",
>> +		.data = (void *)MEDIA,
>> +	},
>> +	{ /* sentinel */ },
>>  };
>> +MODULE_DEVICE_TABLE(of, hi6220_reset_match);
>>  
>>  static struct platform_driver hi6220_reset_driver = {
>>  	.probe = hi6220_reset_probe,
> 
> regards
> Philipp
> 
> 
> .
> 

      reply	other threads:[~2016-02-23  1:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-22  2:45 [PATCH 1/2] reset: hisilicon: Add hi6220 media part of reset Chen Feng
2016-02-22  2:45 ` [PATCH 2/2] dts: arm64: Add hi6220 media reset dts Chen Feng
2016-02-22 10:23 ` [PATCH 1/2] reset: hisilicon: Add hi6220 media part of reset Philipp Zabel
2016-02-23  1:45   ` Chen Feng [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=56CBB9C4.9070900@hisilicon.com \
    --to=puck.chen@hisilicon.com \
    --cc=arnd@arndb.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=puck.chen@foxmail.com \
    --cc=w.f@huawei.com \
    --cc=xinliang.liu@linaro.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.