From patchwork Thu Feb 9 09:16:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alain Volmat X-Patchwork-Id: 54816 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp228620wrn; Thu, 9 Feb 2023 01:21:15 -0800 (PST) X-Google-Smtp-Source: AK7set+kxUS43spyy5vf2OpeuVrzdeWYwOfVx1ZpxKUGbhj6g+fW1J02m4LeYskVort0h38g6Y4i X-Received: by 2002:a17:907:76d2:b0:88c:ea64:4ff0 with SMTP id kf18-20020a17090776d200b0088cea644ff0mr11282227ejc.19.1675934474850; Thu, 09 Feb 2023 01:21:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675934474; cv=none; d=google.com; s=arc-20160816; b=YBZDc0qzQVvyu10RTm1JDg2pWgBHvr5uLsTNEpjnJUhH0ZyaeXnS4V2/RF5CwcZAp2 pQdC80ZF9v0wEW23EdWav5KWL0gv0GsnW+zm9uSWyWgXrGovbO4QZDSi0nTcJo76A5GN ktYkoyuupF38vPR82S3USnXBFcUYQoGUlnYMav+a1OCEu/U/fb1CThTe6fZarn8K5nb8 Ys2ud5fS8f9ZHzZLbZoBWS0MeEaeiuj6kfx6bE6NYDtWoj44wu6EfzKwCxEOX5lA+cog C/ByzcFnwNel0pfenWPeKteQLUquyW88U8STdCJphOHqd7OxLUvtVD9I+0JOKel6RCOn o/QA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Yv+aNQTOHIB7qRjwbmhigngM9kFtfMeoMgBiuYQtyTc=; b=05yXZnq41LkmjvDjS+OJvrkoRl2IIueyrVMGkyDMNHfnDHB17j/BiGQgU5CRg3aXfg U1UOXndcBO18gmyVl1CKYibh0l7OLLHlwTpPDTIaf6+l18avVvQSrtjo2H7XYyjDC5an P3RPua7guujoUgV+ywAHZ1LngN1YJ1WCkVm30QpAAObXGkbJShwPuBtZaUUAUjjP9G41 EC8DS+aurucHKe0LJfdKrpngVAvrWirArBGTHCTnC4d+0zMWWttqKi3K298G9rmga0JQ iBu1+6gfgsXAHqa6NPAqbELLuqt0A41REhzlzywPwP+WfKmzNg9bt/amliYroatDLWgy 7mHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@me.com header.s=1a1hai header.b=oBFHuOqp; 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=me.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v3-20020a17090651c300b007c08bfea548si2305090ejk.382.2023.02.09.01.20.52; Thu, 09 Feb 2023 01:21:14 -0800 (PST) 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=@me.com header.s=1a1hai header.b=oBFHuOqp; 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=me.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230172AbjBIJTw (ORCPT + 99 others); Thu, 9 Feb 2023 04:19:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230033AbjBIJTR (ORCPT ); Thu, 9 Feb 2023 04:19:17 -0500 Received: from mr85p00im-ztdg06021801.me.com (mr85p00im-ztdg06021801.me.com [17.58.23.195]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD0276278F for ; Thu, 9 Feb 2023 01:19:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=me.com; s=1a1hai; t=1675934345; bh=Yv+aNQTOHIB7qRjwbmhigngM9kFtfMeoMgBiuYQtyTc=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=oBFHuOqplvPaB63OfWHRSYdmhJyYEYuM64AGUaaBl1O9cDGOgkRm1Md9X2qfrF4Yb cNz0TzPvmowvMZJclQB7q20wOlUdM9FyImDauKzGV8RQBoi95qNIoPHcV5yfLNh+r/ vrOgEvUpTrDjsa+N3wKz7AMoBx0vdz2xODUb2uLlX5u3FoUlSP/DAJotIuTq7ffHmx loB19SNpknN+bJRB6rQSAzEjc8fYLEaKmd8bFy5WboTd2EiURLhGE+8JGhRPH32TJQ jo56V1Jy4Nfph7kVKWThxswd2D1+l+pHOAjF5LzmoSfiCXh11WUKgMOc9pE5RRtW24 PKcyexmRmtGtA== Received: from localhost (mr38p00im-dlb-asmtp-mailmevip.me.com [17.57.152.18]) by mr85p00im-ztdg06021801.me.com (Postfix) with ESMTPSA id F2AFAD02A13; Thu, 9 Feb 2023 09:19:04 +0000 (UTC) From: Alain Volmat To: Jonathan Corbet , Rob Herring , Krzysztof Kozlowski , Thomas Gleixner , Marc Zyngier , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Russell King , Patrice Chotard , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , Maxime Coquelin , "Rafael J . Wysocki" , Daniel Lezcano , Amit Kucheria , Zhang Rui , Michael Turquette , Stephen Boyd , Philipp Zabel Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, linux-pm@vger.kernel.org, linux-clk@vger.kernel.org, Alain Volmat Subject: [PATCH 07/11] net: ethernet: stmmac: dwmac-sti: remove stih415/stih416/stid127 Date: Thu, 9 Feb 2023 10:16:55 +0100 Message-Id: <20230209091659.1409-8-avolmat@me.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230209091659.1409-1-avolmat@me.com> References: <20230209091659.1409-1-avolmat@me.com> MIME-Version: 1.0 X-Proofpoint-GUID: cbkkKnxBitPfqUkYra3jifKFBB60-BQq X-Proofpoint-ORIG-GUID: cbkkKnxBitPfqUkYra3jifKFBB60-BQq X-Proofpoint-Virus-Version: =?utf-8?q?vendor=3Dfsecure_engine=3D1=2E1=2E170-?= =?utf-8?q?22c6f66c430a71ce266a39bfe25bc2903e8d5c8f=3A6=2E0=2E425=2C18=2E0?= =?utf-8?q?=2E816=2C17=2E11=2E62=2E513=2E0000000_definitions=3D2022-01-18=5F?= =?utf-8?q?01=3A2022-01-14=5F01=2C2022-01-18=5F01=2C2021-12-02=5F01_signatur?= =?utf-8?q?es=3D0?= X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 suspectscore=0 bulkscore=0 adultscore=0 clxscore=1015 spamscore=0 phishscore=0 mlxlogscore=999 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2302090088 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757344668275318723?= X-GMAIL-MSGID: =?utf-8?q?1757344668275318723?= Remove no more supported platforms (stih415/stih416 and stid127) Signed-off-by: Alain Volmat Acked-by: Jakub Kicinski --- .../net/ethernet/stmicro/stmmac/dwmac-sti.c | 60 +------------------ 1 file changed, 1 insertion(+), 59 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c index 710d7435733e..3b424f4f95f9 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c @@ -35,7 +35,7 @@ #define IS_PHY_IF_MODE_GBIT(iface) (IS_PHY_IF_MODE_RGMII(iface) || \ iface == PHY_INTERFACE_MODE_GMII) -/* STiH4xx register definitions (STiH415/STiH416/STiH407/STiH410 families) +/* STiH4xx register definitions (STiH407/STiH410 families) * * Below table summarizes the clock requirement and clock sources for * supported phy interface modes with link speeds. @@ -75,27 +75,6 @@ #define STIH4XX_ETH_SEL_INTERNAL_NOTEXT_PHYCLK BIT(7) #define STIH4XX_ETH_SEL_TXCLK_NOT_CLK125 BIT(6) -/* STiD127 register definitions - *----------------------- - * src |BIT(6)| BIT(7)| - *----------------------- - * MII | 1 | n/a | - *----------------------- - * RMII | n/a | 1 | - * clkgen| | | - *----------------------- - * RMII | n/a | 0 | - * phyclk| | | - *----------------------- - * RGMII | 1 | n/a | - * clkgen| | | - *----------------------- - */ - -#define STID127_RETIME_SRC_MASK GENMASK(7, 6) -#define STID127_ETH_SEL_INTERNAL_NOTEXT_PHYCLK BIT(7) -#define STID127_ETH_SEL_INTERNAL_NOTEXT_TXCLK BIT(6) - #define ENMII_MASK GENMASK(5, 5) #define ENMII BIT(5) #define EN_MASK GENMASK(1, 1) @@ -194,36 +173,6 @@ static void stih4xx_fix_retime_src(void *priv, u32 spd) stih4xx_tx_retime_val[src]); } -static void stid127_fix_retime_src(void *priv, u32 spd) -{ - struct sti_dwmac *dwmac = priv; - u32 reg = dwmac->ctrl_reg; - u32 freq = 0; - u32 val = 0; - - if (dwmac->interface == PHY_INTERFACE_MODE_MII) { - val = STID127_ETH_SEL_INTERNAL_NOTEXT_TXCLK; - } else if (dwmac->interface == PHY_INTERFACE_MODE_RMII) { - if (!dwmac->ext_phyclk) { - val = STID127_ETH_SEL_INTERNAL_NOTEXT_PHYCLK; - freq = DWMAC_50MHZ; - } - } else if (IS_PHY_IF_MODE_RGMII(dwmac->interface)) { - val = STID127_ETH_SEL_INTERNAL_NOTEXT_TXCLK; - if (spd == SPEED_1000) - freq = DWMAC_125MHZ; - else if (spd == SPEED_100) - freq = DWMAC_25MHZ; - else if (spd == SPEED_10) - freq = DWMAC_2_5MHZ; - } - - if (freq) - clk_set_rate(dwmac->clk, freq); - - regmap_update_bits(dwmac->regmap, reg, STID127_RETIME_SRC_MASK, val); -} - static int sti_dwmac_set_mode(struct sti_dwmac *dwmac) { struct regmap *regmap = dwmac->regmap; @@ -407,14 +356,7 @@ static const struct sti_dwmac_of_data stih4xx_dwmac_data = { .fix_retime_src = stih4xx_fix_retime_src, }; -static const struct sti_dwmac_of_data stid127_dwmac_data = { - .fix_retime_src = stid127_fix_retime_src, -}; - static const struct of_device_id sti_dwmac_match[] = { - { .compatible = "st,stih415-dwmac", .data = &stih4xx_dwmac_data}, - { .compatible = "st,stih416-dwmac", .data = &stih4xx_dwmac_data}, - { .compatible = "st,stid127-dwmac", .data = &stid127_dwmac_data}, { .compatible = "st,stih407-dwmac", .data = &stih4xx_dwmac_data}, { } };