[PATCH 10/16] serial: sh: Add RZ/G2L SCIF support

Paul Barker paul.barker.ct at bp.renesas.com
Thu Oct 5 18:18:31 CEST 2023


On 04/10/2023 13:26, Marek Vasut wrote:
> On 10/4/23 10:48, Paul Barker wrote:
>> On 03/10/2023 14:23, Marek Vasut wrote:
>>> On 9/20/23 14:42, Paul Barker wrote:
>>>> +	if (IS_ENABLED(CONFIG_RZG2L)) {
>>>> +		struct reset_ctl rst;
>>>> +		int ret;
>>>> +
>>>> +		ret = reset_get_by_index(dev, 0, &rst);
>>>> +		if (ret < 0) {
>>>> +			dev_err(dev, "failed to get reset line\n");
>>>> +			return ret;
>>>> +		}
>>>> +
>>>> +		ret = reset_deassert(&rst);
>>>> +		if (ret < 0) {
>>>> +			dev_err(dev, "failed to de-assert reset line\n");
>>>> +			return ret;
>>>> +		}
>>>> +	}
>>>
>>> devm_reset_control_get_optional() or something should do here too , right ?
>>>
>>> Note that R-Car does have SCIF reset too, so this can be generic code.
>>
>> For R-Car systems the current behaviour is working and well tested, we
>> concluded that we shouldn't change it so this reset de-assert was made
>> RZ/G2L specific.
> 
> I can test on R-Car just fine, no worries.
> 
> SH R2Dplus is even tested in CI nightly.
> 
>> For RZ/G2L, de-asserting the reset is not optional.
> 
> Let's avoid special-cases like that.

Looking at this again, I don't see how we can avoid a special case here,
de-asserting the reset is required for the RZ/G2L. It may be optional on
other SoCs (I don't know), but it's definitely not optional here, so I
don't think we should be using the devm_reset_control_get_optional()
function.

Thanks,
Paul
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_0x27F4B3459F002257.asc
Type: application/pgp-keys
Size: 3520 bytes
Desc: OpenPGP public key
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20231005/9613f38b/attachment.key>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 236 bytes
Desc: OpenPGP digital signature
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20231005/9613f38b/attachment.sig>


More information about the U-Boot mailing list