m68k-coldfire-fec.patch 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. diff -Nur linux-3.17.7.orig/drivers/net/ethernet/freescale/fec_main.c linux-3.17.7/drivers/net/ethernet/freescale/fec_main.c
  2. --- linux-3.17.7.orig/drivers/net/ethernet/freescale/fec_main.c 2014-12-16 11:37:26.000000000 -0600
  3. +++ linux-3.17.7/drivers/net/ethernet/freescale/fec_main.c 2014-12-28 21:27:24.773847877 -0600
  4. @@ -155,7 +155,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. @@ -173,7 +173,7 @@
  13. #else
  14. #define FEC_FLASHMAC 0
  15. #endif
  16. -#endif /* CONFIG_M5272 */
  17. +#endif /* CONFIG_COLDFIRE */
  18. /* Interrupt events/masks. */
  19. #define FEC_ENET_HBERR ((uint)0x80000000) /* Heartbeat error */
  20. @@ -889,7 +889,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. /* set RX checksum */
  26. val = readl(fep->hwp + FEC_RACC);
  27. if (fep->csum_flags & FLAG_RX_CSUM_ENABLED)
  28. @@ -950,7 +950,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. @@ -968,13 +968,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. @@ -989,7 +989,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. @@ -1436,7 +1436,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. @@ -1699,7 +1699,7 @@
  68. if (id_entry->driver_data & 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. @@ -1894,7 +1894,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. @@ -2049,7 +2049,7 @@
  84. return -EOPNOTSUPP;
  85. }
  86. }
  87. -#endif /* !defined(CONFIG_M5272) */
  88. +#endif /* !defined(CONFIG_COLDFIRE) */
  89. static int fec_enet_nway_reset(struct net_device *dev)
  90. {
  91. @@ -2068,7 +2068,7 @@
  92. .get_drvinfo = fec_enet_get_drvinfo,
  93. .nway_reset = fec_enet_nway_reset,
  94. .get_link = ethtool_op_get_link,
  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. @@ -2571,7 +2571,7 @@
  101. /* setup board info structure */
  102. fep = netdev_priv(ndev);
  103. -#if !defined(CONFIG_M5272)
  104. +#if !defined(CONFIG_COLDFIRE)
  105. /* default enable pause frame auto negotiation */
  106. if (pdev->id_entry &&
  107. (pdev->id_entry->driver_data & FEC_QUIRK_HAS_GBIT))