All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Crispin <blogic@openwrt.org>
To: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org,
	"Matthias Brugger" <matthias.bgg@gmail.com>,
	"Steven Liu (劉人豪)" <steven.liu@mediatek.com>,
	"Carlos Huang (黃士彰)" <Carlos.Huang@mediatek.com>,
	"Fred Chang (張嘉宏)" <Fred.Chang@mediatek.com>,
	"John Crispin" <blogic@openwrt.org>,
	"Felix Fietkau" <nbd@openwrt.org>,
	"Michael Lee" <igvtee@gmail.com>
Subject: [PATCH V2 11/12] net-next: mediatek: add Kconfig and Makefile
Date: Fri, 26 Feb 2016 15:21:43 +0100	[thread overview]
Message-ID: <1456496504-50429-12-git-send-email-blogic@openwrt.org> (raw)
In-Reply-To: <1456496504-50429-1-git-send-email-blogic@openwrt.org>

This patch adds the Makefile and Kconfig required to make the driver build.

Signed-off-by: John Crispin <blogic@openwrt.org>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Michael Lee <igvtee@gmail.com>
---
 drivers/net/ethernet/Kconfig           |    1 +
 drivers/net/ethernet/Makefile          |    1 +
 drivers/net/ethernet/mediatek/Kconfig  |   70 ++++++++++++++++++++++++++++++++
 drivers/net/ethernet/mediatek/Makefile |   23 +++++++++++
 4 files changed, 95 insertions(+)
 create mode 100644 drivers/net/ethernet/mediatek/Kconfig
 create mode 100644 drivers/net/ethernet/mediatek/Makefile

diff --git a/drivers/net/ethernet/Kconfig b/drivers/net/ethernet/Kconfig
index 31c5e47..cd28b95 100644
--- a/drivers/net/ethernet/Kconfig
+++ b/drivers/net/ethernet/Kconfig
@@ -106,6 +106,7 @@ config LANTIQ_ETOP
 	  Support for the MII0 inside the Lantiq SoC
 
 source "drivers/net/ethernet/marvell/Kconfig"
+source "drivers/net/ethernet/mediatek/Kconfig"
 source "drivers/net/ethernet/mellanox/Kconfig"
 source "drivers/net/ethernet/micrel/Kconfig"
 source "drivers/net/ethernet/microchip/Kconfig"
diff --git a/drivers/net/ethernet/Makefile b/drivers/net/ethernet/Makefile
index 071f84e..c62191f 100644
--- a/drivers/net/ethernet/Makefile
+++ b/drivers/net/ethernet/Makefile
@@ -46,6 +46,7 @@ obj-$(CONFIG_JME) += jme.o
 obj-$(CONFIG_KORINA) += korina.o
 obj-$(CONFIG_LANTIQ_ETOP) += lantiq_etop.o
 obj-$(CONFIG_NET_VENDOR_MARVELL) += marvell/
+obj-$(CONFIG_NET_VENDOR_MEDIATEK) += mediatek/
 obj-$(CONFIG_NET_VENDOR_MELLANOX) += mellanox/
 obj-$(CONFIG_NET_VENDOR_MICREL) += micrel/
 obj-$(CONFIG_NET_VENDOR_MICROCHIP) += microchip/
diff --git a/drivers/net/ethernet/mediatek/Kconfig b/drivers/net/ethernet/mediatek/Kconfig
new file mode 100644
index 0000000..a9b9434
--- /dev/null
+++ b/drivers/net/ethernet/mediatek/Kconfig
@@ -0,0 +1,70 @@
+config NET_VENDOR_MEDIATEK
+	tristate "Mediatek/Ralink ethernet driver"
+	depends on RALINK || ARCH_MEDIATEK
+	help
+	  This driver supports the ethernet mac inside the Mediatek and Ralink WiSoCs
+
+config NET_MEDIATEK_SOC
+	def_tristate NET_VENDOR_MEDIATEK
+
+if NET_MEDIATEK_SOC
+choice
+	prompt "MAC type"
+
+config NET_MEDIATEK_RT2880
+	bool "RT2882"
+	depends on MIPS && SOC_RT288X
+
+config NET_MEDIATEK_RT3050
+	bool "RT3050/MT7628"
+	depends on MIPS && (SOC_RT305X || SOC_MT7620)
+
+config NET_MEDIATEK_RT3883
+	bool "RT3883"
+	depends on MIPS && SOC_RT3883
+
+config NET_MEDIATEK_MT7620
+	bool "MT7620"
+	depends on MIPS && SOC_MT7620
+
+config NET_MEDIATEK_MT7621
+	bool "MT7621"
+	depends on MIPS && SOC_MT7621
+
+config NET_MEDIATEK_MT7623
+	bool "MT7623"
+	depends on ARM && MACH_MT7623
+
+endchoice
+
+config NET_MEDIATEK_MDIO
+	def_bool NET_MEDIATEK_SOC
+	depends on (NET_MEDIATEK_RT2880 || NET_MEDIATEK_RT3883 || NET_MEDIATEK_MT7620 || NET_MEDIATEK_MT7621 || NET_MEDIATEK_MT7623)
+	select PHYLIB
+
+config NET_MEDIATEK_MDIO_RT2880
+	def_bool NET_MEDIATEK_SOC
+	depends on (NET_MEDIATEK_RT2880 || NET_MEDIATEK_RT3883)
+	select NET_MEDIATEK_MDIO
+
+config NET_MEDIATEK_MDIO_MT7620
+	def_bool NET_MEDIATEK_SOC
+	depends on (NET_MEDIATEK_MT7620 || NET_MEDIATEK_MT7621 || NET_MEDIATEK_MT7623)
+	select NET_MEDIATEK_MDIO
+
+config NET_MEDIATEK_ESW_RT3050
+	def_tristate NET_MEDIATEK_SOC
+	depends on NET_MEDIATEK_RT3050
+
+config NET_MEDIATEK_GSW_MT7620
+	def_tristate NET_MEDIATEK_SOC
+	depends on NET_MEDIATEK_MT7620
+
+config NET_MEDIATEK_GSW_MT7621
+	def_tristate NET_MEDIATEK_SOC
+	depends on NET_MEDIATEK_MT7621
+
+config NET_MEDIATEK_GSW_MT7623
+	def_tristate NET_MEDIATEK_SOC
+	depends on NET_MEDIATEK_MT7623
+endif
diff --git a/drivers/net/ethernet/mediatek/Makefile b/drivers/net/ethernet/mediatek/Makefile
new file mode 100644
index 0000000..d9a161d
--- /dev/null
+++ b/drivers/net/ethernet/mediatek/Makefile
@@ -0,0 +1,23 @@
+#
+# Makefile for the Ralink SoCs built-in ethernet macs
+#
+
+mtk-eth-soc-y					+= mtk_eth_soc.o ethtool.o
+
+mtk-eth-soc-$(CONFIG_NET_MEDIATEK_MDIO)		+= mdio.o
+mtk-eth-soc-$(CONFIG_NET_MEDIATEK_MDIO_RT2880)	+= mdio_rt2880.o
+mtk-eth-soc-$(CONFIG_NET_MEDIATEK_MDIO_MT7620)	+= mdio_mt7620.o
+
+mtk-eth-soc-$(CONFIG_NET_MEDIATEK_RT2880)	+= soc_rt2880.o
+mtk-eth-soc-$(CONFIG_NET_MEDIATEK_RT3050)	+= soc_rt3050.o
+mtk-eth-soc-$(CONFIG_NET_MEDIATEK_RT3883)	+= soc_rt3883.o
+mtk-eth-soc-$(CONFIG_NET_MEDIATEK_MT7620)	+= soc_mt7620.o
+mtk-eth-soc-$(CONFIG_NET_MEDIATEK_MT7621)	+= soc_mt7621.o
+mtk-eth-soc-$(CONFIG_NET_MEDIATEK_MT7623)	+= soc_mt7623.o
+
+obj-$(CONFIG_NET_MEDIATEK_ESW_RT3050)		+= esw_rt3050.o
+obj-$(CONFIG_NET_MEDIATEK_GSW_MT7620)		+= gsw_mt7620.o
+obj-$(CONFIG_NET_MEDIATEK_GSW_MT7621)		+= gsw_mt7621.o
+obj-$(CONFIG_NET_MEDIATEK_GSW_MT7623)		+= gsw_mt7623.o
+
+obj-$(CONFIG_NET_MEDIATEK_SOC)			+= mtk-eth-soc.o
-- 
1.7.10.4

WARNING: multiple messages have this Message-ID (diff)
From: blogic@openwrt.org (John Crispin)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V2 11/12] net-next: mediatek: add Kconfig and Makefile
Date: Fri, 26 Feb 2016 15:21:43 +0100	[thread overview]
Message-ID: <1456496504-50429-12-git-send-email-blogic@openwrt.org> (raw)
In-Reply-To: <1456496504-50429-1-git-send-email-blogic@openwrt.org>

This patch adds the Makefile and Kconfig required to make the driver build.

Signed-off-by: John Crispin <blogic@openwrt.org>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Michael Lee <igvtee@gmail.com>
---
 drivers/net/ethernet/Kconfig           |    1 +
 drivers/net/ethernet/Makefile          |    1 +
 drivers/net/ethernet/mediatek/Kconfig  |   70 ++++++++++++++++++++++++++++++++
 drivers/net/ethernet/mediatek/Makefile |   23 +++++++++++
 4 files changed, 95 insertions(+)
 create mode 100644 drivers/net/ethernet/mediatek/Kconfig
 create mode 100644 drivers/net/ethernet/mediatek/Makefile

diff --git a/drivers/net/ethernet/Kconfig b/drivers/net/ethernet/Kconfig
index 31c5e47..cd28b95 100644
--- a/drivers/net/ethernet/Kconfig
+++ b/drivers/net/ethernet/Kconfig
@@ -106,6 +106,7 @@ config LANTIQ_ETOP
 	  Support for the MII0 inside the Lantiq SoC
 
 source "drivers/net/ethernet/marvell/Kconfig"
+source "drivers/net/ethernet/mediatek/Kconfig"
 source "drivers/net/ethernet/mellanox/Kconfig"
 source "drivers/net/ethernet/micrel/Kconfig"
 source "drivers/net/ethernet/microchip/Kconfig"
diff --git a/drivers/net/ethernet/Makefile b/drivers/net/ethernet/Makefile
index 071f84e..c62191f 100644
--- a/drivers/net/ethernet/Makefile
+++ b/drivers/net/ethernet/Makefile
@@ -46,6 +46,7 @@ obj-$(CONFIG_JME) += jme.o
 obj-$(CONFIG_KORINA) += korina.o
 obj-$(CONFIG_LANTIQ_ETOP) += lantiq_etop.o
 obj-$(CONFIG_NET_VENDOR_MARVELL) += marvell/
+obj-$(CONFIG_NET_VENDOR_MEDIATEK) += mediatek/
 obj-$(CONFIG_NET_VENDOR_MELLANOX) += mellanox/
 obj-$(CONFIG_NET_VENDOR_MICREL) += micrel/
 obj-$(CONFIG_NET_VENDOR_MICROCHIP) += microchip/
diff --git a/drivers/net/ethernet/mediatek/Kconfig b/drivers/net/ethernet/mediatek/Kconfig
new file mode 100644
index 0000000..a9b9434
--- /dev/null
+++ b/drivers/net/ethernet/mediatek/Kconfig
@@ -0,0 +1,70 @@
+config NET_VENDOR_MEDIATEK
+	tristate "Mediatek/Ralink ethernet driver"
+	depends on RALINK || ARCH_MEDIATEK
+	help
+	  This driver supports the ethernet mac inside the Mediatek and Ralink WiSoCs
+
+config NET_MEDIATEK_SOC
+	def_tristate NET_VENDOR_MEDIATEK
+
+if NET_MEDIATEK_SOC
+choice
+	prompt "MAC type"
+
+config NET_MEDIATEK_RT2880
+	bool "RT2882"
+	depends on MIPS && SOC_RT288X
+
+config NET_MEDIATEK_RT3050
+	bool "RT3050/MT7628"
+	depends on MIPS && (SOC_RT305X || SOC_MT7620)
+
+config NET_MEDIATEK_RT3883
+	bool "RT3883"
+	depends on MIPS && SOC_RT3883
+
+config NET_MEDIATEK_MT7620
+	bool "MT7620"
+	depends on MIPS && SOC_MT7620
+
+config NET_MEDIATEK_MT7621
+	bool "MT7621"
+	depends on MIPS && SOC_MT7621
+
+config NET_MEDIATEK_MT7623
+	bool "MT7623"
+	depends on ARM && MACH_MT7623
+
+endchoice
+
+config NET_MEDIATEK_MDIO
+	def_bool NET_MEDIATEK_SOC
+	depends on (NET_MEDIATEK_RT2880 || NET_MEDIATEK_RT3883 || NET_MEDIATEK_MT7620 || NET_MEDIATEK_MT7621 || NET_MEDIATEK_MT7623)
+	select PHYLIB
+
+config NET_MEDIATEK_MDIO_RT2880
+	def_bool NET_MEDIATEK_SOC
+	depends on (NET_MEDIATEK_RT2880 || NET_MEDIATEK_RT3883)
+	select NET_MEDIATEK_MDIO
+
+config NET_MEDIATEK_MDIO_MT7620
+	def_bool NET_MEDIATEK_SOC
+	depends on (NET_MEDIATEK_MT7620 || NET_MEDIATEK_MT7621 || NET_MEDIATEK_MT7623)
+	select NET_MEDIATEK_MDIO
+
+config NET_MEDIATEK_ESW_RT3050
+	def_tristate NET_MEDIATEK_SOC
+	depends on NET_MEDIATEK_RT3050
+
+config NET_MEDIATEK_GSW_MT7620
+	def_tristate NET_MEDIATEK_SOC
+	depends on NET_MEDIATEK_MT7620
+
+config NET_MEDIATEK_GSW_MT7621
+	def_tristate NET_MEDIATEK_SOC
+	depends on NET_MEDIATEK_MT7621
+
+config NET_MEDIATEK_GSW_MT7623
+	def_tristate NET_MEDIATEK_SOC
+	depends on NET_MEDIATEK_MT7623
+endif
diff --git a/drivers/net/ethernet/mediatek/Makefile b/drivers/net/ethernet/mediatek/Makefile
new file mode 100644
index 0000000..d9a161d
--- /dev/null
+++ b/drivers/net/ethernet/mediatek/Makefile
@@ -0,0 +1,23 @@
+#
+# Makefile for the Ralink SoCs built-in ethernet macs
+#
+
+mtk-eth-soc-y					+= mtk_eth_soc.o ethtool.o
+
+mtk-eth-soc-$(CONFIG_NET_MEDIATEK_MDIO)		+= mdio.o
+mtk-eth-soc-$(CONFIG_NET_MEDIATEK_MDIO_RT2880)	+= mdio_rt2880.o
+mtk-eth-soc-$(CONFIG_NET_MEDIATEK_MDIO_MT7620)	+= mdio_mt7620.o
+
+mtk-eth-soc-$(CONFIG_NET_MEDIATEK_RT2880)	+= soc_rt2880.o
+mtk-eth-soc-$(CONFIG_NET_MEDIATEK_RT3050)	+= soc_rt3050.o
+mtk-eth-soc-$(CONFIG_NET_MEDIATEK_RT3883)	+= soc_rt3883.o
+mtk-eth-soc-$(CONFIG_NET_MEDIATEK_MT7620)	+= soc_mt7620.o
+mtk-eth-soc-$(CONFIG_NET_MEDIATEK_MT7621)	+= soc_mt7621.o
+mtk-eth-soc-$(CONFIG_NET_MEDIATEK_MT7623)	+= soc_mt7623.o
+
+obj-$(CONFIG_NET_MEDIATEK_ESW_RT3050)		+= esw_rt3050.o
+obj-$(CONFIG_NET_MEDIATEK_GSW_MT7620)		+= gsw_mt7620.o
+obj-$(CONFIG_NET_MEDIATEK_GSW_MT7621)		+= gsw_mt7621.o
+obj-$(CONFIG_NET_MEDIATEK_GSW_MT7623)		+= gsw_mt7623.o
+
+obj-$(CONFIG_NET_MEDIATEK_SOC)			+= mtk-eth-soc.o
-- 
1.7.10.4

  parent reply	other threads:[~2016-02-26 14:22 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-26 14:21 [PATCH V2 00/12] net-next: mediatek: add ethernet driver John Crispin
2016-02-26 14:21 ` John Crispin
2016-02-26 14:21 ` [PATCH V2 01/12] net-next: mediatek: Document ralink/mediatek SoC ethernet binding John Crispin
2016-02-26 14:21   ` John Crispin
2016-03-02 18:46   ` Rob Herring
2016-03-02 18:46     ` Rob Herring
2016-03-02 18:46     ` Rob Herring
2016-03-02 18:49     ` John Crispin
2016-03-02 18:49       ` John Crispin
2016-03-02 18:49       ` John Crispin
2016-02-26 14:21 ` [PATCH V2 02/12] net-next: mediatek: add the drivers core files John Crispin
2016-02-26 14:21   ` John Crispin
2016-02-26 14:21   ` John Crispin
2016-02-26 14:21 ` [PATCH V2 03/12] net-next: mediatek: add embedded switch driver (ESW) John Crispin
2016-02-26 14:21   ` John Crispin
2016-02-26 14:21   ` John Crispin
2016-02-26 15:18   ` Andrew Lunn
2016-02-26 15:18     ` Andrew Lunn
2016-02-26 15:24     ` John Crispin
2016-02-26 15:24       ` John Crispin
2016-02-26 17:05       ` Andrew Lunn
2016-02-26 17:05         ` Andrew Lunn
2016-02-26 17:44         ` David Miller
2016-02-26 17:44           ` David Miller
2016-02-26 17:36       ` David Miller
2016-02-26 17:36         ` David Miller
2016-02-26 18:34       ` Florian Fainelli
2016-02-26 18:34         ` Florian Fainelli
2016-02-26 16:25     ` Felix Fietkau
2016-02-26 16:25       ` Felix Fietkau
2016-02-26 17:29       ` Andrew Lunn
2016-02-26 17:29         ` Andrew Lunn
2016-02-26 17:43       ` David Miller
2016-02-26 17:43         ` David Miller
2016-02-26 17:35     ` David Miller
2016-02-26 17:35       ` David Miller
2016-02-26 14:21 ` [PATCH V2 04/12] net-next: mediatek: add gigabit switch driver (GSW) John Crispin
2016-02-26 14:21   ` John Crispin
2016-02-26 14:21   ` John Crispin
2016-02-26 14:21 ` [PATCH V2 05/12] net-next: mediatek: add support for rt2880 John Crispin
2016-02-26 14:21   ` John Crispin
2016-02-26 14:21 ` [PATCH V2 06/12] net-next: mediatek: add support for rt3050 John Crispin
2016-02-26 14:21   ` John Crispin
2016-02-26 14:21   ` John Crispin
2016-02-26 14:21 ` [PATCH V2 07/12] net-next: mediatek: add support for rt3883 John Crispin
2016-02-26 14:21   ` John Crispin
2016-02-26 14:21 ` [PATCH V2 08/12] net-next: mediatek: add support for mt7620 John Crispin
2016-02-26 14:21   ` John Crispin
2016-02-26 14:21   ` John Crispin
2016-02-26 14:21 ` [PATCH V2 09/12] net-next: mediatek: add support for mt7621 John Crispin
2016-02-26 14:21   ` John Crispin
2016-02-26 14:21 ` [PATCH V2 10/12] net-next: mediatek: add support for mt7623 John Crispin
2016-02-26 14:21   ` John Crispin
2016-02-26 14:21 ` John Crispin [this message]
2016-02-26 14:21   ` [PATCH V2 11/12] net-next: mediatek: add Kconfig and Makefile John Crispin
2016-02-27  3:29   ` kbuild test robot
2016-02-27  3:29     ` kbuild test robot
2016-02-27  3:29     ` kbuild test robot
2016-02-26 14:21 ` [PATCH V2 12/12] net-next: mediatek: add an entry to MAINTAINERS John Crispin
2016-02-26 14:21   ` John Crispin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1456496504-50429-12-git-send-email-blogic@openwrt.org \
    --to=blogic@openwrt.org \
    --cc=Carlos.Huang@mediatek.com \
    --cc=Fred.Chang@mediatek.com \
    --cc=davem@davemloft.net \
    --cc=igvtee@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=nbd@openwrt.org \
    --cc=netdev@vger.kernel.org \
    --cc=steven.liu@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.