Message ID | 20240529081039.639010-14-claudiu.beznea.uj@bp.renesas.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <claudiu.beznea@tuxon.dev> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1C287C25B7C for <webhook@archiver.kernel.org>; Wed, 29 May 2024 08:11:16 +0000 (UTC) Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) by mx.groups.io with SMTP id smtpd.web10.8641.1716970266872002858 for <cip-dev@lists.cip-project.org>; Wed, 29 May 2024 01:11:07 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@tuxon.dev header.s=google header.b=fouOiQ/P; spf=pass (domain: tuxon.dev, ip: 209.85.128.46, mailfrom: claudiu.beznea@tuxon.dev) Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-4202ca70270so21099385e9.3 for <cip-dev@lists.cip-project.org>; Wed, 29 May 2024 01:11:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1716970265; x=1717575065; darn=lists.cip-project.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=iQAHUJGjPROmWGGyTUMWT0CDvD42t4CgjOPY+7RlqZ4=; b=fouOiQ/PmRe+PxT/bX9IGindF3DOrrRHrIlRJIRP6PQE6+sOp9xl2YKLZT5tdYBKLo 7hA+xo26DkXdcx3pjLrXFpWkGuGsKBHSuWCDPQYuinwGhh0rOSxoWI32hH7NsZTI4CVU SqGkL44fWxKRK/7ZEsicx4J04Sw6rSjdHSleybDOl0kzSrsGEFh0O+a7F4JQsl07vPQ8 SEXiczQNsd7HPZpeN1x2RYxIrYga+hZ3AuOfkLBs9sRqiDk8cBBoL5Gn4o1ut7EXdN/8 E1jEREAy4IsBZYsdAsArfWjXXjKPYQKTnhoOqxtg3CWAf6RJSpPgBMz1yqFuvL+Su6Lf ZJpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716970265; x=1717575065; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=iQAHUJGjPROmWGGyTUMWT0CDvD42t4CgjOPY+7RlqZ4=; b=nun0Cli97E+WDv8IrvKAR22qbLxhRIrFRuLmAROMWMXLtU+TsyhlVoOIAi6c8gCQDJ QJRBZmETsIlwXrJ6ed+XBQgRQwusdPM1NB66JilK0mQOmjzXdIe25BZTHNctKdeqqKGx gO6UHw9EIozvsd1CKi7+Y8IZbKabvmxJupgI5qiav7qbAWwxOKLDK3dPGjtdHlnWVx8C tAEX0dxEY7V4WFoowUV4ygOYXUjumfnKsn0ru6aY8G2N5KHj5GR3HrYdaDZ9dXg19fUM BQHz9M4p8iEA5IVNkOs1GKFw0O0zNskR7RlInZNIFn6AgCsG/Ee8lGCmBxDXZXfBIMx2 gU4g== X-Gm-Message-State: AOJu0YyE/w4GSF5hvghHKBWn9ESmQzFBDDX3ZDQ+fl2bzCvNqJqBSndh c2KUEaBBlGDGXvxbGBZ55vTq7pR5fbImDsBoh+Wey4VcDLqZAxWsnUP9kQwSvDs1z0jq5kD1HNi dbqk= X-Google-Smtp-Source: AGHT+IHkRtgywwDFsif8LFoSCu4biQAjaS4FS/EcnLcr66jT5/5AAYifyaX4VYH8A0JFRuKIMXaZVQ== X-Received: by 2002:a7b:ce8c:0:b0:41b:edf4:4071 with SMTP id 5b1f17b1804b1-42108aa6fc3mr168473945e9.35.1716970265238; Wed, 29 May 2024 01:11:05 -0700 (PDT) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.124]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42108966b63sm171973865e9.1.2024.05.29.01.11.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 01:11:04 -0700 (PDT) From: Claudiu <claudiu.beznea@tuxon.dev> X-Google-Original-From: Claudiu <claudiu.beznea.uj@bp.renesas.com> To: nobuhiro1.iwamatsu@toshiba.co.jp, pavel@denx.de Cc: cip-dev@lists.cip-project.org, biju.das.jz@bp.renesas.com, prabhakar.mahadev-lad.rj@bp.renesas.com, paul.barker.ct@bp.renesas.com Subject: [PATCH 5.10.y-cip 13/47] net: ravb: Keep reverse order of operations in ravb_remove() Date: Wed, 29 May 2024 11:10:05 +0300 Message-Id: <20240529081039.639010-14-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240529081039.639010-1-claudiu.beznea.uj@bp.renesas.com> References: <20240529081039.639010-1-claudiu.beznea.uj@bp.renesas.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: <cip-dev.lists.cip-project.org> X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for <cip-dev@lists.cip-project.org>; Wed, 29 May 2024 08:11:16 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/15993 |
Series |
Add Ethernet support for Renesas RZ/G3S SoC
|
expand
|
diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c index 17a461ae84ef..9362f60a584d 100644 --- a/drivers/net/ethernet/renesas/ravb_main.c +++ b/drivers/net/ethernet/renesas/ravb_main.c @@ -2915,22 +2915,26 @@ static int ravb_remove(struct platform_device *pdev) struct ravb_private *priv = netdev_priv(ndev); const struct ravb_hw_info *info = priv->info; - /* Stop PTP Clock driver */ - if (info->ccc_gac) - ravb_ptp_stop(ndev); - - clk_disable_unprepare(priv->gptp_clk); - clk_disable_unprepare(priv->refclk); - - /* Set reset mode */ - ravb_write(ndev, CCC_OPC_RESET, CCC); unregister_netdev(ndev); if (info->nc_queues) netif_napi_del(&priv->napi[RAVB_NC]); netif_napi_del(&priv->napi[RAVB_BE]); + ravb_mdio_release(priv); + + /* Stop PTP Clock driver */ + if (info->ccc_gac) + ravb_ptp_stop(ndev); + dma_free_coherent(ndev->dev.parent, priv->desc_bat_size, priv->desc_bat, priv->desc_bat_dma); + + /* Set reset mode */ + ravb_write(ndev, CCC_OPC_RESET, CCC); + + clk_disable_unprepare(priv->gptp_clk); + clk_disable_unprepare(priv->refclk); + pm_runtime_put_sync(&pdev->dev); pm_runtime_disable(&pdev->dev); reset_control_assert(priv->rstc);