lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <35e56911-a99b-4818-8b31-78baa680f8fe@linaro.org>
Date: Mon, 19 Aug 2024 19:03:34 +0200
From: Neil Armstrong <neil.armstrong@...aro.org>
To: Jerome Brunet <jbrunet@...libre.com>
Cc: Philipp Zabel <p.zabel@...gutronix.de>, Stephen Boyd <sboyd@...nel.org>,
 linux-kernel@...r.kernel.org, linux-amlogic@...ts.infradead.org,
 linux-clk@...r.kernel.org
Subject: Re: [PATCH v3 4/9] reset: amlogic: add driver parameters

On 19/08/2024 18:40, Jerome Brunet wrote:
> On Mon 19 Aug 2024 at 17:57, Neil Armstrong <neil.armstrong@...aro.org> wrote:
> 
>>> +	assert ^= data->param->level_low_reset;
>>>      	return regmap_update_bits(data->map, offset,
>>> -				  BIT(bit), assert ? 0 : BIT(bit));
>>> +				  BIT(bit), assert ? BIT(bit) : 0);
>>>    }
>>>      static int meson_reset_assert(struct reset_controller_dev *rcdev,
>>> @@ -84,17 +88,23 @@ static const struct reset_control_ops meson_reset_ops = {
>>>      static const struct meson_reset_param meson8b_param = {
>>>    	.reg_count	= 8,
>>> +	.reset_offset	= 0x0,
>>>    	.level_offset	= 0x7c,
>>> +	.level_low_reset = true,
>>>    };
>>>      static const struct meson_reset_param meson_a1_param = {
>>>    	.reg_count	= 3,
>>> +	.reset_offset	= 0x0,
>>>    	.level_offset	= 0x40,
>>> +	.level_low_reset = true,
>>>    };
>>>      static const struct meson_reset_param meson_s4_param = {
>>>    	.reg_count	= 6,
>>> +	.reset_offset	= 0x0,
>>>    	.level_offset	= 0x40,
>>> +	.level_low_reset = true,
>>
>> Just a comment, I would rather leave the "default" users of this driver with the default value
>> and use level_high_reset = true for the clock ones
> 
> In every other place in the kernel, we specify that kind of thing if it
> is acitve low. Your request make things up-side-down and harder to
> follow IMO.
> 
> There is no 'default' user, there is the platform ones and auxiliary ones.
> Platform ones tend to active low reset line. It is clearly shown above
> and hard to miss when adding new platforms.

It's only a suggestion, we tend to not add `= true` to existing users and keep
the new boolean properties for the new users, whatever the logic, and since
the driver originally did set the reset as low lever by default, it makes sense
use level_high_reset whatever other drivers does.

> 
>>
>> Neil
>>
>>>    };
>>>      static const struct of_device_id meson_reset_dt_ids[] = {
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ