Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp2615181lqz; Wed, 3 Apr 2024 03:38:55 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVMwL5Z1BjSt4eKOt1qF8L7hytURxhJHugeND95J/FBV0W/NkHmKTPEPoce1jVFUSUD049Kw6iBIUsGCRXHw8GRU+/3/5kYEy+IZNXnTg== X-Google-Smtp-Source: AGHT+IF6IwH8Bwb9TaIp7TK+udUSlvp4OEpLU51nhiUABDo4GOV+zGrMJM0LqQ2qu64XGp04hAf1 X-Received: by 2002:ac8:5f81:0:b0:432:ccf1:52f8 with SMTP id j1-20020ac85f81000000b00432ccf152f8mr2898700qta.51.1712140735441; Wed, 03 Apr 2024 03:38:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712140735; cv=pass; d=google.com; s=arc-20160816; b=sMHQGqVa4QT68hZM8aYMWuWzOIpDGZ2sPAMF/5HFq300Bgi3+4d35nJzsRjHmN/eLq vVEYCR2u8TViqOiWaLPAx10jyTcri2vDynIMeuKG5/wZkJkH5NDjdv6Nl62mA/0QTG87 kmnsTZE2mMhq+h5OfXVSK2jkczVKiECuF/uzPWbyHLmX6FzduupmswzwCXnUI5J/OJEB ryPTOTpLQVcytZNfUXKhypoissUgXyHGdVlOwWWvmHwNEVrLXMfjt8+svNlMjOzyRiNQ hYbmqpLld42xHAMbuRWGhq6GM5iIBaOb+YyYS4TuMPhl9t2yJLaKHOI3Cpra+9yzazXW RDCg== 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; bh=wqdRvG7HCmMVrAK+ZpkIEKtbg+m59HnhG1C3SXg/kTY=; fh=tUv2+veH5m+0vQT7960JWWpK5Is+nICaJcqhZz51H0I=; b=dEMFxwLPMAVikscmoyEjg0OGV5YMLAqQvlz4RO5uytcmH1bzyVqVMnkYcVpQZDPxzw n6r/Pq0OOUyG2lEspmuLD2+XqwFCYjBjSEGPnisfwI2aSzraWrUCxqtaLOm1QfJzsoJv /Qhd7O0xlXiYyaOpiCS3Sg5BoLLj+56UiC9+2m35DuEBpxt3JHqemsNc0hr2SISVI80a id3WtyCfR26M9o1Qj8r0NS0aJZZ8STsDSou5Jk1gXNE9p0ZglWSB6W0h0vnsfm9F2u3J izWLJsYrV0byllO6uvBbzGWIcoHvdDpDkCVnqGAKbEnYmQaUCHnqTiMZ+e/fxZIHKshd Cf1Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=HdW0a3WY; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-129572-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-129572-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id b19-20020ac87fd3000000b004318498b1d3si519959qtk.424.2024.04.03.03.38.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Apr 2024 03:38:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-129572-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=HdW0a3WY; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-129572-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-129572-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 2921C1C26242 for ; Wed, 3 Apr 2024 10:38:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2D4D514386C; Wed, 3 Apr 2024 10:38:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="HdW0a3WY" Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com [209.85.167.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 98ED21420C4; Wed, 3 Apr 2024 10:37:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712140681; cv=none; b=kAngya11DEb40HNu8BOa7cNmQQLedfv97F9EUnZbrxa8xzI3zOd2+Q+UCT4trKBcUicFdivo+Y5Di/gOSRV8WhoTlbbsETAq16SgkHe+VbLRLVdBcdXsUzaznGygHt1R+iN+kykQEOnndB9/hPrzdIPOiKSa0XxRQxOB5O6Cs9o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712140681; c=relaxed/simple; bh=t3bwAabuZAkVWJLP6p2Sai+axAPa856q+m+ZpJxFDFs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=i20iHMhb7HHy8LQ3VQJOmhAn3D3O13F7IeiYnOVOIkavSLRrUuBuRgCnrS6sddrYYdBbi0LfOhzYZ3JsarSaLbKt18XYrHUnO7yFv6mInFQ6zdOdXcbDVnbuB2wIotpGkHGWuSYVErUfrMv8rRp9JUBevo7wm/sN117J0pKrEi4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=HdW0a3WY; arc=none smtp.client-ip=209.85.167.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lf1-f48.google.com with SMTP id 2adb3069b0e04-51381021af1so8637066e87.0; Wed, 03 Apr 2024 03:37:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712140677; x=1712745477; 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=wqdRvG7HCmMVrAK+ZpkIEKtbg+m59HnhG1C3SXg/kTY=; b=HdW0a3WYU5qzoUf4Ke6a62XsgAuoEgM4ioCQMfSQLkISNFv0eWt6ych2V1TrJsQKwG 2THXRMBbBZv1eJo+ZjwPVHoIABxRaa4mAT7qX6/+zKarhcXc6et6ErfDnKYvXYaLMleb hh/sl46DBcJUxMgQkWT2FQuYcAcr9w7NCQtBKNk99cPJl6jwqsbbc8wQov8DwbOS8Ler R7JJmn1T7mO/VtkaQVlfmSP+MlhXwmRR18MfXxrsbXxrAlMTL3d9pq45iVCMix6loFr9 FIWq2IGLR1o/pQmJu2K1Ywb+MaxnqSe1tpTeFwIjY+dsDe9ys/wYGqrDyEf48wXN26qO Xy/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712140677; x=1712745477; 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=wqdRvG7HCmMVrAK+ZpkIEKtbg+m59HnhG1C3SXg/kTY=; b=UPlUlFazjZG7I00A74fUQjc/HsO+j1WIyx7kGJGsYO5t7YzdnjGP+yqBwplKyMoq1/ F/qVuG6n+N64vWl4HKxFcCeZrQeu4VBIgkd1eY7scpybRlrwR5jj51lP4qLreMyFyEdr r8vTKwvpzZ0TpqcHZHhKc4jYGH36JECVXRcJCxFv6E944KbOzSF1e7E5bZB0g4pfAjOT kaASTz/txyCmCo2peMUoV7r3hKiI3YH4hAUQtqaiFIGcCh2J+rLsYhGm904/82tBlJDE 9ofi7gmx58PaFIZTuyh85duM9wu/WE3Y6QN5kNHDUBV2CjnKe6wl22sxGSH35SbzpSxI Swjw== X-Forwarded-Encrypted: i=1; AJvYcCUjIgpckcARpi3RK1jPXfP01TNJGfVfcdJOokMu13iS54z6atjAlQlfW0A19E1L7mUvczwGp2vVvxthh9vV+52jGasQ0gYAPie7NgEm X-Gm-Message-State: AOJu0YzAx5JIzLX+xIoKOriGp/bUcWvZJrWiGaEMVvJEcKMTKQwumoVj zYxdJBwgKbg5+lv6LqdpzzOic80Yim/BoXaeDrNoqeRRmM5HA9jweKaYxDpLpAo= X-Received: by 2002:ac2:4839:0:b0:516:c1b9:316b with SMTP id 25-20020ac24839000000b00516c1b9316bmr37248lft.15.1712140677259; Wed, 03 Apr 2024 03:37:57 -0700 (PDT) Received: from WBEC325.dom.lan ([185.188.71.122]) by smtp.gmail.com with ESMTPSA id xd2-20020a170907078200b00a4e2e16805bsm6858169ejb.11.2024.04.03.03.37.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Apr 2024 03:37:56 -0700 (PDT) From: Pawel Dembicki To: netdev@vger.kernel.org Cc: Linus Walleij , Simon Horman , Pawel Dembicki , Russell King , Florian Fainelli , Vladimir Oltean , Andrew Lunn , Florian Fainelli , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Claudiu Manoil , Alexandre Belloni , UNGLinuxDriver@microchip.com, Russell King , linux-kernel@vger.kernel.org Subject: [PATCH net-next v8 03/16] net: dsa: vsc73xx: use macros for rgmii recognition Date: Wed, 3 Apr 2024 12:37:19 +0200 Message-Id: <20240403103734.3033398-4-paweldembicki@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240403103734.3033398-1-paweldembicki@gmail.com> References: <20240403103734.3033398-1-paweldembicki@gmail.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 It's preparation for future use. At this moment, the RGMII port is used only for a connection to the MAC interface, but in the future, someone could connect a PHY to it. Using the "phy_interface_mode_is_rgmii" macro allows for the proper recognition of all RGMII modes. Suggested-by: Russell King (Oracle) Signed-off-by: Pawel Dembicki Reviewed-by: Linus Walleij Reviewed-by: Florian Fainelli Reviewed-by: Vladimir Oltean Reviewed-by: Russell King (Oracle) --- v8: - resend only v7: - added 'Reviewed-by' and fix 'Suggested-by' in commit message v6: - resend only v5: - added 'Reviewed-by' only v4: - introduced patch drivers/net/dsa/vitesse-vsc73xx-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/dsa/vitesse-vsc73xx-core.c b/drivers/net/dsa/vitesse-vsc73xx-core.c index cb2e7e256279..8ed8fc997d6d 100644 --- a/drivers/net/dsa/vitesse-vsc73xx-core.c +++ b/drivers/net/dsa/vitesse-vsc73xx-core.c @@ -807,7 +807,7 @@ static void vsc73xx_phylink_mac_link_up(struct dsa_switch *ds, int port, else val = VSC73XX_MAC_CFG_TX_IPG_100_10M; - if (interface == PHY_INTERFACE_MODE_RGMII) + if (phy_interface_mode_is_rgmii(interface)) val |= VSC73XX_MAC_CFG_CLK_SEL_1000M; else val |= VSC73XX_MAC_CFG_CLK_SEL_EXT; -- 2.34.1