net: ravb: Make reset controller support mandatory
authorClaudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Fri, 2 Feb 2024 08:41:24 +0000 (10:41 +0200)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 6 Feb 2024 10:14:56 +0000 (11:14 +0100)
On the RZ/G3S SoC the reset controller is mandatory for the IP to work.
The device tree binding documentation for the ravb driver specifies that
the resets are mandatory. Based on this, make the resets mandatory also in
driver for all ravb devices.

Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/renesas/Kconfig
drivers/net/ethernet/renesas/ravb_main.c

index d6136fe..b03fae7 100644 (file)
@@ -34,6 +34,7 @@ config RAVB
        select MII
        select MDIO_BITBANG
        select PHYLIB
+       select RESET_CONTROLLER
        help
          Renesas Ethernet AVB device driver.
 
index 3181fa7..fd431f1 100644 (file)
@@ -2645,7 +2645,7 @@ static int ravb_probe(struct platform_device *pdev)
                return -EINVAL;
        }
 
-       rstc = devm_reset_control_get_optional_exclusive(&pdev->dev, NULL);
+       rstc = devm_reset_control_get_exclusive(&pdev->dev, NULL);
        if (IS_ERR(rstc))
                return dev_err_probe(&pdev->dev, PTR_ERR(rstc),
                                     "failed to get cpg reset\n");