Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp486525lqj; Sun, 2 Jun 2024 07:37:17 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXIV5PYEKkpTTmvwtG1I7gODlxxPkp2ZOTErfHuH5+NH6WrE0Y+2r2J1qEOSh6UsDDLGcqb8DnW2QVMKfRA3CGIoqlYPkk1BogcqFqt5w== X-Google-Smtp-Source: AGHT+IEVnQZSIULMrDF1PYdipSq00i3qqZmd06wOlfSr4Y2eTb2OaxvVhKplUU3PzPaIx8lsPmXB X-Received: by 2002:a17:906:bc85:b0:a68:fb7e:f476 with SMTP id a640c23a62f3a-a68fb7ef9a9mr76936966b.30.1717339037256; Sun, 02 Jun 2024 07:37:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717339037; cv=pass; d=google.com; s=arc-20160816; b=tHhtalIfhWg9FDN8vhkbKIwZO/5nkutDFabpnNzKes7K9auo0nlP5nmfKlDz2nQ16Q //DnLedzpCmA/JTaztpQLWWYJEhRND5MNW7P/Gi1817VsxjynIqlsx7Nqm3+jeSwWa0h UxmgfcxklKcZ92RDv57iRpHboilWIj7iDE6eKe6I5Jmj+Zb8/ZOybi6R2ehK/meY02/6 rX4c8tKS8woJgyB86KZd/bLoDXlY3+8z4dLewqgQwgkfkIDXPDEPePtpJTEMZUIMcuwZ wzZQwRxUHPw9DOjIpZ1A5V9wlxWnj2ia/g4uu6BASb4yL1q5vCdVsB5Qvjqcq5qX5pYz G3Xw== 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=riZO9gpWg+72DwRvoZciAprxyAK6Sq4iImVOkfuj2k8=; fh=WUhscqQju16MNmYf7NPcp9gv74SE50m2XPe9KJw0L1Q=; b=FKK3EB9kcbdbaClfNm4EXPFAZOVvkiF+HUsAmuvpFuRvCqHUkUFhgVCRCBwdCy2QR7 DL/1VTqxRBnUA+ExChVNK5TQv8yofXcrJ4vCafRyuSM98xA8XB75G6pJUHnBffBEdiR3 FhOAmYs9shX6MLzq1XA6QZqX75WOnrnkjnK/Y8RtZmSlUhitRISWTxcPJu96gOz6yjcw OyiH25Nxu2m4XURKqfz2omL7ElZIGdBYIc/nM39Y30VAWEddz4nV+Vd0YJ64MfADc8Jy QUpg6lYdJRn3bz4n3o218qwcZmQMeqWHDMJKIgpLyx9AA8PHTjZkyKnzDZl4Qmiq6Id9 h2wg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ENHS5eeq; 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-198293-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-198293-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a68ea93abe1si91792566b.957.2024.06.02.07.37.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Jun 2024 07:37:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-198293-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=@gmail.com header.s=20230601 header.b=ENHS5eeq; 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-198293-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-198293-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 93DCE1F2249C for ; Sun, 2 Jun 2024 14:37:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9987347F4A; Sun, 2 Jun 2024 14:36:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ENHS5eeq" Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com [209.85.208.178]) (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 0C6A13DBBF; Sun, 2 Jun 2024 14:36:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717339006; cv=none; b=KHGf/I+y4N6ApNhizIsOBHWCa8lyKVgY0h2J45DcTSU7Oupmj26iN5E9BEyRKA75qDQFKiTn037Ol3x2dp2nyJNTB2f2n5Ft6I/P1q+bdwLA3hjVbW3aDn+eLlXLrEPKf9Uv1D9y/ILfOR3BIl14ZwwvXPaaT4bFSlSD9BlEraA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717339006; c=relaxed/simple; bh=HKd+U5CDCJq1sAkohvaBdQJfgDvEMWTiR6NKfKP+qm0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=cyxSu0PW/Ct5xESMJMCKvrPQEnoDlbVPxI3Lu7ak6UIKuSGhjXOTe5OUi8H6keLO3ue81xjr05GmnglSCOntmcz0TVjGTDR2bXm0GkxqCkSgQFaxjlv8F7cTopBD6t/xeeOwn3VmFTHTV5rpdi3iMnH39XS+9O+83X30Wv6YiP0= 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=ENHS5eeq; arc=none smtp.client-ip=209.85.208.178 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-lj1-f178.google.com with SMTP id 38308e7fff4ca-2e96f29884dso41685761fa.0; Sun, 02 Jun 2024 07:36:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717339003; x=1717943803; 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=riZO9gpWg+72DwRvoZciAprxyAK6Sq4iImVOkfuj2k8=; b=ENHS5eeqRUfSiU6mf8dbCceEjj0nw830ECc82/FOy04M3eth+pWckL5RZNked3Zw1o lQoMqN1UxE4Ave26Xn/J7n0Gbvt+Zs8WBLoWh6TIN1lXUziD3xX61r+nCttZwRBLxv5B mJbOjJEiDtcWpy1z+b2/6hVo+hQtSKZFsZy4+skIBhIAMBHTERI23yuycCWxvYVyJNbg T+x4KTZ7OLq1l9bIjvUNOUKmYPkgNJC5WO3ijtcssSiUsLGyyazqWuqDXfew2IX5Xnxl /g14xHF/qSFWAbbS2d0bV068MHhDENlOCRVYauok5DbtS+X48nsVM5FgqGmREhU7FASr 6x5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717339003; x=1717943803; 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=riZO9gpWg+72DwRvoZciAprxyAK6Sq4iImVOkfuj2k8=; b=V4M0mkjME1ofucxwkmVtNLalWW+hn873xDs5zOv5EkNQvy0vGsBdoYIBrQHGyKuMLV W6BtYpUuZV2E/w8d5y7JpGFb7kgF/0InTxRkkG7xGUrzUCC0UvhD6jDI1hyPNIUogWp8 +Y59EN8NSWZ8CsW2kX6s5728wAtUTMM93dH6Oh2Zx2/Ta6k2ixxuXGMLDJdQ3xwwwzww a/HAv3Q3lja5ysy5Ah3rkecyltY0nswVsNNQ/dNBOn7pjhKe3/B1bBV/RP01JG2XSZtO OpNALzdkraUYty98n3dLhBtJIiMzWgCAlBTUALY9UEGGGmhZfZNNsYnNe5uy9TRT8o4g 3C9w== X-Forwarded-Encrypted: i=1; AJvYcCVmWC58JEEvpnWCDf332cJ9tvBFokPx00QSKeuxGG9D7/sVspsfQ5FfM609W1umx0q3qI13kacUiqSpPxlPxQbGhEF5BWT7ZXecEHQKmuErhZDGSq1lG+r0NK3AubJ0ItN42OlujT9HesWv1c6l4yDjcdLIxyWA1DmCDmYdVWljew== X-Gm-Message-State: AOJu0YwTBGYX0/ELY50pDXJbfA5g6bjmrEhJzxsuHnYgkv4S7z3cNdme yCPD6nHchNbIY9upkXErkGNCjNw9iM6Sjp3rTJ/vBRaSXosWYllS X-Received: by 2002:a2e:9141:0:b0:2e5:1dae:1789 with SMTP id 38308e7fff4ca-2ea9512f6d0mr48251181fa.22.1717339002935; Sun, 02 Jun 2024 07:36:42 -0700 (PDT) Received: from localhost ([178.178.142.64]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-2ea91cefc4fsm9282471fa.118.2024.06.02.07.36.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Jun 2024 07:36:42 -0700 (PDT) From: Serge Semin To: Andrew Lunn , Heiner Kallweit , Russell King , Alexandre Torgue , Jose Abreu , Jose Abreu , Vladimir Oltean , Florian Fainelli , Maxime Chevallier , Rob Herring , Krzysztof Kozlowski , Conor Dooley , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: Serge Semin , Sagar Cheluvegowda , Abhishek Chauhan , Andrew Halaney , Jiawen Wu , Mengyuan Lou , Tomer Maimon , openbmc@lists.ozlabs.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next v2 01/10] net: pcs: xpcs: Move native device ID macro to linux/pcs/pcs-xpcs.h Date: Sun, 2 Jun 2024 17:36:15 +0300 Message-ID: <20240602143636.5839-2-fancer.lancer@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240602143636.5839-1-fancer.lancer@gmail.com> References: <20240602143636.5839-1-fancer.lancer@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 One of the next commits will alter the DW XPCS driver to support setting a custom device ID for the particular MDIO-device detected on the platform. The generic DW XPCS ID can be used as a custom ID as well in case if the DW XPCS-device was erroneously synthesized with no or some undefined ID. In addition to that having all supported DW XPCS device IDs defined in a single place will improve the code maintainability and readability. Note while at it rename the macros to being shorter and looking alike to the already defined NXP XPCS ID macro. Signed-off-by: Serge Semin --- Changelog v2: - Alter the commit log so one would refer to the DW XPCS driver change and would describe the change clearer. (@Russell) - s/sinle/single (@Vladimir) --- drivers/net/pcs/pcs-xpcs.c | 8 ++++---- drivers/net/pcs/pcs-xpcs.h | 3 --- include/linux/pcs/pcs-xpcs.h | 2 ++ 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/net/pcs/pcs-xpcs.c b/drivers/net/pcs/pcs-xpcs.c index 31525fe9c32e..99adbf15ab36 100644 --- a/drivers/net/pcs/pcs-xpcs.c +++ b/drivers/net/pcs/pcs-xpcs.c @@ -1343,16 +1343,16 @@ static const struct xpcs_compat nxp_sja1110_xpcs_compat[DW_XPCS_INTERFACE_MAX] = static const struct xpcs_id xpcs_id_list[] = { { - .id = SYNOPSYS_XPCS_ID, - .mask = SYNOPSYS_XPCS_MASK, + .id = DW_XPCS_ID, + .mask = DW_XPCS_ID_MASK, .compat = synopsys_xpcs_compat, }, { .id = NXP_SJA1105_XPCS_ID, - .mask = SYNOPSYS_XPCS_MASK, + .mask = DW_XPCS_ID_MASK, .compat = nxp_sja1105_xpcs_compat, }, { .id = NXP_SJA1110_XPCS_ID, - .mask = SYNOPSYS_XPCS_MASK, + .mask = DW_XPCS_ID_MASK, .compat = nxp_sja1110_xpcs_compat, }, }; diff --git a/drivers/net/pcs/pcs-xpcs.h b/drivers/net/pcs/pcs-xpcs.h index 96c36b32ca99..369e9196f45a 100644 --- a/drivers/net/pcs/pcs-xpcs.h +++ b/drivers/net/pcs/pcs-xpcs.h @@ -6,9 +6,6 @@ * Author: Jose Abreu */ -#define SYNOPSYS_XPCS_ID 0x7996ced0 -#define SYNOPSYS_XPCS_MASK 0xffffffff - /* Vendor regs access */ #define DW_VENDOR BIT(15) diff --git a/include/linux/pcs/pcs-xpcs.h b/include/linux/pcs/pcs-xpcs.h index da3a6c30f6d2..8dfe90295f12 100644 --- a/include/linux/pcs/pcs-xpcs.h +++ b/include/linux/pcs/pcs-xpcs.h @@ -12,6 +12,8 @@ #define NXP_SJA1105_XPCS_ID 0x00000010 #define NXP_SJA1110_XPCS_ID 0x00000020 +#define DW_XPCS_ID 0x7996ced0 +#define DW_XPCS_ID_MASK 0xffffffff /* AN mode */ #define DW_AN_C73 1 -- 2.43.0