]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
net: tsec: make tsec_private a private structure
authorQuentin Schulz <quentin.schulz@cherry.de>
Thu, 7 May 2026 10:37:10 +0000 (12:37 +0200)
committerJerome Forissier <jerome.forissier@arm.com>
Wed, 3 Jun 2026 14:55:55 +0000 (16:55 +0200)
Move the definition of tsec_private within the only file that makes use
of it.

This adds the benefit of include/tsec.h not referencing PKTBUFSRX (which
is set to CONFIG_SYS_RX_ETH_BUFFER, which we're trying to move to be
under CONFIG_NET dependency) anymore. Considering drivers/net/tsec.c is
only built if CONFIG_NET=y, this is fine.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
drivers/net/tsec.c
include/tsec.h

index bd4ebdd745a6cee5828ef1584518589c7667e667..d03368b9408ccb7b6a5099590bc94c69c7de5ded 100644 (file)
                )
 #endif /* CFG_TSEC_TBICR_SETTINGS */
 
+struct tsec_private {
+       struct txbd8 __iomem txbd[TX_BUF_CNT];
+       struct rxbd8 __iomem rxbd[PKTBUFSRX];
+       struct tsec __iomem *regs;
+       struct tsec_mii_mng __iomem *phyregs_sgmii;
+       struct phy_device *phydev;
+       phy_interface_t interface;
+       struct mii_dev *bus;
+       uint phyaddr;
+       uint tbiaddr;
+       char mii_devname[16];
+       u32 flags;
+       uint rx_idx;    /* index of the current RX buffer */
+       uint tx_idx;    /* index of the current TX buffer */
+       struct udevice *dev;
+};
+
 /* Configure the TBI for SGMII operation */
 static void tsec_configure_serdes(struct tsec_private *priv)
 {
index 153337837a921b8abac144a9d6410b2cfce54fe5..f5ced38f3fcfafd0da00f1b0e0f1f13c95ae4e91 100644 (file)
@@ -350,23 +350,6 @@ struct tsec_data {
        u32 mdio_regs_off;
 };
 
-struct tsec_private {
-       struct txbd8 __iomem txbd[TX_BUF_CNT];
-       struct rxbd8 __iomem rxbd[PKTBUFSRX];
-       struct tsec __iomem *regs;
-       struct tsec_mii_mng __iomem *phyregs_sgmii;
-       struct phy_device *phydev;
-       phy_interface_t interface;
-       struct mii_dev *bus;
-       uint phyaddr;
-       uint tbiaddr;
-       char mii_devname[16];
-       u32 flags;
-       uint rx_idx;    /* index of the current RX buffer */
-       uint tx_idx;    /* index of the current TX buffer */
-       struct udevice *dev;
-};
-
 struct tsec_info_struct {
        struct tsec __iomem *regs;
        struct tsec_mii_mng __iomem *miiregs_sgmii;