Message ID | 20230529122017.10620-2-harini.katakam@amd.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1485172vqr; Mon, 29 May 2023 05:49:01 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5F+bshhDEzcT7W/JVpZnYMS+g60soKoXI8sg5CaZVtSQr8VQQVrqz/XMXLHLp7LVHba1IC X-Received: by 2002:a05:6a20:9388:b0:110:f66c:a0e1 with SMTP id x8-20020a056a20938800b00110f66ca0e1mr3923587pzh.14.1685364541002; Mon, 29 May 2023 05:49:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1685364540; cv=pass; d=google.com; s=arc-20160816; b=cqKCT/LVuT+3ma0X9C5RhgS00K6m2M/Cplgv5cbumpwhvPsy8C0uczEqYwRPkkn9fY lZCfyCbJ3EhcpefUIxEROsvsBPi60ch6Wg+y4eV0wQFTR34HF87emQNVhkijltizFnwc vz0DgbE9gXUFMKRurLPzP8e9JSm8sV3+sntvFTOUjV2D2hmE8S5KIA2W3hxvnKL39BHM OdHdGUnLW82gCu9lwzFnlHH/0dHZolC1yOADtPwi5ohM1taEAkKI9kaSnPziDlYPWncr SJYhsrYJPL7bNRyH1+bclUOZJQVUhZUBH77xbkWwrV+NkfcGcayS2qXer768QWPcFwrV huOA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=F3kRpLjC/3PMMIONYNySw10CzAo9uMi29dR1HlvbDYg=; b=vKGYC7JMnimMFBKqFZYO+Wo3pawQUXTnzj3RQG21tUrGFlNH8VJEfYpVrVtH6oL3at BddS9F5h1OmfoebHJjavjTiGAArvuo24bc2mxO1ewEqU1U1kO8fxlfpfSyI6gVZP7dpw Xz2QAq8B7Xs8HoKc/qXvAddI/y3pl5fuFmbu88Oz1ZcLzERSJyJuG6AfNy8e6kxe9jRO wTAN22t22mRMou62x/C5WlmRunQ7LnK/SRFtMD4RREe1Ou7wo8gyC2Gtb1l1ih5WyfgC 09onBJMP9QyrudlsWO23255uVsOQn68AuQ8CjrilgIKAUqBck0L4gpI86UFpYooR7Oer tV1w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b="AMn98jb/"; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g1-20020a633741000000b00536e6520663si9378749pgn.388.2023.05.29.05.48.48; Mon, 29 May 2023 05:49:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b="AMn98jb/"; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229453AbjE2MVh (ORCPT <rfc822;callmefire3@gmail.com> + 99 others); Mon, 29 May 2023 08:21:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229519AbjE2MVc (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 29 May 2023 08:21:32 -0400 Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam02on2089.outbound.protection.outlook.com [40.107.212.89]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 524D8C2; Mon, 29 May 2023 05:21:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fmv1ZCmT6OZxZoZ6o7dxDTUNnbvC2XMbewUu7T7kht2ztWTIzzG2jZTAYhYVqSRjSKTHqg0joQFUB5LF9A0KhCjdehKBlgWmbZeIjyYCyOiH7LSqLcz5a4M1lo5ScuDtdsV5owf8bBbJ3Qg2xY6femOrmzZkMtmrE0O1UaAMd0b0uSiW/gGrCwsHtzX/c03/AFdnY756wMhXcDs5AgjCNpdz3CvlgAHo6h7/7i9A10GS050CxQW7V9aCEOb1wCjrs3oeWewfMZ9vA8rkUX7BkPWJUqLdKr2t3fkjAnjrwk4FWdoL/3nRufiB3miT72DcQeZccCUrj/mCQI0R/2LEzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=F3kRpLjC/3PMMIONYNySw10CzAo9uMi29dR1HlvbDYg=; b=JnuI33uIr0A5fAEh8Tu5jAwa+wNspFyde2dkqNlttjNqMcvxUDZXnufT5aMjMPPRsGY0JaruZ4lMFI4LXDgDQJ3rWCpwp8KTrU67q0PDuCfkzvvqMAHyDbv30yBiU63W8dZgRWGEWNLenhhXGyuC7KEc7nqwM2cPkGvfpW9BEkRIwCkJThQtDmAuJARoEzBHQsq8raPiebWbtkM7s5MQtiIo/H10H8Tvwsv3XPPn7xMKbsr+1ZPG612nTHZP52lnAMQWEnQ40Bp6gssxkXz0dFwiV9IjgM5UiAfie1vXcT9YcbIzsA1LIwayJ9OUz3zHuCHkH9YXlABQhW1Cg9relw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lunn.ch smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=F3kRpLjC/3PMMIONYNySw10CzAo9uMi29dR1HlvbDYg=; b=AMn98jb/K30hPBns513hCLaZz4Q9EE+e26X36omCn66yPj9/TQhwaudw3k4WktErQjtqaHMilPnbjy7K+cAEYxr9TClE1y4V9nu0iGljmZHARHFGhFCV2SKl4qdlzdYD3Yht6GRhDqZBswiN/GLYx42RWlo8YtM1aVCcGuqcmkA= Received: from MW4PR04CA0388.namprd04.prod.outlook.com (2603:10b6:303:81::33) by BL1PR12MB5993.namprd12.prod.outlook.com (2603:10b6:208:399::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.23; Mon, 29 May 2023 12:21:25 +0000 Received: from CO1NAM11FT049.eop-nam11.prod.protection.outlook.com (2603:10b6:303:81:cafe::2e) by MW4PR04CA0388.outlook.office365.com (2603:10b6:303:81::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.22 via Frontend Transport; Mon, 29 May 2023 12:21:24 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CO1NAM11FT049.mail.protection.outlook.com (10.13.175.50) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6455.20 via Frontend Transport; Mon, 29 May 2023 12:21:24 +0000 Received: from SATLEXMB06.amd.com (10.181.40.147) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Mon, 29 May 2023 07:20:33 -0500 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB06.amd.com (10.181.40.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Mon, 29 May 2023 07:20:32 -0500 Received: from xhdharinik40.xilinx.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2375.34 via Frontend Transport; Mon, 29 May 2023 07:20:28 -0500 From: Harini Katakam <harini.katakam@amd.com> To: <andrew@lunn.ch>, <hkallweit1@gmail.com>, <linux@armlinux.org.uk>, <davem@davemloft.net>, <kuba@kernel.org>, <edumazet@google.com>, <pabeni@redhat.com>, <vladimir.oltean@nxp.com>, <wsa+renesas@sang-engineering.com>, <simon.horman@corigine.com>, <david.epping@missinglinkelectronics.com>, <mk+kernel@armlinux.org.uk> CC: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <harinikatakamlinux@gmail.com>, <michal.simek@amd.com>, <harini.katakam@amd.com>, <radhey.shyam.pandey@amd.com> Subject: [PATCH net-next v5 1/2] phy: mscc: Use PHY_ID_MATCH_VENDOR to minimize PHY ID table Date: Mon, 29 May 2023 17:50:16 +0530 Message-ID: <20230529122017.10620-2-harini.katakam@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230529122017.10620-1-harini.katakam@amd.com> References: <20230529122017.10620-1-harini.katakam@amd.com> MIME-Version: 1.0 Content-Type: text/plain X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT049:EE_|BL1PR12MB5993:EE_ X-MS-Office365-Filtering-Correlation-Id: 45976d67-4905-4ddd-080b-08db603f3850 X-LD-Processed: 3dd8961f-e488-4e60-8e11-a82d994e183d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FYnPYN15ltXULQh5VQQ4MPGQYTXAJaeiCcG5EFYdDxnXWTuOpVvu9c5yv+sybIrjAI63aKBzNc8GqyCKFUBwpnp10ZVrgAax9D1CU0zAVZ8v8k0I1NjIBr576iEGIDuaq3aVnPQVgudY9hfFkc2IOjKHKdd9o3LArddjm+pl8jgDjyazBUAjKDkZk44uT+0WBirh2TaIJK+0vE3SBMSglGwmlTg39LNb0BJ+YXnN/1MCwu/Bi2LLBQ4hBhYZfMXtejYSQY/ItKq6wm080WuBUiEORatwfnrbfFE13E8A9lktxCOZr9WuWlbOLtknPQMVjWLlFAKXRchrjFpVaVuBPdxnO4PgGbGtahl5AnKQtXab+D4xeWwc48Wc/yIEve8ReLs/96yZSq34akfButGqlGY+b96hnfUEUu4ykHN1aXEj7HnMkP8JNspitMDpwryCVISnidS2FvHexz0g/O9BTU+iJpGyTSFAIvDo2kGj0cv/6BFNUP5mGAoAg07h3TLSGM+qDAxyz712SeRP91OqrwYba6dX3Y7GhAkOB5duh47TNCbQeb3W+pwGwY1knFmapymm3285I/XHkwOkxQ87UBLhhksU/YJiZ4t8hHM5kc1TMB8U9xEJUg0ODh7reeUDwf2ekZdwnHKAUMcaZkg3cjcm9UqRGUGkf8v1+PIK42H4Hw2MqX/bElc7kiDS19o9R5bHVvh2Sjq6KdrWlKr4RX31An7kRqsql/GODXI0edv85Z3F1KCNp+S1SGCdgE8m1OUXIsOBFHkn5aqtGIwiOdEddM2JykGbV8J7LR5/pAg= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230028)(4636009)(39860400002)(376002)(346002)(396003)(136003)(451199021)(36840700001)(46966006)(40470700004)(82310400005)(41300700001)(86362001)(40480700001)(4326008)(40460700003)(6666004)(316002)(36756003)(70206006)(70586007)(7416002)(36860700001)(5660300002)(186003)(2906002)(44832011)(1076003)(2616005)(26005)(426003)(47076005)(336012)(83380400001)(478600001)(54906003)(110136005)(81166007)(8936002)(8676002)(82740400003)(356005)(921005)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 May 2023 12:21:24.5626 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 45976d67-4905-4ddd-080b-08db603f3850 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT049.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR12MB5993 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767232809244463183?= X-GMAIL-MSGID: =?utf-8?q?1767232809244463183?= |
Series |
Add support for VSC85xx DT RGMII delays
|
|
Commit Message
Harini Katakam
May 29, 2023, 12:20 p.m. UTC
All the PHY devices variants specified have the same mask and hence can be simplified to one vendor look up for 0x00070400. Any individual config can be identified by PHY_ID_MATCH_EXACT in the respective structure. Signed-off-by: Harini Katakam <harini.katakam@amd.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> --- v5: Rebased on top latest net-next v4: Added Andrew's tag v3: Correct vendor ID v2: New patch drivers/net/phy/mscc/mscc.h | 1 + drivers/net/phy/mscc/mscc_main.c | 16 +--------------- 2 files changed, 2 insertions(+), 15 deletions(-)
diff --git a/drivers/net/phy/mscc/mscc.h b/drivers/net/phy/mscc/mscc.h index defe5cc6d4fc..7a962050a4d4 100644 --- a/drivers/net/phy/mscc/mscc.h +++ b/drivers/net/phy/mscc/mscc.h @@ -292,6 +292,7 @@ enum rgmii_clock_delay { #define PHY_ID_VSC8575 0x000707d0 #define PHY_ID_VSC8582 0x000707b0 #define PHY_ID_VSC8584 0x000707c0 +#define PHY_VENDOR_MSCC 0x00070400 #define MSCC_VDDMAC_1500 1500 #define MSCC_VDDMAC_1800 1800 diff --git a/drivers/net/phy/mscc/mscc_main.c b/drivers/net/phy/mscc/mscc_main.c index 28df8a2e4230..fc074bcc894d 100644 --- a/drivers/net/phy/mscc/mscc_main.c +++ b/drivers/net/phy/mscc/mscc_main.c @@ -2678,21 +2678,7 @@ static struct phy_driver vsc85xx_driver[] = { module_phy_driver(vsc85xx_driver); static struct mdio_device_id __maybe_unused vsc85xx_tbl[] = { - { PHY_ID_VSC8501, 0xfffffff0, }, - { PHY_ID_VSC8502, 0xfffffff0, }, - { PHY_ID_VSC8504, 0xfffffff0, }, - { PHY_ID_VSC8514, 0xfffffff0, }, - { PHY_ID_VSC8530, 0xfffffff0, }, - { PHY_ID_VSC8531, 0xfffffff0, }, - { PHY_ID_VSC8540, 0xfffffff0, }, - { PHY_ID_VSC8541, 0xfffffff0, }, - { PHY_ID_VSC8552, 0xfffffff0, }, - { PHY_ID_VSC856X, 0xfffffff0, }, - { PHY_ID_VSC8572, 0xfffffff0, }, - { PHY_ID_VSC8574, 0xfffffff0, }, - { PHY_ID_VSC8575, 0xfffffff0, }, - { PHY_ID_VSC8582, 0xfffffff0, }, - { PHY_ID_VSC8584, 0xfffffff0, }, + { PHY_ID_MATCH_VENDOR(PHY_VENDOR_MSCC) }, { } };