From patchwork Sun Apr 16 19:55:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alain Volmat X-Patchwork-Id: 83931 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1736758vqo; Sun, 16 Apr 2023 13:55:21 -0700 (PDT) X-Google-Smtp-Source: AKy350Ytt83vpMC8W6RMEuEpSJPudrkdbnQ1PGtBqMqUv4NOX4OZydvzXoLPEjeDe151eYQR/J11 X-Received: by 2002:a17:90a:2e13:b0:23f:3f9c:7878 with SMTP id q19-20020a17090a2e1300b0023f3f9c7878mr12492164pjd.2.1681678521483; Sun, 16 Apr 2023 13:55:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681678521; cv=none; d=google.com; s=arc-20160816; b=sr2C+bd4W+2hjZBO/r2/VpwAr9gLVrU0o9AA3rmXogVGRxA8tMSMsh7/MaCuJupJBT hLNida0vfqvjQayEH08OUao64q8kw+z1HY86+gAKdQhtMsIqPo9IriHNQOXKhuM11Pk5 crlZ4qg3ABc1/mdFYxaQS5AsEUFZOjrxCy9P6grqoe9vC+PkwDAG81psB0xSAOu6JWgJ OguXWM6Hb4oh6l7/qOmDk7AG1K/Q2HMJNwdCURRpGmTVX1SXGF6rCjSvjTYulELF4v2R muZ2mUx20FgJBrMg9m/8RIapS0K+cVSGr6wrlx6Lmw4+qHvFV1l1yFkva8IvtO1yLwxd egYQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=O2TgTgX7Cq2LJV67gutPlIPCO8dEwx+fpuc5YkEkMmg=; b=t3DrNgVrD3h1qNn52zBA5HR5dKZGQJsslASapPHHQk/Rp3h5uVsVp31y/kq1u3aXLB qje1oi4ijJbFZL29RklK9j3djJFrrWHkv8mF43tjyaAiv/KZXZZKWbVuWc1k2zcuZRAd M3mrwMN4wGUDGXvV7UvATRviWFf7Wlgq4A3QaoKaiP/wAPtJ4pq542Wbt5naTXmPbOvz ZrQd++R2vGFFJtF/s4Ykul9DpFT9HGy1LDSOqOdIdi8LkujjtF/2O2Ig+Bf3RWAX8LjP Ev/AsAkHRowtTmEPv9FxgmPYG3Ide2+e2CnMnnvTl3a69P68WWsUTOH7P9LOe1O3lqdI 8J6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@me.com header.s=1a1hai header.b=XiM+52Yd; 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 oa5-20020a17090b1bc500b0024694ef5389si13833283pjb.86.2023.04.16.13.55.09; Sun, 16 Apr 2023 13:55:21 -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=@me.com header.s=1a1hai header.b=XiM+52Yd; 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 S229911AbjDPT4X (ORCPT + 99 others); Sun, 16 Apr 2023 15:56:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37992 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229500AbjDPT4V (ORCPT ); Sun, 16 Apr 2023 15:56:21 -0400 Received: from st43p00im-zteg10073501.me.com (st43p00im-zteg10073501.me.com [17.58.63.180]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B621C5 for ; Sun, 16 Apr 2023 12:56:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=me.com; s=1a1hai; t=1681674979; bh=O2TgTgX7Cq2LJV67gutPlIPCO8dEwx+fpuc5YkEkMmg=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=XiM+52YdQzHlNrICnD+SpK/PumIEIs8y6iUR1ed6CEDCdOcJkhnx55KiZBI3ClnlR yt4rOX2A8yuFRrT7QadN9Wjsm/dycbOo7vNnI/0sfuycIH+MwwIzDO8mhLZ5n3set4 l+JPOXApJelaJsInpXAQXEiH6gZpCZW+DgFT6aUvkxFGZ/zJjN+Z/igEp5wJpeoeX7 WWJt46cw+Zg1gnIuVewk8LrJRxgdW6+MjO+JbxTHeKPEfI2SQ+uJ8vrQ+5Hx/BMhHU hV+jMVdnnuqa0lZPKLvUpyEfh6qohD7Xvv84a4V6myVVRuDshccQet2i5krPaAeLBm pbXbt3Gmo48JA== Received: from localhost (st43p00im-dlb-asmtp-mailmevip.me.com [17.42.251.41]) by st43p00im-zteg10073501.me.com (Postfix) with ESMTPSA id B440936071D; Sun, 16 Apr 2023 19:56:18 +0000 (UTC) From: Alain Volmat To: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin Cc: patrice.chotard@foss.st.com, Alain Volmat , netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] net: ethernet: stmmac: dwmac-sti: remove stih415/stih416/stid127 Date: Sun, 16 Apr 2023 21:55:23 +0200 Message-Id: <20230416195523.61075-1-avolmat@me.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Proofpoint-GUID: -BnxXXwNbnJuEUZ46-1HnoonediJYxBc X-Proofpoint-ORIG-GUID: -BnxXXwNbnJuEUZ46-1HnoonediJYxBc X-Proofpoint-Virus-Version: =?utf-8?q?vendor=3Dfsecure_engine=3D1=2E1=2E170-?= =?utf-8?q?22c6f66c430a71ce266a39bfe25bc2903e8d5c8f=3A6=2E0=2E138=2C18=2E0?= =?utf-8?q?=2E816=2C17=2E0=2E605=2E474=2E0000000_definitions=3D2022-01-17=5F?= =?utf-8?q?04=3A2020-02-14=5F02=2C2022-01-17=5F04=2C2020-01-23=5F02_signatur?= =?utf-8?q?es=3D0?= X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 suspectscore=0 clxscore=1015 phishscore=0 malwarescore=0 mlxscore=0 adultscore=0 bulkscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2304160188 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,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham 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?1763367737409527415?= X-GMAIL-MSGID: =?utf-8?q?1763367737409527415?= Remove no more supported platforms (stih415/stih416 and stid127) Signed-off-by: Alain Volmat Acked-by: Jakub Kicinski Reviewed-by: Horatiu Vultur --- Patch sent previously as part of serie: https://lore.kernel.org/all/20230209091659.1409-8-avolmat@me.com/ .../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 be3b1ebc06ab..465ce66ef9c1 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; @@ -408,14 +357,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}, { } };