Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp9666rdb; Fri, 5 Jan 2024 00:28:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IElOQCestDeSVCOv3PZ59mSd72Um8AL2n1qwjGHrWJkm+aimk2R0Np55lGs75kvnRO6vaw0 X-Received: by 2002:a05:6402:3139:b0:556:ed5c:8485 with SMTP id dd25-20020a056402313900b00556ed5c8485mr958757edb.18.1704443282011; Fri, 05 Jan 2024 00:28:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704443281; cv=none; d=google.com; s=arc-20160816; b=TbI5UobaHyoK2TufszZ9RPPaCcgo1cQIzVfwUYVlGd3NsfIcE3pfo+y997MHCTxh7n SUoRXg830isHHyzEczjJdqZvd569u3SgOtmUkzDRcRwsIr9++P9cSgJarheqxnf1G9eF 8GWMP3TbCuYdr4m+sUvN3hoOhT5ifoihmWlsLn+xptToLh3ZTNAe4waSdLySe7U8Wy3U fT4YOzmWgVLE7hW3xRpyxZGY5aKaAXVwt4wEx0iiNqAIfkN3XSnqO3I8QM7jGFwUuH9Y GevH6lylI149QVTOxtMTyjSY6hGxxnzt5iNcbm27VzvMLuZ7Cq69r2vALa/HcRf+pPGm ++yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=dZFMoutT1OQ8HdoT2b40UgTdsfQKAEafv0v+pAiov+w=; fh=qryrdWWtksp4Ojh0keXejXriHeHARah4mOGZkuZ1jnk=; b=vGHZFCDPcnPAAZzcC1C6ZNuq9kdo5jcQLHivouRixlVLuFI0+LjDR/uC4M8OUdTKZd WaXzdPAlm9TDBLiFS+Js86WjkzM2j5+hwZ9okcs+3gDbW0J/DLInCE/jolE/XEyDlI8f w7a9otsud0P5YLq2wjvZMEijGRjQuMt8bbOoGZFTfXYUMoFEDKSbyH+HKa+DEZ30/CnS 9IWw0yr+KjSr/0yjmG813u/TBvDpWsIGOXqKd914nqTWVp8UGRlaPEQyLH1vgUaGxCiW Ufl/NWJ0bukF9N9Xc3da5z/UilVz+g7wgTxkO5FfA4hNWl+yYo6SmMRMUuLVUZoRtOOp njXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=ft9p0Rvq; spf=pass (google.com: domain of linux-kernel+bounces-17590-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17590-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id n15-20020a50934f000000b005549bdedeaasi453562eda.630.2024.01.05.00.28.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jan 2024 00:28:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-17590-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=ft9p0Rvq; spf=pass (google.com: domain of linux-kernel+bounces-17590-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17590-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id BF5011F22D33 for ; Fri, 5 Jan 2024 08:28:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8EE142D794; Fri, 5 Jan 2024 08:24:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tuxon.dev header.i=@tuxon.dev header.b="ft9p0Rvq" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-ej1-f48.google.com (mail-ej1-f48.google.com [209.85.218.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 526AD2D78C for ; Fri, 5 Jan 2024 08:24:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tuxon.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tuxon.dev Received: by mail-ej1-f48.google.com with SMTP id a640c23a62f3a-a28fb463a28so98801966b.3 for ; Fri, 05 Jan 2024 00:24:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1704443092; x=1705047892; darn=vger.kernel.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=dZFMoutT1OQ8HdoT2b40UgTdsfQKAEafv0v+pAiov+w=; b=ft9p0RvqjmKcN6JGEvHRVPCsnrLAqZ83Kw73PCVBgcH/i75mE9WiN0jz4IHpGxEq3O 6OqcNxA78YeC6Tc/54Vfamyonx+TGcrKD7bgouwMCBAMRIRfeFswNFrz5kYkTOoKCx3s y3rKXESVs1dmt5Gc3SJjxoWnxFYd12uEzuowtb/aAQgd7ssQ7sWGwrZHmHGlDSNk2tMw nkVWkuO9kfqEB3yJgMbraU3fbOPXi8MuCVEXezodOaY9LhLpRlJPegT/FBcYZAf8YIOh onnvDZK5Bnxm813DRJ3GPb5iFk8hGvJomsPuObFTLtCcWy85DRxVNU502YS7xgccd/+P XFAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704443092; x=1705047892; 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=dZFMoutT1OQ8HdoT2b40UgTdsfQKAEafv0v+pAiov+w=; b=pIwXzF7ZK7eNX668+ecWHR5iQ6lLU+3exJ/+qJn1IG2JKKg509fulFzRZUvGmx6nsP C2kf2ZKYClqHQKrEKx4523eNS5/maCCQRj2UNpg59APXUQ02HCytDoTL2VTKxNHJFhwK MRHYErIfuLwryzmIBO0akfnpZxCi6oROcGquluS0Qs9xrMuaD8mYslmnsOEEenhS5IVa 0dYgfM0hwsKTAexjFhm+2IiFnkijkkOtRU41qorGZTv7Y6E0jQkmJn+wJpggIrrgBxY/ tokfQWInyREiiOY8oNvYhQMsCUWCsECDX8kgzwypzwmOjeitry3phvak+8yLLSfLER7Y 4qrg== X-Gm-Message-State: AOJu0YyPq0XmRkH0Cy0NpR1cRovr1/P7JZz2Lu2jO+VPY90WR6NNggMS AQLWmjRWUMG/RbJnMQsunTvAcZNPtB7rrg== X-Received: by 2002:a17:906:19c:b0:a28:f8d2:4648 with SMTP id 28-20020a170906019c00b00a28f8d24648mr601871ejb.83.1704443092762; Fri, 05 Jan 2024 00:24:52 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.5]) by smtp.gmail.com with ESMTPSA id j15-20020a1709064b4f00b00a28e759a447sm596198ejv.213.2024.01.05.00.24.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jan 2024 00:24:52 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: s.shtylyov@omp.ru, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, richardcochran@gmail.com, p.zabel@pengutronix.de, yoshihiro.shimoda.uh@renesas.com, wsa+renesas@sang-engineering.com Cc: netdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, claudiu.beznea@tuxon.dev, geert+renesas@glider.be, Claudiu Beznea Subject: [PATCH net-next v3 11/19] net: ravb: Move DBAT configuration to the driver's ndo_open API Date: Fri, 5 Jan 2024 10:23:31 +0200 Message-Id: <20240105082339.1468817-12-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240105082339.1468817-1-claudiu.beznea.uj@bp.renesas.com> References: <20240105082339.1468817-1-claudiu.beznea.uj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Claudiu Beznea DBAT setup was done in the driver's probe API. As some IP variants switch to reset mode (and thus registers content is lost) when setting clocks (due to module standby functionality) to be able to implement runtime PM move the DBAT configuration in the driver's ndo_open API. This commit prepares the code for the addition of runtime PM. Reviewed-by: Sergey Shtylyov Signed-off-by: Claudiu Beznea --- Changes in v3: - collected tags Changes in v2: - none; this patch is new drivers/net/ethernet/renesas/ravb_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c index 946abd7606ca..dbc26c3e95ec 100644 --- a/drivers/net/ethernet/renesas/ravb_main.c +++ b/drivers/net/ethernet/renesas/ravb_main.c @@ -1826,6 +1826,7 @@ static int ravb_open(struct net_device *ndev) napi_enable(&priv->napi[RAVB_NC]); ravb_set_delay_mode(ndev); + ravb_write(ndev, priv->desc_bat_dma, DBAT); /* Device init */ error = ravb_dmac_init(ndev); @@ -2769,7 +2770,6 @@ static int ravb_probe(struct platform_device *pdev) } for (q = RAVB_BE; q < DBAT_ENTRY_NUM; q++) priv->desc_bat[q].die_dt = DT_EOS; - ravb_write(ndev, priv->desc_bat_dma, DBAT); /* Initialise HW timestamp list */ INIT_LIST_HEAD(&priv->ts_skb_list); -- 2.39.2