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 d6136fe5c20645989a6affbf9483fcd54522b9f1..b03fae7a0f72ec5e43366479fc04816e31564a7d 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 3181fa73aa324e55a9ecbb4ba4e0273607401bdc..fd431f1a0b98f72f3679b93342576aaa95fb943c 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");