1
0

0510-net-next-mediatek-add-Kconfig-and-Makefile.patch 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. From b6f779ea9c329451b89404583b45b9eb00155b32 Mon Sep 17 00:00:00 2001
  2. From: John Crispin <blogic@openwrt.org>
  3. Date: Wed, 18 Nov 2015 03:58:26 +0100
  4. Subject: [PATCH 510/513] net-next: mediatek: add Kconfig and Makefile
  5. This patch adds the Makefile and Kconfig required to make the driver build.
  6. Signed-off-by: John Crispin <blogic@openwrt.org>
  7. Signed-off-by: Felix Fietkau <nbd@nbd.name>
  8. Signed-off-by: Michael Lee <igvtee@gmail.com>
  9. ---
  10. drivers/net/ethernet/Kconfig | 1 +
  11. drivers/net/ethernet/Makefile | 1 +
  12. drivers/net/ethernet/mediatek/Kconfig | 62 ++++++++++++++++++++++++++++++++
  13. drivers/net/ethernet/mediatek/Makefile | 20 +++++++++++
  14. 4 files changed, 84 insertions(+)
  15. create mode 100644 drivers/net/ethernet/mediatek/Kconfig
  16. create mode 100644 drivers/net/ethernet/mediatek/Makefile
  17. --- a/drivers/net/ethernet/Kconfig
  18. +++ b/drivers/net/ethernet/Kconfig
  19. @@ -106,6 +106,7 @@ config LANTIQ_ETOP
  20. Support for the MII0 inside the Lantiq SoC
  21. source "drivers/net/ethernet/marvell/Kconfig"
  22. +source "drivers/net/ethernet/mediatek/Kconfig"
  23. source "drivers/net/ethernet/mellanox/Kconfig"
  24. source "drivers/net/ethernet/micrel/Kconfig"
  25. source "drivers/net/ethernet/microchip/Kconfig"
  26. --- a/drivers/net/ethernet/Makefile
  27. +++ b/drivers/net/ethernet/Makefile
  28. @@ -46,6 +46,7 @@ obj-$(CONFIG_JME) += jme.o
  29. obj-$(CONFIG_KORINA) += korina.o
  30. obj-$(CONFIG_LANTIQ_ETOP) += lantiq_etop.o
  31. obj-$(CONFIG_NET_VENDOR_MARVELL) += marvell/
  32. +obj-$(CONFIG_NET_VENDOR_MEDIATEK) += mediatek/
  33. obj-$(CONFIG_NET_VENDOR_MELLANOX) += mellanox/
  34. obj-$(CONFIG_NET_VENDOR_MICREL) += micrel/
  35. obj-$(CONFIG_NET_VENDOR_MICROCHIP) += microchip/
  36. --- /dev/null
  37. +++ b/drivers/net/ethernet/mediatek/Kconfig
  38. @@ -0,0 +1,62 @@
  39. +config NET_VENDOR_MEDIATEK
  40. + tristate "Mediatek/Ralink ethernet driver"
  41. + depends on RALINK
  42. + help
  43. + This driver supports the ethernet mac inside the Mediatek and Ralink WiSoCs
  44. +
  45. +config NET_MEDIATEK_SOC
  46. + def_tristate NET_VENDOR_MEDIATEK
  47. +
  48. +if NET_MEDIATEK_SOC
  49. +choice
  50. + prompt "MAC type"
  51. +
  52. +config NET_MEDIATEK_RT2880
  53. + bool "RT2882"
  54. + depends on MIPS && SOC_RT288X
  55. +
  56. +config NET_MEDIATEK_RT3050
  57. + bool "RT3050/MT7628"
  58. + depends on MIPS && (SOC_RT305X || SOC_MT7620)
  59. +
  60. +config NET_MEDIATEK_RT3883
  61. + bool "RT3883"
  62. + depends on MIPS && SOC_RT3883
  63. +
  64. +config NET_MEDIATEK_MT7620
  65. + bool "MT7620"
  66. + depends on MIPS && SOC_MT7620
  67. +
  68. +config NET_MEDIATEK_MT7621
  69. + bool "MT7621"
  70. + depends on MIPS && SOC_MT7621
  71. +
  72. +endchoice
  73. +
  74. +config NET_MEDIATEK_MDIO
  75. + def_bool NET_MEDIATEK_SOC
  76. + depends on (NET_MEDIATEK_RT2880 || NET_MEDIATEK_RT3883 || NET_MEDIATEK_MT7620 || NET_MEDIATEK_MT7621)
  77. + select PHYLIB
  78. +
  79. +config NET_MEDIATEK_MDIO_RT2880
  80. + def_bool NET_MEDIATEK_SOC
  81. + depends on (NET_MEDIATEK_RT2880 || NET_MEDIATEK_RT3883)
  82. + select NET_MEDIATEK_MDIO
  83. +
  84. +config NET_MEDIATEK_MDIO_MT7620
  85. + def_bool NET_MEDIATEK_SOC
  86. + depends on (NET_MEDIATEK_MT7620 || NET_MEDIATEK_MT7621)
  87. + select NET_MEDIATEK_MDIO
  88. +
  89. +config NET_MEDIATEK_ESW_RT3050
  90. + def_tristate NET_MEDIATEK_SOC
  91. + depends on NET_MEDIATEK_RT3050
  92. +
  93. +config NET_MEDIATEK_GSW_MT7620
  94. + def_tristate NET_MEDIATEK_SOC
  95. + depends on NET_MEDIATEK_MT7620
  96. +
  97. +config NET_MEDIATEK_GSW_MT7621
  98. + def_tristate NET_MEDIATEK_SOC
  99. + depends on NET_MEDIATEK_MT7621
  100. +endif
  101. --- /dev/null
  102. +++ b/drivers/net/ethernet/mediatek/Makefile
  103. @@ -0,0 +1,20 @@
  104. +#
  105. +# Makefile for the Ralink SoCs built-in ethernet macs
  106. +#
  107. +
  108. +mtk-eth-soc-y += mtk_eth_soc.o ethtool.o
  109. +
  110. +mtk-eth-soc-$(CONFIG_NET_MEDIATEK_MDIO) += mdio.o
  111. +mtk-eth-soc-$(CONFIG_NET_MEDIATEK_MDIO_RT2880) += mdio_rt2880.o
  112. +mtk-eth-soc-$(CONFIG_NET_MEDIATEK_MDIO_MT7620) += mdio_mt7620.o
  113. +
  114. +mtk-eth-soc-$(CONFIG_NET_MEDIATEK_RT2880) += soc_rt2880.o
  115. +mtk-eth-soc-$(CONFIG_NET_MEDIATEK_RT3050) += soc_rt3050.o
  116. +mtk-eth-soc-$(CONFIG_NET_MEDIATEK_RT3883) += soc_rt3883.o
  117. +mtk-eth-soc-$(CONFIG_NET_MEDIATEK_MT7620) += soc_mt7620.o
  118. +mtk-eth-soc-$(CONFIG_NET_MEDIATEK_MT7621) += soc_mt7621.o
  119. +
  120. +obj-$(CONFIG_NET_MEDIATEK_ESW_RT3050) += esw_rt3050.o
  121. +obj-$(CONFIG_NET_MEDIATEK_GSW_MT7620) += gsw_mt7620.o
  122. +obj-$(CONFIG_NET_MEDIATEK_GSW_MT7621) += gsw_mt7621.o
  123. +obj-$(CONFIG_NET_MEDIATEK_SOC) += mtk-eth-soc.o