From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: "David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Pantelis Antoniou <pantelis.antoniou@gmail.com>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
Michael Ellerman <mpe@ellerman.id.au>,
Nicholas Piggin <npiggin@gmail.com>,
robh@kernel.org
Cc: netdev@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
linux-kernel@vger.kernel.org
Subject: [PATCH net-next v2 05/10] net: fs_enet: Remove has_phy field in fs_platform_info struct
Date: Fri, 4 Aug 2023 15:30:15 +0200 [thread overview]
Message-ID: <bb5264e09e18f0ce8a0dbee399926a59f33cb248.1691155346.git.christophe.leroy@csgroup.eu> (raw)
In-Reply-To: <cover.1691155346.git.christophe.leroy@csgroup.eu>
Since commit 3dd82a1ea724 ("[POWERPC] CPM: Always use new binding.")
has_phy field is never set.
Remove dead code and remove the field.
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
---
drivers/net/ethernet/freescale/fs_enet/mac-fec.c | 14 --------------
include/linux/fs_enet_pd.h | 1 -
2 files changed, 15 deletions(-)
diff --git a/drivers/net/ethernet/freescale/fs_enet/mac-fec.c b/drivers/net/ethernet/freescale/fs_enet/mac-fec.c
index f609dc112458..cdc89d83cf07 100644
--- a/drivers/net/ethernet/freescale/fs_enet/mac-fec.c
+++ b/drivers/net/ethernet/freescale/fs_enet/mac-fec.c
@@ -339,11 +339,7 @@ static void restart(struct net_device *dev)
static void stop(struct net_device *dev)
{
struct fs_enet_private *fep = netdev_priv(dev);
- const struct fs_platform_info *fpi = fep->fpi;
struct fec __iomem *fecp = fep->fec.fecp;
-
- struct fec_info *feci = dev->phydev->mdio.bus->priv;
-
int i;
if ((FR(fecp, ecntrl) & FEC_ECNTRL_ETHER_EN) == 0)
@@ -363,16 +359,6 @@ static void stop(struct net_device *dev)
FC(fecp, ecntrl, FEC_ECNTRL_ETHER_EN);
fs_cleanup_bds(dev);
-
- /* shut down FEC1? that's where the mii bus is */
- if (fpi->has_phy) {
- FS(fecp, r_cntrl, fpi->use_rmii ?
- FEC_RCNTRL_RMII_MODE :
- FEC_RCNTRL_MII_MODE); /* MII/RMII enable */
- FS(fecp, ecntrl, FEC_ECNTRL_PINMUX | FEC_ECNTRL_ETHER_EN);
- FW(fecp, ievent, FEC_ENET_MII);
- FW(fecp, mii_speed, feci->mii_speed);
- }
}
static void napi_clear_event_fs(struct net_device *dev)
diff --git a/include/linux/fs_enet_pd.h b/include/linux/fs_enet_pd.h
index a1905e41c167..2b351b676467 100644
--- a/include/linux/fs_enet_pd.h
+++ b/include/linux/fs_enet_pd.h
@@ -123,7 +123,6 @@ struct fs_platform_info {
int napi_weight; /* NAPI weight */
int use_rmii; /* use RMII mode */
- int has_phy; /* if the network is phy container as well...*/
struct clk *clk_per; /* 'per' clock for register access */
};
--
2.41.0
next prev parent reply other threads:[~2023-08-04 13:35 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-04 13:30 [PATCH net-next v2 00/10] net: fs_enet: Driver cleanup Christophe Leroy
2023-08-04 13:30 ` [PATCH net-next v2 01/10] net: fs_enet: Remove set but not used variable Christophe Leroy
2023-08-04 13:30 ` [PATCH net-next v2 02/10] net: fs_enet: Fix address space and base types mismatches Christophe Leroy
2023-08-04 13:30 ` [PATCH net-next v2 03/10] net: fs_enet: Remove fs_get_id() Christophe Leroy
2023-08-04 13:30 ` [PATCH net-next v2 04/10] net: fs_enet: Remove unused fields in fs_platform_info struct Christophe Leroy
2023-08-04 13:30 ` Christophe Leroy [this message]
2023-08-04 13:30 ` [PATCH net-next v2 06/10] net: fs_enet: Remove stale prototypes from fsl_soc.c Christophe Leroy
2023-08-04 13:30 ` [PATCH net-next v2 07/10] net: fs_enet: Move struct fs_platform_info into fs_enet.h Christophe Leroy
2023-08-04 13:30 ` [PATCH net-next v2 08/10] net: fs_enet: Don't include fs_enet_pd.h when not needed Christophe Leroy
2023-08-04 13:30 ` [PATCH net-next v2 09/10] net: fs_enet: Remove linux/fs_enet_pd.h Christophe Leroy
2023-08-04 13:30 ` [PATCH net-next v2 10/10] net: fs_enet: Use cpm_muram_xxx() functions instead of cpm_dpxxx() macros Christophe Leroy
2023-08-06 15:37 ` Simon Horman
2023-08-06 15:37 ` [PATCH net-next v2 00/10] net: fs_enet: Driver cleanup Simon Horman
2023-08-08 22:10 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bb5264e09e18f0ce8a0dbee399926a59f33cb248.1691155346.git.christophe.leroy@csgroup.eu \
--to=christophe.leroy@csgroup.eu \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=netdev@vger.kernel.org \
--cc=npiggin@gmail.com \
--cc=pabeni@redhat.com \
--cc=pantelis.antoniou@gmail.com \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).