On 10/5/23 18:18, Paul Barker wrote:
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.

I'd say let's just unconditionally assume reset is needed for all platforms. That should work, right ?

Reply via email to