Lines Matching +full:ext +full:- +full:regs
1 // SPDX-License-Identifier: GPL-2.0-only
2 /* Ethtool support for Altera Triple-Speed Ethernet MAC driver
3 * Copyright (C) 2008-2014 Altera Corporation. All rights reserved
67 u32 rev = ioread32(&priv->mac_dev->megacore_revision); in tse_get_drvinfo()
69 strcpy(info->driver, "altera_tse"); in tse_get_drvinfo()
70 snprintf(info->fw_version, ETHTOOL_FWVERS_LEN, "v%d.%d", in tse_get_drvinfo()
72 sprintf(info->bus_info, "platform"); in tse_get_drvinfo()
87 u64 ext; in tse_fill_stats() local
89 buf[0] = csrrd32(priv->mac_dev, in tse_fill_stats()
91 buf[1] = csrrd32(priv->mac_dev, in tse_fill_stats()
93 buf[2] = csrrd32(priv->mac_dev, in tse_fill_stats()
95 buf[3] = csrrd32(priv->mac_dev, in tse_fill_stats()
99 ext = (u64) csrrd32(priv->mac_dev, in tse_fill_stats()
102 ext |= csrrd32(priv->mac_dev, in tse_fill_stats()
104 buf[4] = ext; in tse_fill_stats()
107 ext = (u64) csrrd32(priv->mac_dev, in tse_fill_stats()
110 ext |= csrrd32(priv->mac_dev, in tse_fill_stats()
112 buf[5] = ext; in tse_fill_stats()
114 buf[6] = csrrd32(priv->mac_dev, in tse_fill_stats()
116 buf[7] = csrrd32(priv->mac_dev, in tse_fill_stats()
118 buf[8] = csrrd32(priv->mac_dev, in tse_fill_stats()
120 buf[9] = csrrd32(priv->mac_dev, in tse_fill_stats()
122 buf[10] = csrrd32(priv->mac_dev, in tse_fill_stats()
124 buf[11] = csrrd32(priv->mac_dev, in tse_fill_stats()
126 buf[12] = csrrd32(priv->mac_dev, in tse_fill_stats()
128 buf[13] = csrrd32(priv->mac_dev, in tse_fill_stats()
130 buf[14] = csrrd32(priv->mac_dev, in tse_fill_stats()
132 buf[15] = csrrd32(priv->mac_dev, in tse_fill_stats()
134 buf[16] = csrrd32(priv->mac_dev, in tse_fill_stats()
136 buf[17] = csrrd32(priv->mac_dev, in tse_fill_stats()
140 ext = (u64) csrrd32(priv->mac_dev, in tse_fill_stats()
142 ext |= csrrd32(priv->mac_dev, in tse_fill_stats()
144 buf[18] = ext; in tse_fill_stats()
146 buf[19] = csrrd32(priv->mac_dev, in tse_fill_stats()
148 buf[20] = csrrd32(priv->mac_dev, in tse_fill_stats()
150 buf[21] = csrrd32(priv->mac_dev, in tse_fill_stats()
152 buf[22] = csrrd32(priv->mac_dev, in tse_fill_stats()
154 buf[23] = csrrd32(priv->mac_dev, in tse_fill_stats()
156 buf[24] = csrrd32(priv->mac_dev, in tse_fill_stats()
158 buf[25] = csrrd32(priv->mac_dev, in tse_fill_stats()
160 buf[26] = csrrd32(priv->mac_dev, in tse_fill_stats()
162 buf[27] = csrrd32(priv->mac_dev, in tse_fill_stats()
164 buf[28] = csrrd32(priv->mac_dev, in tse_fill_stats()
166 buf[29] = csrrd32(priv->mac_dev, in tse_fill_stats()
168 buf[30] = csrrd32(priv->mac_dev, in tse_fill_stats()
178 return -EOPNOTSUPP; in tse_sset_count()
185 return priv->msg_enable; in tse_get_msglevel()
191 priv->msg_enable = data; in tse_set_msglevel()
199 static void tse_get_regs(struct net_device *dev, struct ethtool_regs *regs, in tse_get_regs() argument
214 * Upper 16-bits will indicate feature presence for in tse_get_regs()
218 regs->version = 1; in tse_get_regs()
221 buf[i] = csrrd32(priv->mac_dev, i * 4); in tse_get_regs()
229 return phylink_ethtool_ksettings_set(priv->phylink, cmd); in tse_ethtool_set_link_ksettings()
237 return phylink_ethtool_ksettings_get(priv->phylink, cmd); in tse_ethtool_get_link_ksettings()
257 netdev->ethtool_ops = &tse_ethtool_ops; in altera_tse_set_ethtool_ops()