Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1405947rdb; Mon, 19 Feb 2024 14:52:36 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUzEsIMHynjwHG4nrCNgMCMnRN4l/T0zzuFSkQ0NmW3Q5kQtP9ZMaubsaPLGNOIhWFPKt/DppsOEu2dFntXr2Rv2dhAZLQweAW0yu0bwA== X-Google-Smtp-Source: AGHT+IHaPqE7eACYH7JD6NrWBDmyzRduWdCD8fS4Ovi+JpcktYi0opOPM/RABGXrrtBe1DXLPxPK X-Received: by 2002:a17:902:ec8f:b0:1db:cc11:8530 with SMTP id x15-20020a170902ec8f00b001dbcc118530mr9119243plg.25.1708383156415; Mon, 19 Feb 2024 14:52:36 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708383156; cv=pass; d=google.com; s=arc-20160816; b=avSFXg+Nz/wSMne00eoPG4ylRQ1KcE0tjUEriak3nEj5v8tKs2/i4ATsP1oGnQrN9D 3MALWVqDF/KWMS9kxPbmFH69M+y/vP8gejsiERvVzefa7ytpRH/jaPoGQ1tk0F+qdOS6 tt2ILvUsxPofYXCTluNWreCuWH2dVwE/uqHxoFfxiMScZtclquEshpSCR4wmlo5qX8/p oKetQ3FbyTezLDi062o2T/8C2qUanbzlLWVpIoYW09jYJdv4OsmhSimx+5546cYG8LoB Ht+g4UFjoAYie69bcCesEnArSfmluYcXCLt5L373XmmuMUnVUfOsGzqMjtgvRpikRitD FsWg== ARC-Message-Signature: i=2; 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:dkim-filter; bh=MbcjRTHeFxZOdEjwZtzMKc9/Y8CVXJAhqD8fOWJ+Xc0=; fh=j/OwmfJVRgCPa4uSHTSwxfS2Laf6Vp3HYivcwwufwU4=; b=PYAogPf/XChTOxhP7bXEJMTIsfLvrBO7lJ9kxjMAG1oXTGagMgzSfRRaT8rKISjHW6 1Rp7Wp9qcf4xinEwgK1i6XYDL3xWVKlP01S6AjpvovYHBEe0Va50MI/V5ERMhIlE6GXO xJqLJLSKSMwK0Y6A6IzV6iCyS0JAvhF5wGV+HVL1gjckBamlT24ENpYjSq36g8Y4fTKy DIbR4/lVTxzz6SIEKQMPNVdIAQE1Svwat7OQ3m68aU/Lz0dJHysJ9TFM6VqFE9SWa4US iDqKdVUrhZX3tNT2OE7dqV5jkEtCIQaG8xL8rQ/t6MrwDI3gfmlfYi8wGcyo7UiEi2P3 eIBw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@broadcom.com header.s=dkimrelay header.b=c1B3I38i; arc=pass (i=1 dkim=pass dkdomain=broadcom.com dmarc=pass fromdomain=broadcom.com); spf=pass (google.com: domain of linux-kernel+bounces-71978-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71978-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id d7-20020a170902654700b001db339f4096si3830575pln.395.2024.02.19.14.52.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 14:52:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-71978-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@broadcom.com header.s=dkimrelay header.b=c1B3I38i; arc=pass (i=1 dkim=pass dkdomain=broadcom.com dmarc=pass fromdomain=broadcom.com); spf=pass (google.com: domain of linux-kernel+bounces-71978-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71978-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id A64F1B24305 for ; Mon, 19 Feb 2024 20:42:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B95BE54FB8; Mon, 19 Feb 2024 20:41:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="c1B3I38i" Received: from relay.smtp-ext.broadcom.com (relay.smtp-ext.broadcom.com [192.19.144.205]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BA3AF535D6; Mon, 19 Feb 2024 20:41:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.19.144.205 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708375266; cv=none; b=HUBNxNl8b95GpAgEIv3S4UrmyULRReedDzhhy4W9BeO+a0CVDD4ecayesiGAtO8P+gfrzhp1Zw0IBUfqX941MM+VfKTloLzb8BRRHsS/aFN8mc+juuBzCkq7FuA1bSVtqhusuB8LUWh9EwvSEFE6hWqh/ws95aubyhw9BU+2xRI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708375266; c=relaxed/simple; bh=1XKmVkJGMse2FkEHAtATkVJsddA0KnJTeeuea388y+8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=dT/U37PiAt3EEzALYOZEhVngetUhiaj/QBIz0AvQ9fjGcL8r+Vf70n6se9BV92U2lqnhPvabM7R5gmyBRrPqHEMgf+nRzzOh50LTHD69Jph1QEFZ3bZRryqRXwbrq5w9gv1dDnsuqzovN+M+q5ucb15SGx09uIDYUzVlGh9V6AI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com; spf=fail smtp.mailfrom=broadcom.com; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b=c1B3I38i; arc=none smtp.client-ip=192.19.144.205 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=broadcom.com Received: from mail-lvn-it-01.lvn.broadcom.net (mail-lvn-it-01.lvn.broadcom.net [10.36.132.253]) by relay.smtp-ext.broadcom.com (Postfix) with ESMTP id A15FFC0000E3; Mon, 19 Feb 2024 12:40:57 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 relay.smtp-ext.broadcom.com A15FFC0000E3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1708375257; bh=1XKmVkJGMse2FkEHAtATkVJsddA0KnJTeeuea388y+8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=c1B3I38iTBsxlmBH/377DLgzNqwdGKLDMPupJr577dSUHU0oWJlqYW6rpUs2LpSDy IuHW8yI79NOHtNOYoRjAMXXJgO3SfCqAbk+PVe0TM3qVq4w7+mT7ZusxF9em7LTBxx REU7q2dgRZuemQW2YHYs7V6qsXQTMXb5vrN01U+o= Received: from fainelli-desktop.igp.broadcom.net (fainelli-desktop.dhcp.broadcom.net [10.67.48.245]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail-lvn-it-01.lvn.broadcom.net (Postfix) with ESMTPSA id D3F3018041CAC7; Mon, 19 Feb 2024 12:40:55 -0800 (PST) From: Florian Fainelli To: netdev@vger.kernel.org Cc: Florian Fainelli , Jacob Keller , Doug Berger , Broadcom internal kernel review list , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Andrew Lunn , Heiner Kallweit , Russell King , linux-kernel@vger.kernel.org (open list), Justin Chen Subject: [PATCH net-next v2 2/3] net: bcmgenet: Pass "main" clock down to the MDIO driver Date: Mon, 19 Feb 2024 12:40:52 -0800 Message-Id: <20240219204053.471825-3-florian.fainelli@broadcom.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240219204053.471825-1-florian.fainelli@broadcom.com> References: <20240219204053.471825-1-florian.fainelli@broadcom.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 GENET has historically had to create a MDIO platform device for its controller and pass some auxiliary data to it, like a MDIO completion callback. Now we also pass the "main" clock to allow for the MDIO bus controller to manage that clock adequately around I/O accesses. Reviewed-by: Jacob Keller Signed-off-by: Florian Fainelli --- drivers/net/ethernet/broadcom/genet/bcmmii.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/ethernet/broadcom/genet/bcmmii.c b/drivers/net/ethernet/broadcom/genet/bcmmii.c index cbbe004621bc..7a21950da77c 100644 --- a/drivers/net/ethernet/broadcom/genet/bcmmii.c +++ b/drivers/net/ethernet/broadcom/genet/bcmmii.c @@ -476,6 +476,10 @@ static int bcmgenet_mii_register(struct bcmgenet_priv *priv) ppd.wait_func = bcmgenet_mii_wait; ppd.wait_func_data = priv; ppd.bus_name = "bcmgenet MII bus"; + /* Pass a reference to our "main" clock which is used for MDIO + * transfers + */ + ppd.clk = priv->clk; /* Unimac MDIO bus controller starts at UniMAC offset + MDIO_CMD * and is 2 * 32-bits word long, 8 bytes total. -- 2.34.1