fec-coldfire.patch 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. diff -Nur linux-4.19.75.orig/drivers/net/ethernet/freescale/fec_main.c linux-4.19.75/drivers/net/ethernet/freescale/fec_main.c
  2. --- linux-4.19.75.orig/drivers/net/ethernet/freescale/fec_main.c 2019-09-21 07:17:15.000000000 +0200
  3. +++ linux-4.19.75/drivers/net/ethernet/freescale/fec_main.c 2019-10-10 01:17:45.284188283 +0200
  4. @@ -156,7 +156,7 @@
  5. module_param_array(macaddr, byte, NULL, 0);
  6. MODULE_PARM_DESC(macaddr, "FEC Ethernet MAC address");
  7. -#if defined(CONFIG_M5272)
  8. +#if defined(CONFIG_COLDFIRE)
  9. /*
  10. * Some hardware gets it MAC address out of local flash memory.
  11. * if this is non-zero then assume it is the address to get MAC from.
  12. @@ -174,7 +174,7 @@
  13. #else
  14. #define FEC_FLASHMAC 0
  15. #endif
  16. -#endif /* CONFIG_M5272 */
  17. +#endif /* CONFIG_COLDFIRE */
  18. /* The FEC stores dest/src/type/vlan, data, and checksum for receive packets.
  19. *
  20. @@ -958,7 +958,7 @@
  21. /* Set MII speed */
  22. writel(fep->phy_speed, fep->hwp + FEC_MII_SPEED);
  23. -#if !defined(CONFIG_M5272)
  24. +#if !defined(CONFIG_COLDFIRE)
  25. if (fep->quirks & FEC_QUIRK_HAS_RACC) {
  26. val = readl(fep->hwp + FEC_RACC);
  27. /* align IP header */
  28. @@ -1027,7 +1027,7 @@
  29. #endif
  30. }
  31. -#if !defined(CONFIG_M5272)
  32. +#if !defined(CONFIG_COLDFIRE)
  33. /* enable pause frame*/
  34. if ((fep->pause_flag & FEC_PAUSE_FLAG_ENABLE) ||
  35. ((fep->pause_flag & FEC_PAUSE_FLAG_AUTONEG) &&
  36. @@ -1045,13 +1045,13 @@
  37. } else {
  38. rcntl &= ~FEC_ENET_FCE;
  39. }
  40. -#endif /* !defined(CONFIG_M5272) */
  41. +#endif /* !defined(CONFIG_COLDFIRE) */
  42. writel(rcntl, fep->hwp + FEC_R_CNTRL);
  43. /* Setup multicast filter. */
  44. set_multicast_list(ndev);
  45. -#ifndef CONFIG_M5272
  46. +#ifndef CONFIG_COLDFIRE
  47. writel(0, fep->hwp + FEC_HASH_TABLE_HIGH);
  48. writel(0, fep->hwp + FEC_HASH_TABLE_LOW);
  49. #endif
  50. @@ -1066,7 +1066,7 @@
  51. if (fep->bufdesc_ex)
  52. ecntl |= (1 << 4);
  53. -#ifndef CONFIG_M5272
  54. +#ifndef CONFIG_COLDFIRE
  55. /* Enable the MIB statistic event counters */
  56. writel(0 << 31, fep->hwp + FEC_MIB_CTRLSTAT);
  57. #endif
  58. @@ -1664,7 +1664,7 @@
  59. * 3) from flash or fuse (via platform data)
  60. */
  61. if (!is_valid_ether_addr(iap)) {
  62. -#ifdef CONFIG_M5272
  63. +#ifdef CONFIG_COLDFIRE
  64. if (FEC_FLASHMAC)
  65. iap = (unsigned char *)FEC_FLASHMAC;
  66. #else
  67. @@ -1943,7 +1943,7 @@
  68. if (fep->quirks & FEC_QUIRK_HAS_GBIT) {
  69. phy_dev->supported &= PHY_GBIT_FEATURES;
  70. phy_dev->supported &= ~SUPPORTED_1000baseT_Half;
  71. -#if !defined(CONFIG_M5272)
  72. +#if !defined(CONFIG_COLDFIRE)
  73. phy_dev->supported |= SUPPORTED_Pause;
  74. #endif
  75. }
  76. @@ -2199,7 +2199,7 @@
  77. }
  78. }
  79. -#if !defined(CONFIG_M5272)
  80. +#if !defined(CONFIG_COLDFIRE)
  81. static void fec_enet_get_pauseparam(struct net_device *ndev,
  82. struct ethtool_pauseparam *pause)
  83. @@ -2391,7 +2391,7 @@
  84. static inline void fec_enet_clear_ethtool_stats(struct net_device *dev)
  85. {
  86. }
  87. -#endif /* !defined(CONFIG_M5272) */
  88. +#endif /* !defined(CONFIG_COLDFIRE) */
  89. /* ITR clock source is enet system clock (clk_ahb).
  90. * TCTT unit is cycle_ns * 64 cycle
  91. @@ -2596,7 +2596,7 @@
  92. .get_link = ethtool_op_get_link,
  93. .get_coalesce = fec_enet_get_coalesce,
  94. .set_coalesce = fec_enet_set_coalesce,
  95. -#ifndef CONFIG_M5272
  96. +#ifndef CONFIG_COLDFIRE
  97. .get_pauseparam = fec_enet_get_pauseparam,
  98. .set_pauseparam = fec_enet_set_pauseparam,
  99. .get_strings = fec_enet_get_strings,
  100. @@ -3385,7 +3385,7 @@
  101. fep->num_rx_queues = num_rx_qs;
  102. fep->num_tx_queues = num_tx_qs;
  103. -#if !defined(CONFIG_M5272)
  104. +#if !defined(CONFIG_COLDFIRE)
  105. /* default enable pause frame auto negotiation */
  106. if (fep->quirks & FEC_QUIRK_HAS_GBIT)
  107. fep->pause_flag |= FEC_PAUSE_FLAG_AUTONEG;