netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/9] sh_eth: make driver build on any platform
@ 2013-06-07 23:51 Sergei Shtylyov
  2013-06-07 23:54 ` [PATCH 1/9] sh_eth: create initial ID table Sergei Shtylyov
                   ` (9 more replies)
  0 siblings, 10 replies; 16+ messages in thread
From: Sergei Shtylyov @ 2013-06-07 23:51 UTC (permalink / raw)
  To: netdev; +Cc: nobuhiro.iwamatsu.yj, linux-sh

Hello.

   This series of 9 patches are against Dave's 'net-next.git' repository.
   The series deals with the #ifdef'fery around SoC support code/data in the
'sh_eth' driver. It doesn't yet get rid of all the #ifdef's: 3 are left, 1 of
them still hinders ARM multiplatform build -- I'll try to deal with it next
week.

[1/9] sh_eth: create initial ID table
[2/9] sh_eth: get SH771x support out of #ifdef
[3/9] sh_eth: get SH7619 support out of #ifdef
[4/9] sh_eth: get R8A7740 support out of #ifdef
[5/9] sh_eth: get SH77{34|63} support out of #ifdef
[6/9] sh_eth: get SH7757 support out of #ifdef
[7/9] sh_eth: get SH7724 support out of #ifdef
[8/9] sh_eth: get R8A777x support out of #ifdef
[9/9] sh_eth: remove dependencies from Kconfig

WBR, Sergei

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 1/9] sh_eth: create initial ID table
  2013-06-07 23:51 [PATCH 0/9] sh_eth: make driver build on any platform Sergei Shtylyov
@ 2013-06-07 23:54 ` Sergei Shtylyov
  2013-06-07 23:55 ` [PATCH 2/9] sh_eth: get SH771x support out of #ifdef Sergei Shtylyov
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 16+ messages in thread
From: Sergei Shtylyov @ 2013-06-07 23:54 UTC (permalink / raw)
  To: netdev; +Cc: nobuhiro.iwamatsu.yj, linux-sh

We are trying to get away from the current driver's scheme of identifying a SoC
based on #ifdef's and the platform device ID table matching seems to be a good
replacement -- we can use the 'driver_data' field of 'struct platform_device_id'
as a pointer to a 'struct sh_eth_cpu_data'. Start by creating the initial table
with driver's name as the only entry without the driver data. Check  the driver
data in the probe() method and if it's not NULL override 'mdp->cd' from it.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

---
 drivers/net/ethernet/renesas/sh_eth.c |   10 ++++++++++
 1 file changed, 10 insertions(+)

Index: net-next/drivers/net/ethernet/renesas/sh_eth.c
===================================================================
--- net-next.orig/drivers/net/ethernet/renesas/sh_eth.c
+++ net-next/drivers/net/ethernet/renesas/sh_eth.c
@@ -2519,6 +2519,7 @@ static int sh_eth_drv_probe(struct platf
 	struct net_device *ndev = NULL;
 	struct sh_eth_private *mdp = NULL;
 	struct sh_eth_plat_data *pd = pdev->dev.platform_data;
+	const struct platform_device_id *id = platform_get_device_id(pdev);
 
 	/* get base addr */
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
@@ -2582,6 +2583,8 @@ static int sh_eth_drv_probe(struct platf
 #else
 	mdp->cd = &sh_eth_my_cpu_data;
 #endif
+	if (id->driver_data)
+		mdp->cd = (struct sh_eth_cpu_data *)id->driver_data;
 	sh_eth_set_default_cpu_data(mdp->cd);
 
 	/* set function */
@@ -2696,9 +2699,16 @@ static const struct dev_pm_ops sh_eth_de
 #define SH_ETH_PM_OPS NULL
 #endif
 
+static struct platform_device_id sh_eth_id_table[] = {
+	{ CARDNAME },
+	{ }
+};
+MODULE_DEVICE_TABLE(platform, sh_eth_id_table);
+
 static struct platform_driver sh_eth_driver = {
 	.probe = sh_eth_drv_probe,
 	.remove = sh_eth_drv_remove,
+	.id_table = sh_eth_id_table,
 	.driver = {
 		   .name = CARDNAME,
 		   .pm = SH_ETH_PM_OPS,

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 2/9] sh_eth: get SH771x support out of #ifdef
  2013-06-07 23:51 [PATCH 0/9] sh_eth: make driver build on any platform Sergei Shtylyov
  2013-06-07 23:54 ` [PATCH 1/9] sh_eth: create initial ID table Sergei Shtylyov
@ 2013-06-07 23:55 ` Sergei Shtylyov
  2013-06-07 23:56 ` [PATCH 3/9] sh_eth: get SH7619 " Sergei Shtylyov
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 16+ messages in thread
From: Sergei Shtylyov @ 2013-06-07 23:55 UTC (permalink / raw)
  To: netdev; +Cc: nobuhiro.iwamatsu.yj, linux-sh

Get the SH771[02] data in the driver out of #ifdef by adding "sh771x-ether" to
the platform driver's ID table. Change the Ether platform device's name in the
SH platform code accordingly.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

---
Note that in this case the driver's probe will crash anyway as the platform code
is hopelessly behind since it passes PHY ID instead of 'struct sh_eth_plat_data'
pointer as a platform data. Even if it's fixed, the driver probe will fail as
the 'struct sh_eth_cpu_data' indicates presence of TSU but the device resource
for it is absent... :-/

 arch/sh/boards/mach-se/770x/setup.c   |    8 ++++----
 drivers/net/ethernet/renesas/sh_eth.c |    7 ++++---
 2 files changed, 8 insertions(+), 7 deletions(-)

Index: net-next/arch/sh/boards/mach-se/770x/setup.c
===================================================================
--- net-next.orig/arch/sh/boards/mach-se/770x/setup.c
+++ net-next/arch/sh/boards/mach-se/770x/setup.c
@@ -128,8 +128,8 @@ static struct resource sh_eth0_resources
 };
 
 static struct platform_device sh_eth0_device = {
-	.name = "sh-eth",
-	.id	= 0,
+	.name = "sh771x-ether",
+	.id = 0,
 	.dev = {
 		.platform_data = PHY_ID,
 	},
@@ -151,8 +151,8 @@ static struct resource sh_eth1_resources
 };
 
 static struct platform_device sh_eth1_device = {
-	.name = "sh-eth",
-	.id	= 1,
+	.name = "sh771x-ether",
+	.id = 1,
 	.dev = {
 		.platform_data = PHY_ID,
 	},
Index: net-next/drivers/net/ethernet/renesas/sh_eth.c
===================================================================
--- net-next.orig/drivers/net/ethernet/renesas/sh_eth.c
+++ net-next/drivers/net/ethernet/renesas/sh_eth.c
@@ -690,12 +690,12 @@ static struct sh_eth_cpu_data sh_eth_my_
 	.tpauser	= 1,
 	.hw_swap	= 1,
 };
-#elif defined(CONFIG_CPU_SUBTYPE_SH7710) || defined(CONFIG_CPU_SUBTYPE_SH7712)
-static struct sh_eth_cpu_data sh_eth_my_cpu_data = {
+#endif
+
+static struct sh_eth_cpu_data sh771x_data = {
 	.eesipr_value	= DMAC_M_RFRMER | DMAC_M_ECI | 0x003fffff,
 	.tsu		= 1,
 };
-#endif
 
 static void sh_eth_set_default_cpu_data(struct sh_eth_cpu_data *cd)
 {
@@ -2700,6 +2700,7 @@ static const struct dev_pm_ops sh_eth_de
 #endif
 
 static struct platform_device_id sh_eth_id_table[] = {
+	{ "sh771x-ether", (kernel_ulong_t)&sh771x_data },
 	{ CARDNAME },
 	{ }
 };

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 3/9] sh_eth: get SH7619 support out of #ifdef
  2013-06-07 23:51 [PATCH 0/9] sh_eth: make driver build on any platform Sergei Shtylyov
  2013-06-07 23:54 ` [PATCH 1/9] sh_eth: create initial ID table Sergei Shtylyov
  2013-06-07 23:55 ` [PATCH 2/9] sh_eth: get SH771x support out of #ifdef Sergei Shtylyov
@ 2013-06-07 23:56 ` Sergei Shtylyov
  2013-06-07 23:57 ` [PATCH 4/9] sh_eth: get R8A7740 " Sergei Shtylyov
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 16+ messages in thread
From: Sergei Shtylyov @ 2013-06-07 23:56 UTC (permalink / raw)
  To: netdev; +Cc: nobuhiro.iwamatsu.yj, linux-sh

Get  the SH7619 data in the driver out of #ifdef by adding "sh7619-ether" to the
platform driver's ID table. Change the Ether platform device's name  in  the SH
platform code accordingly.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

---
Note that in this case the driver's probe will crash anyway as the platform code
is hopelessly behind since it passes PHY ID instead of 'struct sh_eth_plat_data'
pointer as a platform data.

 arch/sh/kernel/cpu/sh2/setup-sh7619.c |    4 ++--
 drivers/net/ethernet/renesas/sh_eth.c |    6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

Index: net-next/arch/sh/kernel/cpu/sh2/setup-sh7619.c
===================================================================
--- net-next.orig/arch/sh/kernel/cpu/sh2/setup-sh7619.c
+++ net-next/arch/sh/kernel/cpu/sh2/setup-sh7619.c
@@ -124,8 +124,8 @@ static struct resource eth_resources[] =
 };
 
 static struct platform_device eth_device = {
-	.name = "sh-eth",
-	.id	= -1,
+	.name = "sh7619-ether",
+	.id = -1,
 	.dev = {
 		.platform_data = (void *)1,
 	},
Index: net-next/drivers/net/ethernet/renesas/sh_eth.c
===================================================================
--- net-next.orig/drivers/net/ethernet/renesas/sh_eth.c
+++ net-next/drivers/net/ethernet/renesas/sh_eth.c
@@ -680,9 +680,9 @@ static struct sh_eth_cpu_data sh_eth_my_
 	.tsu		= 1,
 	.select_mii	= 1,
 };
+#endif
 
-#elif defined(CONFIG_CPU_SUBTYPE_SH7619)
-static struct sh_eth_cpu_data sh_eth_my_cpu_data = {
+static struct sh_eth_cpu_data sh7619_data = {
 	.eesipr_value	= DMAC_M_RFRMER | DMAC_M_ECI | 0x003fffff,
 
 	.apr		= 1,
@@ -690,7 +690,6 @@ static struct sh_eth_cpu_data sh_eth_my_
 	.tpauser	= 1,
 	.hw_swap	= 1,
 };
-#endif
 
 static struct sh_eth_cpu_data sh771x_data = {
 	.eesipr_value	= DMAC_M_RFRMER | DMAC_M_ECI | 0x003fffff,
@@ -2700,6 +2699,7 @@ static const struct dev_pm_ops sh_eth_de
 #endif
 
 static struct platform_device_id sh_eth_id_table[] = {
+	{ "sh7619-ether", (kernel_ulong_t)&sh7619_data },
 	{ "sh771x-ether", (kernel_ulong_t)&sh771x_data },
 	{ CARDNAME },
 	{ }

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 4/9] sh_eth: get R8A7740 support out of #ifdef
  2013-06-07 23:51 [PATCH 0/9] sh_eth: make driver build on any platform Sergei Shtylyov
                   ` (2 preceding siblings ...)
  2013-06-07 23:56 ` [PATCH 3/9] sh_eth: get SH7619 " Sergei Shtylyov
@ 2013-06-07 23:57 ` Sergei Shtylyov
  2013-06-07 23:58 ` [PATCH 5/9] sh_eth: get SH77{34|63} " Sergei Shtylyov
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 16+ messages in thread
From: Sergei Shtylyov @ 2013-06-07 23:57 UTC (permalink / raw)
  To: netdev; +Cc: nobuhiro.iwamatsu.yj, linux-sh

Get the R8A7740 code/data in the driver out of #ifdef by adding "r8a7740-gether"
to the platform driver's ID table.  Change the GEther platform device's name in
the ARM platform code accordingly.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

---
 arch/arm/mach-shmobile/board-armadillo800eva.c |    2 +-
 arch/arm/mach-shmobile/clock-r8a7740.c         |    2 +-
 drivers/net/ethernet/renesas/sh_eth.c          |   16 +++++++---------
 3 files changed, 9 insertions(+), 11 deletions(-)

Index: net-next/arch/arm/mach-shmobile/board-armadillo800eva.c
===================================================================
--- net-next.orig/arch/arm/mach-shmobile/board-armadillo800eva.c
+++ net-next/arch/arm/mach-shmobile/board-armadillo800eva.c
@@ -377,7 +377,7 @@ static struct resource sh_eth_resources[
 };
 
 static struct platform_device sh_eth_device = {
-	.name = "sh-eth",
+	.name = "r8a7740-gether",
 	.id = -1,
 	.dev = {
 		.platform_data = &sh_eth_platdata,
Index: net-next/arch/arm/mach-shmobile/clock-r8a7740.c
===================================================================
--- net-next.orig/arch/arm/mach-shmobile/clock-r8a7740.c
+++ net-next/arch/arm/mach-shmobile/clock-r8a7740.c
@@ -591,7 +591,7 @@ static struct clk_lookup lookups[] = {
 	CLKDEV_DEV_ID("e6860000.sdhi",          &mstp_clks[MSTP313]),
 	CLKDEV_DEV_ID("sh_mmcif",		&mstp_clks[MSTP312]),
 	CLKDEV_DEV_ID("e6bd0000.mmcif",         &mstp_clks[MSTP312]),
-	CLKDEV_DEV_ID("sh-eth",			&mstp_clks[MSTP309]),
+	CLKDEV_DEV_ID("r8a7740-gether",		&mstp_clks[MSTP309]),
 
 	CLKDEV_DEV_ID("sh_mobile_sdhi.2",	&mstp_clks[MSTP415]),
 	CLKDEV_DEV_ID("e6870000.sdhi",          &mstp_clks[MSTP415]),
Index: net-next/drivers/net/ethernet/renesas/sh_eth.c
===================================================================
--- net-next.orig/drivers/net/ethernet/renesas/sh_eth.c
+++ net-next/drivers/net/ethernet/renesas/sh_eth.c
@@ -619,11 +619,9 @@ static struct sh_eth_cpu_data sh_eth_my_
 	.irq_flags	= IRQF_SHARED,
 #endif
 };
+#endif
 
-
-#elif defined(CONFIG_ARCH_R8A7740)
-
-static void sh_eth_chip_reset(struct net_device *ndev)
+static void sh_eth_chip_reset_r8a7740(struct net_device *ndev)
 {
 	struct sh_eth_private *mdp = netdev_priv(ndev);
 
@@ -634,7 +632,7 @@ static void sh_eth_chip_reset(struct net
 	sh_eth_select_mii(ndev);
 }
 
-static void sh_eth_set_rate(struct net_device *ndev)
+static void sh_eth_set_rate_gether(struct net_device *ndev)
 {
 	struct sh_eth_private *mdp = netdev_priv(ndev);
 
@@ -654,10 +652,10 @@ static void sh_eth_set_rate(struct net_d
 }
 
 /* R8A7740 */
-static struct sh_eth_cpu_data sh_eth_my_cpu_data = {
-	.chip_reset	= sh_eth_chip_reset,
+static struct sh_eth_cpu_data r8a7740_data = {
+	.chip_reset	= sh_eth_chip_reset_r8a7740,
 	.set_duplex	= sh_eth_set_duplex,
-	.set_rate	= sh_eth_set_rate,
+	.set_rate	= sh_eth_set_rate_gether,
 
 	.ecsr_value	= ECSR_ICD | ECSR_MPD,
 	.ecsipr_value	= ECSIPR_LCHNGIP | ECSIPR_ICDIP | ECSIPR_MPDIP,
@@ -680,7 +678,6 @@ static struct sh_eth_cpu_data sh_eth_my_
 	.tsu		= 1,
 	.select_mii	= 1,
 };
-#endif
 
 static struct sh_eth_cpu_data sh7619_data = {
 	.eesipr_value	= DMAC_M_RFRMER | DMAC_M_ECI | 0x003fffff,
@@ -2701,6 +2698,7 @@ static const struct dev_pm_ops sh_eth_de
 static struct platform_device_id sh_eth_id_table[] = {
 	{ "sh7619-ether", (kernel_ulong_t)&sh7619_data },
 	{ "sh771x-ether", (kernel_ulong_t)&sh771x_data },
+	{ "r8a7740-gether", (kernel_ulong_t)&r8a7740_data },
 	{ CARDNAME },
 	{ }
 };

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 5/9] sh_eth: get SH77{34|63} support out of #ifdef
  2013-06-07 23:51 [PATCH 0/9] sh_eth: make driver build on any platform Sergei Shtylyov
                   ` (3 preceding siblings ...)
  2013-06-07 23:57 ` [PATCH 4/9] sh_eth: get R8A7740 " Sergei Shtylyov
@ 2013-06-07 23:58 ` Sergei Shtylyov
  2013-06-07 23:59 ` [PATCH 6/9] sh_eth: get SH7757 " Sergei Shtylyov
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 16+ messages in thread
From: Sergei Shtylyov @ 2013-06-07 23:58 UTC (permalink / raw)
  To: netdev; +Cc: nobuhiro.iwamatsu.yj, linux-sh

Get the SH77{34|63} specific code/data in the driver out of #ifdef by adding
"sh7734-gether" and "sh7763-gether" to the platform driver's ID table.  Note
that we have to split the 'struct sh_eth_cpu_data' instance into two due to
#ifdef inside it; note that we can kill the duplicate sh_eth_set_rate_gether().
Change the GEther platform device's name in the SH platform code accordingly.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

---
 arch/sh/boards/board-espt.c            |    2 
 arch/sh/boards/mach-sh7763rdp/setup.c  |    2 
 arch/sh/kernel/cpu/sh4a/clock-sh7734.c |    2 
 drivers/net/ethernet/renesas/sh_eth.c  |   67 +++++++++++++++++----------------
 4 files changed, 39 insertions(+), 34 deletions(-)

Index: net-next/arch/sh/boards/board-espt.c
===================================================================
--- net-next.orig/arch/sh/boards/board-espt.c
+++ net-next/arch/sh/boards/board-espt.c
@@ -85,7 +85,7 @@ static struct sh_eth_plat_data sh7763_et
 };
 
 static struct platform_device espt_eth_device = {
-	.name       = "sh-eth",
+	.name       = "sh7763-gether",
 	.resource   = sh_eth_resources,
 	.num_resources  = ARRAY_SIZE(sh_eth_resources),
 	.dev        = {
Index: net-next/arch/sh/boards/mach-sh7763rdp/setup.c
===================================================================
--- net-next.orig/arch/sh/boards/mach-sh7763rdp/setup.c
+++ net-next/arch/sh/boards/mach-sh7763rdp/setup.c
@@ -93,7 +93,7 @@ static struct sh_eth_plat_data sh7763_et
 };
 
 static struct platform_device sh7763rdp_eth_device = {
-	.name       = "sh-eth",
+	.name       = "sh7763-gether",
 	.resource   = sh_eth_resources,
 	.num_resources  = ARRAY_SIZE(sh_eth_resources),
 	.dev        = {
Index: net-next/arch/sh/kernel/cpu/sh4a/clock-sh7734.c
===================================================================
--- net-next.orig/arch/sh/kernel/cpu/sh4a/clock-sh7734.c
+++ net-next/arch/sh/kernel/cpu/sh4a/clock-sh7734.c
@@ -238,7 +238,7 @@ static struct clk_lookup lookups[] = {
 	CLKDEV_CON_ID("adc0", &mstp_clks[MSTP313]),
 	CLKDEV_CON_ID("mtu0", &mstp_clks[MSTP312]),
 	CLKDEV_CON_ID("iebus0", &mstp_clks[MSTP304]),
-	CLKDEV_DEV_ID("sh-eth.0", &mstp_clks[MSTP114]),
+	CLKDEV_DEV_ID("sh7734-gether.0", &mstp_clks[MSTP114]),
 	CLKDEV_CON_ID("rtc0", &mstp_clks[MSTP303]),
 	CLKDEV_CON_ID("hif0", &mstp_clks[MSTP302]),
 	CLKDEV_CON_ID("stif0", &mstp_clks[MSTP301]),
Index: net-next/drivers/net/ethernet/renesas/sh_eth.c
===================================================================
--- net-next.orig/drivers/net/ethernet/renesas/sh_eth.c
+++ net-next/drivers/net/ethernet/renesas/sh_eth.c
@@ -556,8 +556,7 @@ static struct sh_eth_cpu_data *sh_eth_ge
 	else
 		return &sh_eth_my_cpu_data;
 }
-
-#elif defined(CONFIG_CPU_SUBTYPE_SH7734) || defined(CONFIG_CPU_SUBTYPE_SH7763)
+#endif
 
 static void sh_eth_chip_reset(struct net_device *ndev)
 {
@@ -568,7 +567,7 @@ static void sh_eth_chip_reset(struct net
 	mdelay(1);
 }
 
-static void sh_eth_set_rate(struct net_device *ndev)
+static void sh_eth_set_rate_gether(struct net_device *ndev)
 {
 	struct sh_eth_private *mdp = netdev_priv(ndev);
 
@@ -587,11 +586,40 @@ static void sh_eth_set_rate(struct net_d
 	}
 }
 
-/* sh7763 */
-static struct sh_eth_cpu_data sh_eth_my_cpu_data = {
+/* SH7734 */
+static struct sh_eth_cpu_data sh7734_data = {
 	.chip_reset	= sh_eth_chip_reset,
 	.set_duplex	= sh_eth_set_duplex,
-	.set_rate	= sh_eth_set_rate,
+	.set_rate	= sh_eth_set_rate_gether,
+
+	.ecsr_value	= ECSR_ICD | ECSR_MPD,
+	.ecsipr_value	= ECSIPR_LCHNGIP | ECSIPR_ICDIP | ECSIPR_MPDIP,
+	.eesipr_value	= DMAC_M_RFRMER | DMAC_M_ECI | 0x003fffff,
+
+	.tx_check	= EESR_TC1 | EESR_FTC,
+	.eesr_err_check	= EESR_TWB1 | EESR_TWB | EESR_TABT | EESR_RABT | \
+			  EESR_RDE | EESR_RFRMER | EESR_TFE | EESR_TDE | \
+			  EESR_ECI,
+	.tx_error_check	= EESR_TWB1 | EESR_TWB | EESR_TABT | EESR_TDE | \
+			  EESR_TFE,
+
+	.apr		= 1,
+	.mpr		= 1,
+	.tpauser	= 1,
+	.bculr		= 1,
+	.hw_swap	= 1,
+	.no_trimd	= 1,
+	.no_ade		= 1,
+	.tsu		= 1,
+	.hw_crc		= 1,
+	.select_mii	= 1,
+};
+
+/* SH7763 */
+static struct sh_eth_cpu_data sh7763_data = {
+	.chip_reset	= sh_eth_chip_reset,
+	.set_duplex	= sh_eth_set_duplex,
+	.set_rate	= sh_eth_set_rate_gether,
 
 	.ecsr_value	= ECSR_ICD | ECSR_MPD,
 	.ecsipr_value	= ECSIPR_LCHNGIP | ECSIPR_ICDIP | ECSIPR_MPDIP,
@@ -612,14 +640,8 @@ static struct sh_eth_cpu_data sh_eth_my_
 	.no_trimd	= 1,
 	.no_ade		= 1,
 	.tsu		= 1,
-#if defined(CONFIG_CPU_SUBTYPE_SH7734)
-	.hw_crc     = 1,
-	.select_mii = 1,
-#else
 	.irq_flags	= IRQF_SHARED,
-#endif
 };
-#endif
 
 static void sh_eth_chip_reset_r8a7740(struct net_device *ndev)
 {
@@ -632,25 +654,6 @@ static void sh_eth_chip_reset_r8a7740(st
 	sh_eth_select_mii(ndev);
 }
 
-static void sh_eth_set_rate_gether(struct net_device *ndev)
-{
-	struct sh_eth_private *mdp = netdev_priv(ndev);
-
-	switch (mdp->speed) {
-	case 10: /* 10BASE */
-		sh_eth_write(ndev, GECMR_10, GECMR);
-		break;
-	case 100:/* 100BASE */
-		sh_eth_write(ndev, GECMR_100, GECMR);
-		break;
-	case 1000: /* 1000BASE */
-		sh_eth_write(ndev, GECMR_1000, GECMR);
-		break;
-	default:
-		break;
-	}
-}
-
 /* R8A7740 */
 static struct sh_eth_cpu_data r8a7740_data = {
 	.chip_reset	= sh_eth_chip_reset_r8a7740,
@@ -2698,6 +2701,8 @@ static const struct dev_pm_ops sh_eth_de
 static struct platform_device_id sh_eth_id_table[] = {
 	{ "sh7619-ether", (kernel_ulong_t)&sh7619_data },
 	{ "sh771x-ether", (kernel_ulong_t)&sh771x_data },
+	{ "sh7734-gether", (kernel_ulong_t)&sh7734_data },
+	{ "sh7763-gether", (kernel_ulong_t)&sh7763_data },
 	{ "r8a7740-gether", (kernel_ulong_t)&r8a7740_data },
 	{ CARDNAME },
 	{ }

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 6/9] sh_eth: get SH7757 support out of #ifdef
  2013-06-07 23:51 [PATCH 0/9] sh_eth: make driver build on any platform Sergei Shtylyov
                   ` (4 preceding siblings ...)
  2013-06-07 23:58 ` [PATCH 5/9] sh_eth: get SH77{34|63} " Sergei Shtylyov
@ 2013-06-07 23:59 ` Sergei Shtylyov
  2013-06-08  0:03 ` [PATCH 7/9] sh_eth: get SH7724 " Sergei Shtylyov
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 16+ messages in thread
From: Sergei Shtylyov @ 2013-06-07 23:59 UTC (permalink / raw)
  To: netdev; +Cc: nobuhiro.iwamatsu.yj, linux-sh

Get the SH7757 code/data in the driver out of #ifdef by adding "sh7757-ether"
and "sh7757-gether" to the platform driver's ID table.  Note that we can remove
SH_ETH_HAS_BOTH_MODULES and sh_eth_get_cpu_data().
Change the Ether/GEther platform devices' names in the SH platform code
accordingly.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

---
 arch/sh/boards/board-sh7757lcr.c      |    8 ++++----
 drivers/net/ethernet/renesas/sh_eth.c |   28 ++++++++--------------------
 2 files changed, 12 insertions(+), 24 deletions(-)

Index: net-next/arch/sh/boards/board-sh7757lcr.c
===================================================================
--- net-next.orig/arch/sh/boards/board-sh7757lcr.c
+++ net-next/arch/sh/boards/board-sh7757lcr.c
@@ -82,7 +82,7 @@ static struct sh_eth_plat_data sh7757_et
 };
 
 static struct platform_device sh7757_eth0_device = {
-	.name		= "sh-eth",
+	.name		= "sh7757-ether",
 	.resource	= sh_eth0_resources,
 	.id		= 0,
 	.num_resources	= ARRAY_SIZE(sh_eth0_resources),
@@ -111,7 +111,7 @@ static struct sh_eth_plat_data sh7757_et
 };
 
 static struct platform_device sh7757_eth1_device = {
-	.name		= "sh-eth",
+	.name		= "sh7757-ether",
 	.resource	= sh_eth1_resources,
 	.id		= 1,
 	.num_resources	= ARRAY_SIZE(sh_eth1_resources),
@@ -157,7 +157,7 @@ static struct sh_eth_plat_data sh7757_et
 };
 
 static struct platform_device sh7757_eth_giga0_device = {
-	.name		= "sh-eth",
+	.name		= "sh7757-gether",
 	.resource	= sh_eth_giga0_resources,
 	.id		= 2,
 	.num_resources	= ARRAY_SIZE(sh_eth_giga0_resources),
@@ -192,7 +192,7 @@ static struct sh_eth_plat_data sh7757_et
 };
 
 static struct platform_device sh7757_eth_giga1_device = {
-	.name		= "sh-eth",
+	.name		= "sh7757-gether",
 	.resource	= sh_eth_giga1_resources,
 	.id		= 3,
 	.num_resources	= ARRAY_SIZE(sh_eth_giga1_resources),
Index: net-next/drivers/net/ethernet/renesas/sh_eth.c
===================================================================
--- net-next.orig/drivers/net/ethernet/renesas/sh_eth.c
+++ net-next/drivers/net/ethernet/renesas/sh_eth.c
@@ -431,10 +431,9 @@ static struct sh_eth_cpu_data sh_eth_my_
 	.rpadir		= 1,
 	.rpadir_value	= 0x00020000, /* NET_IP_ALIGN assumed to be 2 */
 };
-#elif defined(CONFIG_CPU_SUBTYPE_SH7757)
-#define SH_ETH_HAS_BOTH_MODULES	1
+#endif
 
-static void sh_eth_set_rate(struct net_device *ndev)
+static void sh_eth_set_rate_sh7757(struct net_device *ndev)
 {
 	struct sh_eth_private *mdp = netdev_priv(ndev);
 
@@ -451,9 +450,9 @@ static void sh_eth_set_rate(struct net_d
 }
 
 /* SH7757 */
-static struct sh_eth_cpu_data sh_eth_my_cpu_data = {
-	.set_duplex		= sh_eth_set_duplex,
-	.set_rate		= sh_eth_set_rate,
+static struct sh_eth_cpu_data sh7757_data = {
+	.set_duplex	= sh_eth_set_duplex,
+	.set_rate	= sh_eth_set_rate_sh7757,
 
 	.eesipr_value	= DMAC_M_RFRMER | DMAC_M_ECI | 0x003fffff,
 	.rmcr_value	= 0x00000001,
@@ -518,7 +517,7 @@ static void sh_eth_set_rate_giga(struct 
 }
 
 /* SH7757(GETHERC) */
-static struct sh_eth_cpu_data sh_eth_my_cpu_data_giga = {
+static struct sh_eth_cpu_data sh7757_data_giga = {
 	.chip_reset	= sh_eth_chip_reset_giga,
 	.set_duplex	= sh_eth_set_duplex,
 	.set_rate	= sh_eth_set_rate_giga,
@@ -549,15 +548,6 @@ static struct sh_eth_cpu_data sh_eth_my_
 	.tsu		= 1,
 };
 
-static struct sh_eth_cpu_data *sh_eth_get_cpu_data(struct sh_eth_private *mdp)
-{
-	if (sh_eth_is_gether(mdp))
-		return &sh_eth_my_cpu_data_giga;
-	else
-		return &sh_eth_my_cpu_data;
-}
-#endif
-
 static void sh_eth_chip_reset(struct net_device *ndev)
 {
 	struct sh_eth_private *mdp = netdev_priv(ndev);
@@ -2577,11 +2567,7 @@ static int sh_eth_drv_probe(struct platf
 	mdp->reg_offset = sh_eth_get_register_offset(pd->register_type);
 
 	/* set cpu data */
-#if defined(SH_ETH_HAS_BOTH_MODULES)
-	mdp->cd = sh_eth_get_cpu_data(mdp);
-#else
 	mdp->cd = &sh_eth_my_cpu_data;
-#endif
 	if (id->driver_data)
 		mdp->cd = (struct sh_eth_cpu_data *)id->driver_data;
 	sh_eth_set_default_cpu_data(mdp->cd);
@@ -2702,6 +2688,8 @@ static struct platform_device_id sh_eth_
 	{ "sh7619-ether", (kernel_ulong_t)&sh7619_data },
 	{ "sh771x-ether", (kernel_ulong_t)&sh771x_data },
 	{ "sh7734-gether", (kernel_ulong_t)&sh7734_data },
+	{ "sh7757-ether", (kernel_ulong_t)&sh7757_data },
+	{ "sh7757-gether", (kernel_ulong_t)&sh7757_data_giga },
 	{ "sh7763-gether", (kernel_ulong_t)&sh7763_data },
 	{ "r8a7740-gether", (kernel_ulong_t)&r8a7740_data },
 	{ CARDNAME },

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 7/9] sh_eth: get SH7724 support out of #ifdef
  2013-06-07 23:51 [PATCH 0/9] sh_eth: make driver build on any platform Sergei Shtylyov
                   ` (5 preceding siblings ...)
  2013-06-07 23:59 ` [PATCH 6/9] sh_eth: get SH7757 " Sergei Shtylyov
@ 2013-06-08  0:03 ` Sergei Shtylyov
  2013-06-08  0:05 ` [PATCH 8/9] sh_eth: get R8A777x " Sergei Shtylyov
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 16+ messages in thread
From: Sergei Shtylyov @ 2013-06-08  0:03 UTC (permalink / raw)
  To: netdev, lethal; +Cc: nobuhiro.iwamatsu.yj, linux-sh

Get the SH7724 code/data in the driver out of #ifdef by adding "r8a7724-ether"
to the platform driver's ID table. Change the Ether platform device's name in
the SH platform code accordingly.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

---
Note that the Ether paltform data in the SolutionEngine7724 board code lacks the
initializer for the 'register_type' field which means it'll be  incorrectly  set
to SH_ETH_REG_GIGABIT...

 arch/sh/boards/mach-ecovec24/setup.c   |    4 ++--
 arch/sh/boards/mach-se/7724/setup.c    |    4 ++--
 arch/sh/kernel/cpu/sh4a/clock-sh7724.c |    2 +-
 drivers/net/ethernet/renesas/sh_eth.c  |   10 +++++-----
 4 files changed, 10 insertions(+), 10 deletions(-)

Index: net-next/arch/sh/boards/mach-ecovec24/setup.c
===================================================================
--- net-next.orig/arch/sh/boards/mach-ecovec24/setup.c
+++ net-next/arch/sh/boards/mach-ecovec24/setup.c
@@ -165,8 +165,8 @@ static struct sh_eth_plat_data sh_eth_pl
 };
 
 static struct platform_device sh_eth_device = {
-	.name = "sh-eth",
-	.id	= 0,
+	.name = "sh7724-ether",
+	.id = 0,
 	.dev = {
 		.platform_data = &sh_eth_plat,
 	},
Index: net-next/arch/sh/boards/mach-se/7724/setup.c
===================================================================
--- net-next.orig/arch/sh/boards/mach-se/7724/setup.c
+++ net-next/arch/sh/boards/mach-se/7724/setup.c
@@ -380,8 +380,8 @@ static struct sh_eth_plat_data sh_eth_pl
 };
 
 static struct platform_device sh_eth_device = {
-	.name = "sh-eth",
-	.id	= 0,
+	.name = "sh7724-ether",
+	.id = 0,
 	.dev = {
 		.platform_data = &sh_eth_plat,
 	},
Index: net-next/arch/sh/kernel/cpu/sh4a/clock-sh7724.c
===================================================================
--- net-next.orig/arch/sh/kernel/cpu/sh4a/clock-sh7724.c
+++ net-next/arch/sh/kernel/cpu/sh4a/clock-sh7724.c
@@ -329,7 +329,7 @@ static struct clk_lookup lookups[] = {
 	CLKDEV_DEV_ID("i2c-sh_mobile.0", &mstp_clks[HWBLK_IIC0]),
 	CLKDEV_DEV_ID("i2c-sh_mobile.1", &mstp_clks[HWBLK_IIC1]),
 	CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[HWBLK_MMC]),
-	CLKDEV_DEV_ID("sh-eth.0", &mstp_clks[HWBLK_ETHER]),
+	CLKDEV_DEV_ID("sh7724-ether.0", &mstp_clks[HWBLK_ETHER]),
 	CLKDEV_CON_ID("atapi0", &mstp_clks[HWBLK_ATAPI]),
 	CLKDEV_CON_ID("tpu0", &mstp_clks[HWBLK_TPU]),
 	CLKDEV_CON_ID("irda0", &mstp_clks[HWBLK_IRDA]),
Index: net-next/drivers/net/ethernet/renesas/sh_eth.c
===================================================================
--- net-next.orig/drivers/net/ethernet/renesas/sh_eth.c
+++ net-next/drivers/net/ethernet/renesas/sh_eth.c
@@ -392,9 +392,9 @@ static struct sh_eth_cpu_data sh_eth_my_
 	.tpauser	= 1,
 	.hw_swap	= 1,
 };
-#elif defined(CONFIG_CPU_SUBTYPE_SH7724)
+#endif
 
-static void sh_eth_set_rate(struct net_device *ndev)
+static void sh_eth_set_rate_sh7724(struct net_device *ndev)
 {
 	struct sh_eth_private *mdp = netdev_priv(ndev);
 
@@ -411,9 +411,9 @@ static void sh_eth_set_rate(struct net_d
 }
 
 /* SH7724 */
-static struct sh_eth_cpu_data sh_eth_my_cpu_data = {
+static struct sh_eth_cpu_data sh7724_data = {
 	.set_duplex	= sh_eth_set_duplex,
-	.set_rate	= sh_eth_set_rate,
+	.set_rate	= sh_eth_set_rate_sh7724,
 
 	.ecsr_value	= ECSR_PSRTO | ECSR_LCHNG | ECSR_ICD,
 	.ecsipr_value	= ECSIPR_PSRTOIP | ECSIPR_LCHNGIP | ECSIPR_ICDIP,
@@ -431,7 +431,6 @@ static struct sh_eth_cpu_data sh_eth_my_
 	.rpadir		= 1,
 	.rpadir_value	= 0x00020000, /* NET_IP_ALIGN assumed to be 2 */
 };
-#endif
 
 static void sh_eth_set_rate_sh7757(struct net_device *ndev)
 {
@@ -2687,6 +2686,7 @@ static const struct dev_pm_ops sh_eth_de
 static struct platform_device_id sh_eth_id_table[] = {
 	{ "sh7619-ether", (kernel_ulong_t)&sh7619_data },
 	{ "sh771x-ether", (kernel_ulong_t)&sh771x_data },
+	{ "sh7724-ether", (kernel_ulong_t)&sh7724_data },
 	{ "sh7734-gether", (kernel_ulong_t)&sh7734_data },
 	{ "sh7757-ether", (kernel_ulong_t)&sh7757_data },
 	{ "sh7757-gether", (kernel_ulong_t)&sh7757_data_giga },

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 8/9] sh_eth: get R8A777x support out of #ifdef
  2013-06-07 23:51 [PATCH 0/9] sh_eth: make driver build on any platform Sergei Shtylyov
                   ` (6 preceding siblings ...)
  2013-06-08  0:03 ` [PATCH 7/9] sh_eth: get SH7724 " Sergei Shtylyov
@ 2013-06-08  0:05 ` Sergei Shtylyov
  2013-06-08  0:07 ` [PATCH 9/9] sh_eth: remove dependencies from Kconfig Sergei Shtylyov
  2013-06-08  0:10 ` [PATCH 0/9] sh_eth: make driver build on any platform Sergei Shtylyov
  9 siblings, 0 replies; 16+ messages in thread
From: Sergei Shtylyov @ 2013-06-08  0:05 UTC (permalink / raw)
  To: netdev; +Cc: nobuhiro.iwamatsu.yj, linux-sh

Get the R-Car code/data in the driver out of #ifdef by adding "r8a777x-ether" to
the platfrom driver's  ID table; since it's the last #ifdef, we remove CARDNAME
from the  ID table and no longer check  the driver data before  assigning it to
'mdp->cd'...
Change the Ether platform device's name in the ARM platform code accordingly.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

---
Note that the Ether device on R8A777[89]  cannot yet be used due to  the typo in
the device name when registering the platform device -- I'll fix this in the ARM
tree. Moreover, the only working Ether board code (for the BOCK-W board) will be
merged only in 3.11...

 arch/arm/mach-shmobile/clock-r8a7778.c |    2 +-
 arch/arm/mach-shmobile/clock-r8a7779.c |    2 +-
 drivers/net/ethernet/renesas/sh_eth.c  |   14 +++++---------
 3 files changed, 7 insertions(+), 11 deletions(-)

Index: net-next/arch/arm/mach-shmobile/clock-r8a7778.c
===================================================================
--- net-next.orig/arch/arm/mach-shmobile/clock-r8a7778.c
+++ net-next/arch/arm/mach-shmobile/clock-r8a7778.c
@@ -77,7 +77,7 @@ static struct clk mstp_clks[MSTP_NR] = {
 
 static struct clk_lookup lookups[] = {
 	/* MSTP32 clocks */
-	CLKDEV_DEV_ID("sh-eth",	&mstp_clks[MSTP114]), /* Ether */
+	CLKDEV_DEV_ID("r8a777x-ether", &mstp_clks[MSTP114]), /* Ether */
 	CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP026]), /* SCIF0 */
 	CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP025]), /* SCIF1 */
 	CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP024]), /* SCIF2 */
Index: net-next/arch/arm/mach-shmobile/clock-r8a7779.c
===================================================================
--- net-next.orig/arch/arm/mach-shmobile/clock-r8a7779.c
+++ net-next/arch/arm/mach-shmobile/clock-r8a7779.c
@@ -163,7 +163,7 @@ static struct clk_lookup lookups[] = {
 	/* MSTP32 clocks */
 	CLKDEV_DEV_ID("sata_rcar", &mstp_clks[MSTP115]), /* SATA */
 	CLKDEV_DEV_ID("fc600000.sata", &mstp_clks[MSTP115]), /* SATA w/DT */
-	CLKDEV_DEV_ID("sh-eth", &mstp_clks[MSTP114]), /* Ether */
+	CLKDEV_DEV_ID("r8a777x-ether", &mstp_clks[MSTP114]), /* Ether */
 	CLKDEV_DEV_ID("ehci-platform.1", &mstp_clks[MSTP101]), /* USB EHCI port2 */
 	CLKDEV_DEV_ID("ohci-platform.1", &mstp_clks[MSTP101]), /* USB OHCI port2 */
 	CLKDEV_DEV_ID("ehci-platform.0", &mstp_clks[MSTP100]), /* USB EHCI port0/1 */
Index: net-next/drivers/net/ethernet/renesas/sh_eth.c
===================================================================
--- net-next.orig/drivers/net/ethernet/renesas/sh_eth.c
+++ net-next/drivers/net/ethernet/renesas/sh_eth.c
@@ -356,8 +356,7 @@ static void __maybe_unused sh_eth_set_du
 }
 
 /* There is CPU dependent code */
-#if defined(CONFIG_ARCH_R8A7778) || defined(CONFIG_ARCH_R8A7779)
-static void sh_eth_set_rate(struct net_device *ndev)
+static void sh_eth_set_rate_r8a777x(struct net_device *ndev)
 {
 	struct sh_eth_private *mdp = netdev_priv(ndev);
 
@@ -374,9 +373,9 @@ static void sh_eth_set_rate(struct net_d
 }
 
 /* R8A7778/9 */
-static struct sh_eth_cpu_data sh_eth_my_cpu_data = {
+static struct sh_eth_cpu_data r8a777x_data = {
 	.set_duplex	= sh_eth_set_duplex,
-	.set_rate	= sh_eth_set_rate,
+	.set_rate	= sh_eth_set_rate_r8a777x,
 
 	.ecsr_value	= ECSR_PSRTO | ECSR_LCHNG | ECSR_ICD,
 	.ecsipr_value	= ECSIPR_PSRTOIP | ECSIPR_LCHNGIP | ECSIPR_ICDIP,
@@ -392,7 +391,6 @@ static struct sh_eth_cpu_data sh_eth_my_
 	.tpauser	= 1,
 	.hw_swap	= 1,
 };
-#endif
 
 static void sh_eth_set_rate_sh7724(struct net_device *ndev)
 {
@@ -2566,9 +2564,7 @@ static int sh_eth_drv_probe(struct platf
 	mdp->reg_offset = sh_eth_get_register_offset(pd->register_type);
 
 	/* set cpu data */
-	mdp->cd = &sh_eth_my_cpu_data;
-	if (id->driver_data)
-		mdp->cd = (struct sh_eth_cpu_data *)id->driver_data;
+	mdp->cd = (struct sh_eth_cpu_data *)id->driver_data;
 	sh_eth_set_default_cpu_data(mdp->cd);
 
 	/* set function */
@@ -2692,7 +2688,7 @@ static struct platform_device_id sh_eth_
 	{ "sh7757-gether", (kernel_ulong_t)&sh7757_data_giga },
 	{ "sh7763-gether", (kernel_ulong_t)&sh7763_data },
 	{ "r8a7740-gether", (kernel_ulong_t)&r8a7740_data },
-	{ CARDNAME },
+	{ "r8a777x-ether", (kernel_ulong_t)&r8a777x_data },
 	{ }
 };
 MODULE_DEVICE_TABLE(platform, sh_eth_id_table);

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 9/9] sh_eth: remove dependencies from Kconfig
  2013-06-07 23:51 [PATCH 0/9] sh_eth: make driver build on any platform Sergei Shtylyov
                   ` (7 preceding siblings ...)
  2013-06-08  0:05 ` [PATCH 8/9] sh_eth: get R8A777x " Sergei Shtylyov
@ 2013-06-08  0:07 ` Sergei Shtylyov
  2013-06-08  0:10 ` [PATCH 0/9] sh_eth: make driver build on any platform Sergei Shtylyov
  9 siblings, 0 replies; 16+ messages in thread
From: Sergei Shtylyov @ 2013-06-08  0:07 UTC (permalink / raw)
  To: netdev; +Cc: nobuhiro.iwamatsu.yj, linux-sh

Since dependence on the certain SoCs is no  longer  necessary to compile the
driver, remove the dependency list from its Kconfig entry which is a popular
demand anyway...

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

---
 drivers/net/ethernet/renesas/Kconfig |    6 ------
 1 file changed, 6 deletions(-)

Index: net-next/drivers/net/ethernet/renesas/Kconfig
===================================================================
--- net-next.orig/drivers/net/ethernet/renesas/Kconfig
+++ net-next/drivers/net/ethernet/renesas/Kconfig
@@ -4,12 +4,6 @@
 
 config SH_ETH
 	tristate "Renesas SuperH Ethernet support"
-	depends on (SUPERH || ARCH_SHMOBILE) && \
-		(CPU_SUBTYPE_SH7710 || CPU_SUBTYPE_SH7712 || \
-		 CPU_SUBTYPE_SH7763 || CPU_SUBTYPE_SH7619 || \
-		 CPU_SUBTYPE_SH7724 || CPU_SUBTYPE_SH7734 || \
-		 CPU_SUBTYPE_SH7757 || ARCH_R8A7740 || \
-		 ARCH_R8A7778 || ARCH_R8A7779)
 	select CRC32
 	select NET_CORE
 	select MII

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 0/9] sh_eth: make driver build on any platform
  2013-06-07 23:51 [PATCH 0/9] sh_eth: make driver build on any platform Sergei Shtylyov
                   ` (8 preceding siblings ...)
  2013-06-08  0:07 ` [PATCH 9/9] sh_eth: remove dependencies from Kconfig Sergei Shtylyov
@ 2013-06-08  0:10 ` Sergei Shtylyov
  2013-06-08  0:15   ` Sergei Shtylyov
  9 siblings, 1 reply; 16+ messages in thread
From: Sergei Shtylyov @ 2013-06-08  0:10 UTC (permalink / raw)
  To: netdev, Paul Mundt; +Cc: nobuhiro.iwamatsu.yj, linux-sh

Hello.

On 06/08/2013 03:51 AM, Sergei Shtylyov wrote:

>     This series of 9 patches are against Dave's 'net-next.git' repository.
>     The series deals with the #ifdef'fery around SoC support code/data in the
> 'sh_eth' driver. It doesn't yet get rid of all the #ifdef's: 3 are left, 1 of
> them still hinders ARM multiplatform build -- I'll try to deal with it next
> week.
>
> [1/9] sh_eth: create initial ID table
> [2/9] sh_eth: get SH771x support out of #ifdef
> [3/9] sh_eth: get SH7619 support out of #ifdef
> [4/9] sh_eth: get R8A7740 support out of #ifdef
> [5/9] sh_eth: get SH77{34|63} support out of #ifdef
> [6/9] sh_eth: get SH7757 support out of #ifdef
> [7/9] sh_eth: get SH7724 support out of #ifdef
> [8/9] sh_eth: get R8A777x support out of #ifdef
> [9/9] sh_eth: remove dependencies from Kconfig
>

    Sorry, Paul, forgot to include you into the CC list on most of the 
patches
and the cover letter. Please look for the patches on linux-sh and ACK them
if you deem necessary.

WBR, Serge


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 0/9] sh_eth: make driver build on any platform
  2013-06-08  0:10 ` [PATCH 0/9] sh_eth: make driver build on any platform Sergei Shtylyov
@ 2013-06-08  0:15   ` Sergei Shtylyov
  2013-06-08  6:39     ` David Miller
  0 siblings, 1 reply; 16+ messages in thread
From: Sergei Shtylyov @ 2013-06-08  0:15 UTC (permalink / raw)
  To: netdev, Paul Mundt, Simon Horman
  Cc: nobuhiro.iwamatsu.yj, linux-sh, Magnus Damm, Russell King,
	linux-arm-kernel

On 06/08/2013 04:10 AM, Sergei Shtylyov wrote:
> Hello.
>
> On 06/08/2013 03:51 AM, Sergei Shtylyov wrote:
>
>>     This series of 9 patches are against Dave's 'net-next.git' 
>> repository.
>>     The series deals with the #ifdef'fery around SoC support 
>> code/data in the
>> 'sh_eth' driver. It doesn't yet get rid of all the #ifdef's: 3 are 
>> left, 1 of
>> them still hinders ARM multiplatform build -- I'll try to deal with 
>> it next
>> week.
>>
>> [1/9] sh_eth: create initial ID table
>> [2/9] sh_eth: get SH771x support out of #ifdef
>> [3/9] sh_eth: get SH7619 support out of #ifdef
>> [4/9] sh_eth: get R8A7740 support out of #ifdef
>> [5/9] sh_eth: get SH77{34|63} support out of #ifdef
>> [6/9] sh_eth: get SH7757 support out of #ifdef
>> [7/9] sh_eth: get SH7724 support out of #ifdef
>> [8/9] sh_eth: get R8A777x support out of #ifdef
>> [9/9] sh_eth: remove dependencies from Kconfig
>>
>
>    Sorry, Paul, forgot to include you into the CC list on most of the 
> patches
> and the cover letter. Please look for the patches on linux-sh and ACK 
> them
> if you deem necessary.

    Also, forgot to CC Simon, Magnus, Russell and LAKML on some patches.
Too much haste, forgot to run scripts/get_maintainer.pl before sending 
out patches...

WBR, Sergei


>
> WBR, Serge
>


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 0/9] sh_eth: make driver build on any platform
  2013-06-08  0:15   ` Sergei Shtylyov
@ 2013-06-08  6:39     ` David Miller
  2013-06-08 13:11       ` Sergei Shtylyov
  0 siblings, 1 reply; 16+ messages in thread
From: David Miller @ 2013-06-08  6:39 UTC (permalink / raw)
  To: sergei.shtylyov
  Cc: netdev, lethal, horms, nobuhiro.iwamatsu.yj, linux-sh,
	magnus.damm, linux, linux-arm-kernel

From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Date: Sat, 08 Jun 2013 04:15:35 +0400

> On 06/08/2013 04:10 AM, Sergei Shtylyov wrote:
>> Hello.
>>
>> On 06/08/2013 03:51 AM, Sergei Shtylyov wrote:
>>
>>>     This series of 9 patches are against Dave's 'net-next.git' repository.
>>>     The series deals with the #ifdef'fery around SoC support code/data in
>>>     the
>>> 'sh_eth' driver. It doesn't yet get rid of all the #ifdef's: 3 are
>>> left, 1 of
>>> them still hinders ARM multiplatform build -- I'll try to deal with it
>>> next
>>> week.
>>>
>>> [1/9] sh_eth: create initial ID table
>>> [2/9] sh_eth: get SH771x support out of #ifdef
>>> [3/9] sh_eth: get SH7619 support out of #ifdef
>>> [4/9] sh_eth: get R8A7740 support out of #ifdef
>>> [5/9] sh_eth: get SH77{34|63} support out of #ifdef
>>> [6/9] sh_eth: get SH7757 support out of #ifdef
>>> [7/9] sh_eth: get SH7724 support out of #ifdef
>>> [8/9] sh_eth: get R8A777x support out of #ifdef
>>> [9/9] sh_eth: remove dependencies from Kconfig
>>>
>>
>>    Sorry, Paul, forgot to include you into the CC list on most of the
>>    patches
>> and the cover letter. Please look for the patches on linux-sh and ACK
>> them
>> if you deem necessary.
> 
>    Also, forgot to CC Simon, Magnus, Russell and LAKML on some patches.
> Too much haste, forgot to run scripts/get_maintainer.pl before sending
> out patches...

I'll apply this solely because it finally allows me to build test this
driver on x86-64.

:-)

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 0/9] sh_eth: make driver build on any platform
  2013-06-08  6:39     ` David Miller
@ 2013-06-08 13:11       ` Sergei Shtylyov
  2013-06-08 13:24         ` Sergei Shtylyov
  2013-06-08 18:18         ` David Miller
  0 siblings, 2 replies; 16+ messages in thread
From: Sergei Shtylyov @ 2013-06-08 13:11 UTC (permalink / raw)
  To: David Miller
  Cc: netdev, lethal, horms, nobuhiro.iwamatsu.yj, linux-sh,
	magnus.damm, linux, linux-arm-kernel

Hello.

On 08-06-2013 10:39, David Miller wrote:

>>>>      This series of 9 patches are against Dave's 'net-next.git' repository.
>>>>      The series deals with the #ifdef'fery around SoC support code/data in
>>>>      the
>>>> 'sh_eth' driver. It doesn't yet get rid of all the #ifdef's: 3 are
>>>> left, 1 of
>>>> them still hinders ARM multiplatform build -- I'll try to deal with it
>>>> next
>>>> week.

>>>> [1/9] sh_eth: create initial ID table
>>>> [2/9] sh_eth: get SH771x support out of #ifdef
>>>> [3/9] sh_eth: get SH7619 support out of #ifdef
>>>> [4/9] sh_eth: get R8A7740 support out of #ifdef
>>>> [5/9] sh_eth: get SH77{34|63} support out of #ifdef
>>>> [6/9] sh_eth: get SH7757 support out of #ifdef
>>>> [7/9] sh_eth: get SH7724 support out of #ifdef
>>>> [8/9] sh_eth: get R8A777x support out of #ifdef
>>>> [9/9] sh_eth: remove dependencies from Kconfig

>>>     Sorry, Paul, forgot to include you into the CC list on most of the
>>>     patches
>>> and the cover letter. Please look for the patches on linux-sh and ACK
>>> them
>>> if you deem necessary.

>>     Also, forgot to CC Simon, Magnus, Russell and LAKML on some patches.
>> Too much haste, forgot to run scripts/get_maintainer.pl before sending
>> out patches...

> I'll apply this solely because it finally allows me to build test this
> driver on x86-64.

    Hold on please. It just occured to me that the series won't be 
bisectable on anything but R-Car CPUs (I checked it only on R8A7779) 
since I forgot that 'sh_eth_my_cpu_data' variable should be always 
available in any configuuration until the last patch (so the patch #1 is 
somewhat incomplete). I'll respin the series today and resend.

WBR, Sergei


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 0/9] sh_eth: make driver build on any platform
  2013-06-08 13:11       ` Sergei Shtylyov
@ 2013-06-08 13:24         ` Sergei Shtylyov
  2013-06-08 18:18         ` David Miller
  1 sibling, 0 replies; 16+ messages in thread
From: Sergei Shtylyov @ 2013-06-08 13:24 UTC (permalink / raw)
  To: David Miller
  Cc: netdev, lethal, horms, nobuhiro.iwamatsu.yj, linux-sh,
	magnus.damm, linux, linux-arm-kernel

On 08-06-2013 17:11, Sergei Shtylyov wrote:

>>>>>      This series of 9 patches are against Dave's 'net-next.git'
>>>>> repository.
>>>>>      The series deals with the #ifdef'fery around SoC support
>>>>> code/data in
>>>>>      the
>>>>> 'sh_eth' driver. It doesn't yet get rid of all the #ifdef's: 3 are
>>>>> left, 1 of
>>>>> them still hinders ARM multiplatform build -- I'll try to deal with it
>>>>> next
>>>>> week.

>>>>> [1/9] sh_eth: create initial ID table
>>>>> [2/9] sh_eth: get SH771x support out of #ifdef
>>>>> [3/9] sh_eth: get SH7619 support out of #ifdef
>>>>> [4/9] sh_eth: get R8A7740 support out of #ifdef
>>>>> [5/9] sh_eth: get SH77{34|63} support out of #ifdef
>>>>> [6/9] sh_eth: get SH7757 support out of #ifdef
>>>>> [7/9] sh_eth: get SH7724 support out of #ifdef
>>>>> [8/9] sh_eth: get R8A777x support out of #ifdef
>>>>> [9/9] sh_eth: remove dependencies from Kconfig

>>>>     Sorry, Paul, forgot to include you into the CC list on most of the
>>>>     patches
>>>> and the cover letter. Please look for the patches on linux-sh and ACK
>>>> them
>>>> if you deem necessary.

>>>     Also, forgot to CC Simon, Magnus, Russell and LAKML on some patches.
>>> Too much haste, forgot to run scripts/get_maintainer.pl before sending
>>> out patches...

>> I'll apply this solely because it finally allows me to build test this
>> driver on x86-64.

>     Hold on please. It just occured to me that the series won't be
> bisectable on anything but R-Car CPUs (I checked it only on R8A7779)
> since I forgot that 'sh_eth_my_cpu_data' variable should be always
> available in any configuuration until the last patch (so the patch #1 is
> somewhat incomplete). I'll respin the series today and resend.

    Oh, you've already applied it! Well, at least the result is 
buildable on all arches. :-)
    You're sometimes too quick though. :-)

WBR, Sergei


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 0/9] sh_eth: make driver build on any platform
  2013-06-08 13:11       ` Sergei Shtylyov
  2013-06-08 13:24         ` Sergei Shtylyov
@ 2013-06-08 18:18         ` David Miller
  1 sibling, 0 replies; 16+ messages in thread
From: David Miller @ 2013-06-08 18:18 UTC (permalink / raw)
  To: sergei.shtylyov
  Cc: netdev, lethal, horms, nobuhiro.iwamatsu.yj, linux-sh,
	magnus.damm, linux, linux-arm-kernel

From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Date: Sat, 08 Jun 2013 17:11:18 +0400

>    Hold on please. It just occured to me that the series won't be
>    bisectable on anything but R-Car CPUs (I checked it only on R8A7779)
>    since I forgot that 'sh_eth_my_cpu_data' variable should be always
>    available in any configuuration until the last patch (so the patch #1
>    is somewhat incomplete). I'll respin the series today and resend.

Too late, it's already pushed to my tree and at that point it's permanent.

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2013-06-08 18:18 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-07 23:51 [PATCH 0/9] sh_eth: make driver build on any platform Sergei Shtylyov
2013-06-07 23:54 ` [PATCH 1/9] sh_eth: create initial ID table Sergei Shtylyov
2013-06-07 23:55 ` [PATCH 2/9] sh_eth: get SH771x support out of #ifdef Sergei Shtylyov
2013-06-07 23:56 ` [PATCH 3/9] sh_eth: get SH7619 " Sergei Shtylyov
2013-06-07 23:57 ` [PATCH 4/9] sh_eth: get R8A7740 " Sergei Shtylyov
2013-06-07 23:58 ` [PATCH 5/9] sh_eth: get SH77{34|63} " Sergei Shtylyov
2013-06-07 23:59 ` [PATCH 6/9] sh_eth: get SH7757 " Sergei Shtylyov
2013-06-08  0:03 ` [PATCH 7/9] sh_eth: get SH7724 " Sergei Shtylyov
2013-06-08  0:05 ` [PATCH 8/9] sh_eth: get R8A777x " Sergei Shtylyov
2013-06-08  0:07 ` [PATCH 9/9] sh_eth: remove dependencies from Kconfig Sergei Shtylyov
2013-06-08  0:10 ` [PATCH 0/9] sh_eth: make driver build on any platform Sergei Shtylyov
2013-06-08  0:15   ` Sergei Shtylyov
2013-06-08  6:39     ` David Miller
2013-06-08 13:11       ` Sergei Shtylyov
2013-06-08 13:24         ` Sergei Shtylyov
2013-06-08 18:18         ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).