dwmac1000_core.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547
  1. /*******************************************************************************
  2. This is the driver for the GMAC on-chip Ethernet controller for ST SoCs.
  3. DWC Ether MAC 10/100/1000 Universal version 3.41a has been used for
  4. developing this code.
  5. This only implements the mac core functions for this chip.
  6. Copyright (C) 2007-2009 STMicroelectronics Ltd
  7. This program is free software; you can redistribute it and/or modify it
  8. under the terms and conditions of the GNU General Public License,
  9. version 2, as published by the Free Software Foundation.
  10. This program is distributed in the hope it will be useful, but WITHOUT
  11. ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12. FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  13. more details.
  14. You should have received a copy of the GNU General Public License along with
  15. this program; if not, write to the Free Software Foundation, Inc.,
  16. 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
  17. The full GNU General Public License is included in this distribution in
  18. the file called "COPYING".
  19. Author: Giuseppe Cavallaro <peppe.cavallaro@st.com>
  20. *******************************************************************************/
  21. #include <linux/crc32.h>
  22. #include <linux/slab.h>
  23. #include <linux/ethtool.h>
  24. #include <asm/io.h>
  25. #include "stmmac_pcs.h"
  26. #include "dwmac1000.h"
  27. static void dwmac1000_core_init(struct mac_device_info *hw, int mtu)
  28. {
  29. void __iomem *ioaddr = hw->pcsr;
  30. u32 value = readl(ioaddr + GMAC_CONTROL);
  31. /* Configure GMAC core */
  32. value |= GMAC_CORE_INIT;
  33. if (mtu > 1500)
  34. value |= GMAC_CONTROL_2K;
  35. if (mtu > 2000)
  36. value |= GMAC_CONTROL_JE;
  37. if (hw->ps) {
  38. value |= GMAC_CONTROL_TE;
  39. if (hw->ps == SPEED_1000) {
  40. value &= ~GMAC_CONTROL_PS;
  41. } else {
  42. value |= GMAC_CONTROL_PS;
  43. if (hw->ps == SPEED_10)
  44. value &= ~GMAC_CONTROL_FES;
  45. else
  46. value |= GMAC_CONTROL_FES;
  47. }
  48. }
  49. writel(value, ioaddr + GMAC_CONTROL);
  50. /* Mask GMAC interrupts */
  51. value = GMAC_INT_DEFAULT_MASK;
  52. if (hw->pmt)
  53. value &= ~GMAC_INT_DISABLE_PMT;
  54. if (hw->pcs)
  55. value &= ~GMAC_INT_DISABLE_PCS;
  56. writel(value, ioaddr + GMAC_INT_MASK);
  57. #ifdef STMMAC_VLAN_TAG_USED
  58. /* Tag detection without filtering */
  59. writel(0x0, ioaddr + GMAC_VLAN_TAG);
  60. #endif
  61. }
  62. static int dwmac1000_rx_ipc_enable(struct mac_device_info *hw)
  63. {
  64. void __iomem *ioaddr = hw->pcsr;
  65. u32 value = readl(ioaddr + GMAC_CONTROL);
  66. if (hw->rx_csum)
  67. value |= GMAC_CONTROL_IPC;
  68. else
  69. value &= ~GMAC_CONTROL_IPC;
  70. writel(value, ioaddr + GMAC_CONTROL);
  71. value = readl(ioaddr + GMAC_CONTROL);
  72. return !!(value & GMAC_CONTROL_IPC);
  73. }
  74. static void dwmac1000_dump_regs(struct mac_device_info *hw)
  75. {
  76. void __iomem *ioaddr = hw->pcsr;
  77. int i;
  78. pr_info("\tDWMAC1000 regs (base addr = 0x%p)\n", ioaddr);
  79. for (i = 0; i < 55; i++) {
  80. int offset = i * 4;
  81. pr_info("\tReg No. %d (offset 0x%x): 0x%08x\n", i,
  82. offset, readl(ioaddr + offset));
  83. }
  84. }
  85. static void dwmac1000_set_umac_addr(struct mac_device_info *hw,
  86. unsigned char *addr,
  87. unsigned int reg_n)
  88. {
  89. void __iomem *ioaddr = hw->pcsr;
  90. stmmac_set_mac_addr(ioaddr, addr, GMAC_ADDR_HIGH(reg_n),
  91. GMAC_ADDR_LOW(reg_n));
  92. }
  93. static void dwmac1000_get_umac_addr(struct mac_device_info *hw,
  94. unsigned char *addr,
  95. unsigned int reg_n)
  96. {
  97. void __iomem *ioaddr = hw->pcsr;
  98. stmmac_get_mac_addr(ioaddr, addr, GMAC_ADDR_HIGH(reg_n),
  99. GMAC_ADDR_LOW(reg_n));
  100. }
  101. static void dwmac1000_set_mchash(void __iomem *ioaddr, u32 *mcfilterbits,
  102. int mcbitslog2)
  103. {
  104. int numhashregs, regs;
  105. switch (mcbitslog2) {
  106. case 6:
  107. writel(mcfilterbits[0], ioaddr + GMAC_HASH_LOW);
  108. writel(mcfilterbits[1], ioaddr + GMAC_HASH_HIGH);
  109. return;
  110. break;
  111. case 7:
  112. numhashregs = 4;
  113. break;
  114. case 8:
  115. numhashregs = 8;
  116. break;
  117. default:
  118. pr_debug("STMMAC: err in setting multicast filter\n");
  119. return;
  120. break;
  121. }
  122. for (regs = 0; regs < numhashregs; regs++)
  123. writel(mcfilterbits[regs],
  124. ioaddr + GMAC_EXTHASH_BASE + regs * 4);
  125. }
  126. static void dwmac1000_set_filter(struct mac_device_info *hw,
  127. struct net_device *dev)
  128. {
  129. void __iomem *ioaddr = (void __iomem *)dev->base_addr;
  130. unsigned int value = 0;
  131. unsigned int perfect_addr_number = hw->unicast_filter_entries;
  132. u32 mc_filter[8];
  133. int mcbitslog2 = hw->mcast_bits_log2;
  134. pr_debug("%s: # mcasts %d, # unicast %d\n", __func__,
  135. netdev_mc_count(dev), netdev_uc_count(dev));
  136. memset(mc_filter, 0, sizeof(mc_filter));
  137. if (dev->flags & IFF_PROMISC) {
  138. value = GMAC_FRAME_FILTER_PR;
  139. } else if (dev->flags & IFF_ALLMULTI) {
  140. value = GMAC_FRAME_FILTER_PM; /* pass all multi */
  141. } else if (!netdev_mc_empty(dev)) {
  142. struct netdev_hw_addr *ha;
  143. /* Hash filter for multicast */
  144. value = GMAC_FRAME_FILTER_HMC;
  145. netdev_for_each_mc_addr(ha, dev) {
  146. /* The upper n bits of the calculated CRC are used to
  147. * index the contents of the hash table. The number of
  148. * bits used depends on the hardware configuration
  149. * selected at core configuration time.
  150. */
  151. int bit_nr = bitrev32(~crc32_le(~0, ha->addr,
  152. ETH_ALEN)) >>
  153. (32 - mcbitslog2);
  154. /* The most significant bit determines the register to
  155. * use (H/L) while the other 5 bits determine the bit
  156. * within the register.
  157. */
  158. mc_filter[bit_nr >> 5] |= 1 << (bit_nr & 31);
  159. }
  160. }
  161. dwmac1000_set_mchash(ioaddr, mc_filter, mcbitslog2);
  162. /* Handle multiple unicast addresses (perfect filtering) */
  163. if (netdev_uc_count(dev) > perfect_addr_number)
  164. /* Switch to promiscuous mode if more than unicast
  165. * addresses are requested than supported by hardware.
  166. */
  167. value |= GMAC_FRAME_FILTER_PR;
  168. else {
  169. int reg = 1;
  170. struct netdev_hw_addr *ha;
  171. netdev_for_each_uc_addr(ha, dev) {
  172. stmmac_set_mac_addr(ioaddr, ha->addr,
  173. GMAC_ADDR_HIGH(reg),
  174. GMAC_ADDR_LOW(reg));
  175. reg++;
  176. }
  177. }
  178. #ifdef FRAME_FILTER_DEBUG
  179. /* Enable Receive all mode (to debug filtering_fail errors) */
  180. value |= GMAC_FRAME_FILTER_RA;
  181. #endif
  182. writel(value, ioaddr + GMAC_FRAME_FILTER);
  183. }
  184. static void dwmac1000_flow_ctrl(struct mac_device_info *hw, unsigned int duplex,
  185. unsigned int fc, unsigned int pause_time)
  186. {
  187. void __iomem *ioaddr = hw->pcsr;
  188. /* Set flow such that DZPQ in Mac Register 6 is 0,
  189. * and unicast pause detect is enabled.
  190. */
  191. unsigned int flow = GMAC_FLOW_CTRL_UP;
  192. pr_debug("GMAC Flow-Control:\n");
  193. if (fc & FLOW_RX) {
  194. pr_debug("\tReceive Flow-Control ON\n");
  195. flow |= GMAC_FLOW_CTRL_RFE;
  196. }
  197. if (fc & FLOW_TX) {
  198. pr_debug("\tTransmit Flow-Control ON\n");
  199. flow |= GMAC_FLOW_CTRL_TFE;
  200. }
  201. if (duplex) {
  202. pr_debug("\tduplex mode: PAUSE %d\n", pause_time);
  203. flow |= (pause_time << GMAC_FLOW_CTRL_PT_SHIFT);
  204. }
  205. writel(flow, ioaddr + GMAC_FLOW_CTRL);
  206. }
  207. static void dwmac1000_pmt(struct mac_device_info *hw, unsigned long mode)
  208. {
  209. void __iomem *ioaddr = hw->pcsr;
  210. unsigned int pmt = 0;
  211. if (mode & WAKE_MAGIC) {
  212. pr_debug("GMAC: WOL Magic frame\n");
  213. pmt |= power_down | magic_pkt_en;
  214. }
  215. if (mode & WAKE_UCAST) {
  216. pr_debug("GMAC: WOL on global unicast\n");
  217. pmt |= power_down | global_unicast | wake_up_frame_en;
  218. }
  219. writel(pmt, ioaddr + GMAC_PMT);
  220. }
  221. /* RGMII or SMII interface */
  222. static void dwmac1000_rgsmii(void __iomem *ioaddr, struct stmmac_extra_stats *x)
  223. {
  224. u32 status;
  225. status = readl(ioaddr + GMAC_RGSMIIIS);
  226. x->irq_rgmii_n++;
  227. /* Check the link status */
  228. if (status & GMAC_RGSMIIIS_LNKSTS) {
  229. int speed_value;
  230. x->pcs_link = 1;
  231. speed_value = ((status & GMAC_RGSMIIIS_SPEED) >>
  232. GMAC_RGSMIIIS_SPEED_SHIFT);
  233. if (speed_value == GMAC_RGSMIIIS_SPEED_125)
  234. x->pcs_speed = SPEED_1000;
  235. else if (speed_value == GMAC_RGSMIIIS_SPEED_25)
  236. x->pcs_speed = SPEED_100;
  237. else
  238. x->pcs_speed = SPEED_10;
  239. x->pcs_duplex = (status & GMAC_RGSMIIIS_LNKMOD_MASK);
  240. pr_info("Link is Up - %d/%s\n", (int)x->pcs_speed,
  241. x->pcs_duplex ? "Full" : "Half");
  242. } else {
  243. x->pcs_link = 0;
  244. pr_info("Link is Down\n");
  245. }
  246. }
  247. static int dwmac1000_irq_status(struct mac_device_info *hw,
  248. struct stmmac_extra_stats *x)
  249. {
  250. void __iomem *ioaddr = hw->pcsr;
  251. u32 intr_status = readl(ioaddr + GMAC_INT_STATUS);
  252. u32 intr_mask = readl(ioaddr + GMAC_INT_MASK);
  253. int ret = 0;
  254. /* Discard masked bits */
  255. intr_status &= ~intr_mask;
  256. /* Not used events (e.g. MMC interrupts) are not handled. */
  257. if ((intr_status & GMAC_INT_STATUS_MMCTIS))
  258. x->mmc_tx_irq_n++;
  259. if (unlikely(intr_status & GMAC_INT_STATUS_MMCRIS))
  260. x->mmc_rx_irq_n++;
  261. if (unlikely(intr_status & GMAC_INT_STATUS_MMCCSUM))
  262. x->mmc_rx_csum_offload_irq_n++;
  263. if (unlikely(intr_status & GMAC_INT_DISABLE_PMT)) {
  264. /* clear the PMT bits 5 and 6 by reading the PMT status reg */
  265. readl(ioaddr + GMAC_PMT);
  266. x->irq_receive_pmt_irq_n++;
  267. }
  268. /* MAC tx/rx EEE LPI entry/exit interrupts */
  269. if (intr_status & GMAC_INT_STATUS_LPIIS) {
  270. /* Clean LPI interrupt by reading the Reg 12 */
  271. ret = readl(ioaddr + LPI_CTRL_STATUS);
  272. if (ret & LPI_CTRL_STATUS_TLPIEN)
  273. x->irq_tx_path_in_lpi_mode_n++;
  274. if (ret & LPI_CTRL_STATUS_TLPIEX)
  275. x->irq_tx_path_exit_lpi_mode_n++;
  276. if (ret & LPI_CTRL_STATUS_RLPIEN)
  277. x->irq_rx_path_in_lpi_mode_n++;
  278. if (ret & LPI_CTRL_STATUS_RLPIEX)
  279. x->irq_rx_path_exit_lpi_mode_n++;
  280. }
  281. dwmac_pcs_isr(ioaddr, GMAC_PCS_BASE, intr_status, x);
  282. if (intr_status & PCS_RGSMIIIS_IRQ)
  283. dwmac1000_rgsmii(ioaddr, x);
  284. return ret;
  285. }
  286. static void dwmac1000_set_eee_mode(struct mac_device_info *hw)
  287. {
  288. void __iomem *ioaddr = hw->pcsr;
  289. u32 value;
  290. /* Enable the link status receive on RGMII, SGMII ore SMII
  291. * receive path and instruct the transmit to enter in LPI
  292. * state.
  293. */
  294. value = readl(ioaddr + LPI_CTRL_STATUS);
  295. value |= LPI_CTRL_STATUS_LPIEN | LPI_CTRL_STATUS_LPITXA;
  296. writel(value, ioaddr + LPI_CTRL_STATUS);
  297. }
  298. static void dwmac1000_reset_eee_mode(struct mac_device_info *hw)
  299. {
  300. void __iomem *ioaddr = hw->pcsr;
  301. u32 value;
  302. value = readl(ioaddr + LPI_CTRL_STATUS);
  303. value &= ~(LPI_CTRL_STATUS_LPIEN | LPI_CTRL_STATUS_LPITXA);
  304. writel(value, ioaddr + LPI_CTRL_STATUS);
  305. }
  306. static void dwmac1000_set_eee_pls(struct mac_device_info *hw, int link)
  307. {
  308. void __iomem *ioaddr = hw->pcsr;
  309. u32 value;
  310. value = readl(ioaddr + LPI_CTRL_STATUS);
  311. if (link)
  312. value |= LPI_CTRL_STATUS_PLS;
  313. else
  314. value &= ~LPI_CTRL_STATUS_PLS;
  315. writel(value, ioaddr + LPI_CTRL_STATUS);
  316. }
  317. static void dwmac1000_set_eee_timer(struct mac_device_info *hw, int ls, int tw)
  318. {
  319. void __iomem *ioaddr = hw->pcsr;
  320. int value = ((tw & 0xffff)) | ((ls & 0x7ff) << 16);
  321. /* Program the timers in the LPI timer control register:
  322. * LS: minimum time (ms) for which the link
  323. * status from PHY should be ok before transmitting
  324. * the LPI pattern.
  325. * TW: minimum time (us) for which the core waits
  326. * after it has stopped transmitting the LPI pattern.
  327. */
  328. writel(value, ioaddr + LPI_TIMER_CTRL);
  329. }
  330. static void dwmac1000_ctrl_ane(void __iomem *ioaddr, bool ane, bool srgmi_ral,
  331. bool loopback)
  332. {
  333. dwmac_ctrl_ane(ioaddr, GMAC_PCS_BASE, ane, srgmi_ral, loopback);
  334. }
  335. static void dwmac1000_rane(void __iomem *ioaddr, bool restart)
  336. {
  337. dwmac_rane(ioaddr, GMAC_PCS_BASE, restart);
  338. }
  339. static void dwmac1000_get_adv_lp(void __iomem *ioaddr, struct rgmii_adv *adv)
  340. {
  341. dwmac_get_adv_lp(ioaddr, GMAC_PCS_BASE, adv);
  342. }
  343. static void dwmac1000_debug(void __iomem *ioaddr, struct stmmac_extra_stats *x)
  344. {
  345. u32 value = readl(ioaddr + GMAC_DEBUG);
  346. if (value & GMAC_DEBUG_TXSTSFSTS)
  347. x->mtl_tx_status_fifo_full++;
  348. if (value & GMAC_DEBUG_TXFSTS)
  349. x->mtl_tx_fifo_not_empty++;
  350. if (value & GMAC_DEBUG_TWCSTS)
  351. x->mmtl_fifo_ctrl++;
  352. if (value & GMAC_DEBUG_TRCSTS_MASK) {
  353. u32 trcsts = (value & GMAC_DEBUG_TRCSTS_MASK)
  354. >> GMAC_DEBUG_TRCSTS_SHIFT;
  355. if (trcsts == GMAC_DEBUG_TRCSTS_WRITE)
  356. x->mtl_tx_fifo_read_ctrl_write++;
  357. else if (trcsts == GMAC_DEBUG_TRCSTS_TXW)
  358. x->mtl_tx_fifo_read_ctrl_wait++;
  359. else if (trcsts == GMAC_DEBUG_TRCSTS_READ)
  360. x->mtl_tx_fifo_read_ctrl_read++;
  361. else
  362. x->mtl_tx_fifo_read_ctrl_idle++;
  363. }
  364. if (value & GMAC_DEBUG_TXPAUSED)
  365. x->mac_tx_in_pause++;
  366. if (value & GMAC_DEBUG_TFCSTS_MASK) {
  367. u32 tfcsts = (value & GMAC_DEBUG_TFCSTS_MASK)
  368. >> GMAC_DEBUG_TFCSTS_SHIFT;
  369. if (tfcsts == GMAC_DEBUG_TFCSTS_XFER)
  370. x->mac_tx_frame_ctrl_xfer++;
  371. else if (tfcsts == GMAC_DEBUG_TFCSTS_GEN_PAUSE)
  372. x->mac_tx_frame_ctrl_pause++;
  373. else if (tfcsts == GMAC_DEBUG_TFCSTS_WAIT)
  374. x->mac_tx_frame_ctrl_wait++;
  375. else
  376. x->mac_tx_frame_ctrl_idle++;
  377. }
  378. if (value & GMAC_DEBUG_TPESTS)
  379. x->mac_gmii_tx_proto_engine++;
  380. if (value & GMAC_DEBUG_RXFSTS_MASK) {
  381. u32 rxfsts = (value & GMAC_DEBUG_RXFSTS_MASK)
  382. >> GMAC_DEBUG_RRCSTS_SHIFT;
  383. if (rxfsts == GMAC_DEBUG_RXFSTS_FULL)
  384. x->mtl_rx_fifo_fill_level_full++;
  385. else if (rxfsts == GMAC_DEBUG_RXFSTS_AT)
  386. x->mtl_rx_fifo_fill_above_thresh++;
  387. else if (rxfsts == GMAC_DEBUG_RXFSTS_BT)
  388. x->mtl_rx_fifo_fill_below_thresh++;
  389. else
  390. x->mtl_rx_fifo_fill_level_empty++;
  391. }
  392. if (value & GMAC_DEBUG_RRCSTS_MASK) {
  393. u32 rrcsts = (value & GMAC_DEBUG_RRCSTS_MASK) >>
  394. GMAC_DEBUG_RRCSTS_SHIFT;
  395. if (rrcsts == GMAC_DEBUG_RRCSTS_FLUSH)
  396. x->mtl_rx_fifo_read_ctrl_flush++;
  397. else if (rrcsts == GMAC_DEBUG_RRCSTS_RSTAT)
  398. x->mtl_rx_fifo_read_ctrl_read_data++;
  399. else if (rrcsts == GMAC_DEBUG_RRCSTS_RDATA)
  400. x->mtl_rx_fifo_read_ctrl_status++;
  401. else
  402. x->mtl_rx_fifo_read_ctrl_idle++;
  403. }
  404. if (value & GMAC_DEBUG_RWCSTS)
  405. x->mtl_rx_fifo_ctrl_active++;
  406. if (value & GMAC_DEBUG_RFCFCSTS_MASK)
  407. x->mac_rx_frame_ctrl_fifo = (value & GMAC_DEBUG_RFCFCSTS_MASK)
  408. >> GMAC_DEBUG_RFCFCSTS_SHIFT;
  409. if (value & GMAC_DEBUG_RPESTS)
  410. x->mac_gmii_rx_proto_engine++;
  411. }
  412. static const struct stmmac_ops dwmac1000_ops = {
  413. .core_init = dwmac1000_core_init,
  414. .rx_ipc = dwmac1000_rx_ipc_enable,
  415. .dump_regs = dwmac1000_dump_regs,
  416. .host_irq_status = dwmac1000_irq_status,
  417. .set_filter = dwmac1000_set_filter,
  418. .flow_ctrl = dwmac1000_flow_ctrl,
  419. .pmt = dwmac1000_pmt,
  420. .set_umac_addr = dwmac1000_set_umac_addr,
  421. .get_umac_addr = dwmac1000_get_umac_addr,
  422. .set_eee_mode = dwmac1000_set_eee_mode,
  423. .reset_eee_mode = dwmac1000_reset_eee_mode,
  424. .set_eee_timer = dwmac1000_set_eee_timer,
  425. .set_eee_pls = dwmac1000_set_eee_pls,
  426. .debug = dwmac1000_debug,
  427. .pcs_ctrl_ane = dwmac1000_ctrl_ane,
  428. .pcs_rane = dwmac1000_rane,
  429. .pcs_get_adv_lp = dwmac1000_get_adv_lp,
  430. };
  431. struct mac_device_info *dwmac1000_setup(void __iomem *ioaddr, int mcbins,
  432. int perfect_uc_entries,
  433. int *synopsys_id)
  434. {
  435. struct mac_device_info *mac;
  436. u32 hwid = readl(ioaddr + GMAC_VERSION);
  437. mac = kzalloc(sizeof(const struct mac_device_info), GFP_KERNEL);
  438. if (!mac)
  439. return NULL;
  440. mac->pcsr = ioaddr;
  441. mac->multicast_filter_bins = mcbins;
  442. mac->unicast_filter_entries = perfect_uc_entries;
  443. mac->mcast_bits_log2 = 0;
  444. if (mac->multicast_filter_bins)
  445. mac->mcast_bits_log2 = ilog2(mac->multicast_filter_bins);
  446. mac->mac = &dwmac1000_ops;
  447. mac->dma = &dwmac1000_dma_ops;
  448. mac->link.port = GMAC_CONTROL_PS;
  449. mac->link.duplex = GMAC_CONTROL_DM;
  450. mac->link.speed = GMAC_CONTROL_FES;
  451. mac->mii.addr = GMAC_MII_ADDR;
  452. mac->mii.data = GMAC_MII_DATA;
  453. /* Get and dump the chip ID */
  454. *synopsys_id = stmmac_get_synopsys_id(hwid);
  455. return mac;
  456. }