All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/3]  ARM: shmobile: lager: enable Ether
@ 2013-07-01  7:20 ` Simon Horman
  0 siblings, 0 replies; 24+ messages in thread
From: Simon Horman @ 2013-07-01  7:20 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

this short series enables the on-board ethernet
of the r8a7790 SoC for on lager board.

It has a run-time dependency on
"sh_eth: add support for r8a7790 SoC"

It has been built on top of renesas-next-20130701.

Simon Horman (3):
  ARM: shmobile: r8a7790: add Ether support
  ARM: shmobile: lager: enable Ether
  ARM: shmobile: lager: enable nfsroot in DTS

 arch/arm/boot/dts/r8a7790-lager.dts           |  2 +-
 arch/arm/mach-shmobile/board-lager.c          | 24 ++++++++++++++++++++++++
 arch/arm/mach-shmobile/clock-r8a7790.c        |  4 ++++
 arch/arm/mach-shmobile/include/mach/r8a7790.h |  3 +++
 arch/arm/mach-shmobile/setup-r8a7790.c        | 14 ++++++++++++++
 5 files changed, 46 insertions(+), 1 deletion(-)

-- 
1.8.2.1


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

* [PATCH v4 0/3]  ARM: shmobile: lager: enable Ether
@ 2013-07-01  7:20 ` Simon Horman
  0 siblings, 0 replies; 24+ messages in thread
From: Simon Horman @ 2013-07-01  7:20 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

this short series enables the on-board ethernet
of the r8a7790 SoC for on lager board.

It has a run-time dependency on
"sh_eth: add support for r8a7790 SoC"

It has been built on top of renesas-next-20130701.

Simon Horman (3):
  ARM: shmobile: r8a7790: add Ether support
  ARM: shmobile: lager: enable Ether
  ARM: shmobile: lager: enable nfsroot in DTS

 arch/arm/boot/dts/r8a7790-lager.dts           |  2 +-
 arch/arm/mach-shmobile/board-lager.c          | 24 ++++++++++++++++++++++++
 arch/arm/mach-shmobile/clock-r8a7790.c        |  4 ++++
 arch/arm/mach-shmobile/include/mach/r8a7790.h |  3 +++
 arch/arm/mach-shmobile/setup-r8a7790.c        | 14 ++++++++++++++
 5 files changed, 46 insertions(+), 1 deletion(-)

-- 
1.8.2.1

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

* [PATCH v4 1/3] ARM: shmobile: r8a7790: add Ether support
  2013-07-01  7:20 ` Simon Horman
@ 2013-07-01  7:20   ` Simon Horman
  -1 siblings, 0 replies; 24+ messages in thread
From: Simon Horman @ 2013-07-01  7:20 UTC (permalink / raw)
  To: linux-arm-kernel

Add Ether clock and platform device for R8A7779 SoC; add a function to
register this device with board-specific platform data.

Based on a similar change for the r8a7779 by Sergei Shtylyov.

Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>

---

This patch has a run-time dependency on "sh_eth: add support for r8a7790 SoC".

v3
* Use newly added "r8a7790-ether" instead of "sh-eth"

v2
* Do not add MSTP812, EtherAVB. It is not used.
* As suggested by Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
  - Move Ethernet element of MSTP enum to a separate line
  - Move declaration of r8a7790_add_ether_device() to immediately
    after that of r8a7790_add_standard_devices()
  - Add __initdata annotation to ether_resource.
---
 arch/arm/mach-shmobile/clock-r8a7790.c        |  4 ++++
 arch/arm/mach-shmobile/include/mach/r8a7790.h |  3 +++
 arch/arm/mach-shmobile/setup-r8a7790.c        | 14 ++++++++++++++
 3 files changed, 21 insertions(+)

diff --git a/arch/arm/mach-shmobile/clock-r8a7790.c b/arch/arm/mach-shmobile/clock-r8a7790.c
index 62d8162..2f52c0f 100644
--- a/arch/arm/mach-shmobile/clock-r8a7790.c
+++ b/arch/arm/mach-shmobile/clock-r8a7790.c
@@ -52,6 +52,7 @@
 #define SMSTPCR3 0xe615013c
 #define SMSTPCR5 0xe6150144
 #define SMSTPCR7 0xe615014c
+#define SMSTPCR8 0xe6150990
 
 #define MODEMR		0xE6160060
 #define SDCKCR		0xE6150074
@@ -182,6 +183,7 @@ static struct clk div6_clks[DIV6_NR] = {
 
 /* MSTP */
 enum {
+	MSTP813,
 	MSTP721, MSTP720,
 	MSTP717, MSTP716,
 	MSTP522,
@@ -192,6 +194,7 @@ enum {
 };
 
 static struct clk mstp_clks[MSTP_NR] = {
+	[MSTP813] = SH_CLK_MSTP32(&p_clk, SMSTPCR8, 13, 0), /* Ether */
 	[MSTP721] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 21, 0), /* SCIF0 */
 	[MSTP720] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 20, 0), /* SCIF1 */
 	[MSTP717] = SH_CLK_MSTP32(&zs_clk, SMSTPCR7, 17, 0), /* HSCIF0 */
@@ -260,6 +263,7 @@ static struct clk_lookup lookups[] = {
 	CLKDEV_DEV_ID("sh-sci.7", &mstp_clks[MSTP720]),
 	CLKDEV_DEV_ID("sh-sci.8", &mstp_clks[MSTP717]),
 	CLKDEV_DEV_ID("sh-sci.9", &mstp_clks[MSTP716]),
+	CLKDEV_DEV_ID("r8a7790-ether", &mstp_clks[MSTP813]),
 	CLKDEV_DEV_ID("rcar_thermal", &mstp_clks[MSTP522]),
 	CLKDEV_DEV_ID("ee200000.mmcif", &mstp_clks[MSTP315]),
 	CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP315]),
diff --git a/arch/arm/mach-shmobile/include/mach/r8a7790.h b/arch/arm/mach-shmobile/include/mach/r8a7790.h
index 7851cc1..b827b49 100644
--- a/arch/arm/mach-shmobile/include/mach/r8a7790.h
+++ b/arch/arm/mach-shmobile/include/mach/r8a7790.h
@@ -1,7 +1,10 @@
 #ifndef __ASM_R8A7790_H__
 #define __ASM_R8A7790_H__
 
+#include <linux/sh_eth.h>
+
 void r8a7790_add_standard_devices(void);
+void r8a7790_add_ether_device(struct sh_eth_plat_data *pdata);
 void r8a7790_clock_init(void);
 void r8a7790_pinmux_init(void);
 void r8a7790_init_delay(void);
diff --git a/arch/arm/mach-shmobile/setup-r8a7790.c b/arch/arm/mach-shmobile/setup-r8a7790.c
index d89cd83..fad4251 100644
--- a/arch/arm/mach-shmobile/setup-r8a7790.c
+++ b/arch/arm/mach-shmobile/setup-r8a7790.c
@@ -31,6 +31,20 @@
 #include <mach/r8a7790.h>
 #include <asm/mach/arch.h>
 
+/* Ether */
+static struct resource ether_resources[] __initdata = {
+	DEFINE_RES_MEM(0xee700000, 0x400),
+	DEFINE_RES_IRQ(gic_spi(162)), /* IRQ0 */
+};
+
+void __init r8a7790_add_ether_device(struct sh_eth_plat_data *pdata)
+{
+	platform_device_register_resndata(&platform_bus, "r8a7790-ether", -1,
+					  ether_resources,
+					  ARRAY_SIZE(ether_resources),
+					  pdata, sizeof(*pdata));
+}
+
 static struct resource pfc_resources[] __initdata = {
 	DEFINE_RES_MEM(0xe6060000, 0x250),
 };
-- 
1.8.2.1


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

* [PATCH v4 1/3] ARM: shmobile: r8a7790: add Ether support
@ 2013-07-01  7:20   ` Simon Horman
  0 siblings, 0 replies; 24+ messages in thread
From: Simon Horman @ 2013-07-01  7:20 UTC (permalink / raw)
  To: linux-arm-kernel

Add Ether clock and platform device for R8A7779 SoC; add a function to
register this device with board-specific platform data.

Based on a similar change for the r8a7779 by Sergei Shtylyov.

Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>

---

This patch has a run-time dependency on "sh_eth: add support for r8a7790 SoC".

v3
* Use newly added "r8a7790-ether" instead of "sh-eth"

v2
* Do not add MSTP812, EtherAVB. It is not used.
* As suggested by Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
  - Move Ethernet element of MSTP enum to a separate line
  - Move declaration of r8a7790_add_ether_device() to immediately
    after that of r8a7790_add_standard_devices()
  - Add __initdata annotation to ether_resource.
---
 arch/arm/mach-shmobile/clock-r8a7790.c        |  4 ++++
 arch/arm/mach-shmobile/include/mach/r8a7790.h |  3 +++
 arch/arm/mach-shmobile/setup-r8a7790.c        | 14 ++++++++++++++
 3 files changed, 21 insertions(+)

diff --git a/arch/arm/mach-shmobile/clock-r8a7790.c b/arch/arm/mach-shmobile/clock-r8a7790.c
index 62d8162..2f52c0f 100644
--- a/arch/arm/mach-shmobile/clock-r8a7790.c
+++ b/arch/arm/mach-shmobile/clock-r8a7790.c
@@ -52,6 +52,7 @@
 #define SMSTPCR3 0xe615013c
 #define SMSTPCR5 0xe6150144
 #define SMSTPCR7 0xe615014c
+#define SMSTPCR8 0xe6150990
 
 #define MODEMR		0xE6160060
 #define SDCKCR		0xE6150074
@@ -182,6 +183,7 @@ static struct clk div6_clks[DIV6_NR] = {
 
 /* MSTP */
 enum {
+	MSTP813,
 	MSTP721, MSTP720,
 	MSTP717, MSTP716,
 	MSTP522,
@@ -192,6 +194,7 @@ enum {
 };
 
 static struct clk mstp_clks[MSTP_NR] = {
+	[MSTP813] = SH_CLK_MSTP32(&p_clk, SMSTPCR8, 13, 0), /* Ether */
 	[MSTP721] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 21, 0), /* SCIF0 */
 	[MSTP720] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 20, 0), /* SCIF1 */
 	[MSTP717] = SH_CLK_MSTP32(&zs_clk, SMSTPCR7, 17, 0), /* HSCIF0 */
@@ -260,6 +263,7 @@ static struct clk_lookup lookups[] = {
 	CLKDEV_DEV_ID("sh-sci.7", &mstp_clks[MSTP720]),
 	CLKDEV_DEV_ID("sh-sci.8", &mstp_clks[MSTP717]),
 	CLKDEV_DEV_ID("sh-sci.9", &mstp_clks[MSTP716]),
+	CLKDEV_DEV_ID("r8a7790-ether", &mstp_clks[MSTP813]),
 	CLKDEV_DEV_ID("rcar_thermal", &mstp_clks[MSTP522]),
 	CLKDEV_DEV_ID("ee200000.mmcif", &mstp_clks[MSTP315]),
 	CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP315]),
diff --git a/arch/arm/mach-shmobile/include/mach/r8a7790.h b/arch/arm/mach-shmobile/include/mach/r8a7790.h
index 7851cc1..b827b49 100644
--- a/arch/arm/mach-shmobile/include/mach/r8a7790.h
+++ b/arch/arm/mach-shmobile/include/mach/r8a7790.h
@@ -1,7 +1,10 @@
 #ifndef __ASM_R8A7790_H__
 #define __ASM_R8A7790_H__
 
+#include <linux/sh_eth.h>
+
 void r8a7790_add_standard_devices(void);
+void r8a7790_add_ether_device(struct sh_eth_plat_data *pdata);
 void r8a7790_clock_init(void);
 void r8a7790_pinmux_init(void);
 void r8a7790_init_delay(void);
diff --git a/arch/arm/mach-shmobile/setup-r8a7790.c b/arch/arm/mach-shmobile/setup-r8a7790.c
index d89cd83..fad4251 100644
--- a/arch/arm/mach-shmobile/setup-r8a7790.c
+++ b/arch/arm/mach-shmobile/setup-r8a7790.c
@@ -31,6 +31,20 @@
 #include <mach/r8a7790.h>
 #include <asm/mach/arch.h>
 
+/* Ether */
+static struct resource ether_resources[] __initdata = {
+	DEFINE_RES_MEM(0xee700000, 0x400),
+	DEFINE_RES_IRQ(gic_spi(162)), /* IRQ0 */
+};
+
+void __init r8a7790_add_ether_device(struct sh_eth_plat_data *pdata)
+{
+	platform_device_register_resndata(&platform_bus, "r8a7790-ether", -1,
+					  ether_resources,
+					  ARRAY_SIZE(ether_resources),
+					  pdata, sizeof(*pdata));
+}
+
 static struct resource pfc_resources[] __initdata = {
 	DEFINE_RES_MEM(0xe6060000, 0x250),
 };
-- 
1.8.2.1

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

* [PATCH v4 2/3] ARM: shmobile: lager: enable Ether
  2013-07-01  7:20 ` Simon Horman
@ 2013-07-01  7:20   ` Simon Horman
  -1 siblings, 0 replies; 24+ messages in thread
From: Simon Horman @ 2013-07-01  7:20 UTC (permalink / raw)
  To: linux-arm-kernel

Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>

---

This patch has a build-time dependency on "sh_eth: add support for gpio reset".
This patch has a run-time dependency on "sh_eth: add support for r8a7790 SoC".

v4
* Annotate ether_platdata as __initdata

v3
* Rebase

v2
* As suggested by Laurent Pinchart
  - Do not manipilate sh_eth reset GPIO directly,
    rather, do so through newly proposed support for this in
    the sh_eth driver.
* A suggested by Sergei Shtylyov
  - Move DTS portion into a separate patch
---
 arch/arm/mach-shmobile/board-lager.c | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c
index 0b4a1f9..7d5db20 100644
--- a/arch/arm/mach-shmobile/board-lager.c
+++ b/arch/arm/mach-shmobile/board-lager.c
@@ -71,6 +71,17 @@ static __initdata struct gpio_keys_platform_data lager_keys_pdata = {
 	.nbuttons	= ARRAY_SIZE(gpio_buttons),
 };
 
+/* Ether */
+static struct sh_eth_plat_data ether_platdata __initdata = {
+	.phy			= 0x1,
+	.edmac_endian		= EDMAC_LITTLE_ENDIAN,
+	.register_type		= SH_ETH_REG_FAST_RCAR,
+	.phy_interface		= PHY_INTERFACE_MODE_RMII,
+	.ether_link_active_low	= 1,
+	.needs_gpio_reset	= 1,
+	.reset_gpio		= RCAR_GP_PIN(5, 31),
+};
+
 static const struct pinctrl_map lager_pinctrl_map[] = {
 	/* SCIF0 (CN19: DEBUG SERIAL0) */
 	PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.6", "pfc-r8a7790",
@@ -78,6 +89,17 @@ static const struct pinctrl_map lager_pinctrl_map[] = {
 	/* SCIF1 (CN20: DEBUG SERIAL1) */
 	PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.7", "pfc-r8a7790",
 				  "scif1_data", "scif1"),
+	/* Ether */
+	PIN_MAP_MUX_GROUP_DEFAULT("sh-eth", "pfc-r8a7790",
+				  "eth_link", "eth"),
+	PIN_MAP_MUX_GROUP_DEFAULT("sh-eth", "pfc-r8a7790",
+				  "eth_magic", "eth"),
+	PIN_MAP_MUX_GROUP_DEFAULT("sh-eth", "pfc-r8a7790",
+				  "eth_mdio", "eth"),
+	PIN_MAP_MUX_GROUP_DEFAULT("sh-eth", "pfc-r8a7790",
+				  "eth_rmii", "eth"),
+	PIN_MAP_MUX_GROUP_DEFAULT("sh-eth", "pfc-r8a7790",
+				  "intc_irq0", "intc"),
 };
 
 static void __init lager_add_standard_devices(void)
@@ -89,6 +111,8 @@ static void __init lager_add_standard_devices(void)
 	r8a7790_pinmux_init();
 
 	r8a7790_add_standard_devices();
+	r8a7790_add_ether_device(&ether_platdata);
+
 	platform_device_register_data(&platform_bus, "leds-gpio", -1,
 				      &lager_leds_pdata,
 				      sizeof(lager_leds_pdata));
-- 
1.8.2.1


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

* [PATCH v4 2/3] ARM: shmobile: lager: enable Ether
@ 2013-07-01  7:20   ` Simon Horman
  0 siblings, 0 replies; 24+ messages in thread
From: Simon Horman @ 2013-07-01  7:20 UTC (permalink / raw)
  To: linux-arm-kernel

Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>

---

This patch has a build-time dependency on "sh_eth: add support for gpio reset".
This patch has a run-time dependency on "sh_eth: add support for r8a7790 SoC".

v4
* Annotate ether_platdata as __initdata

v3
* Rebase

v2
* As suggested by Laurent Pinchart
  - Do not manipilate sh_eth reset GPIO directly,
    rather, do so through newly proposed support for this in
    the sh_eth driver.
* A suggested by Sergei Shtylyov
  - Move DTS portion into a separate patch
---
 arch/arm/mach-shmobile/board-lager.c | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c
index 0b4a1f9..7d5db20 100644
--- a/arch/arm/mach-shmobile/board-lager.c
+++ b/arch/arm/mach-shmobile/board-lager.c
@@ -71,6 +71,17 @@ static __initdata struct gpio_keys_platform_data lager_keys_pdata = {
 	.nbuttons	= ARRAY_SIZE(gpio_buttons),
 };
 
+/* Ether */
+static struct sh_eth_plat_data ether_platdata __initdata = {
+	.phy			= 0x1,
+	.edmac_endian		= EDMAC_LITTLE_ENDIAN,
+	.register_type		= SH_ETH_REG_FAST_RCAR,
+	.phy_interface		= PHY_INTERFACE_MODE_RMII,
+	.ether_link_active_low	= 1,
+	.needs_gpio_reset	= 1,
+	.reset_gpio		= RCAR_GP_PIN(5, 31),
+};
+
 static const struct pinctrl_map lager_pinctrl_map[] = {
 	/* SCIF0 (CN19: DEBUG SERIAL0) */
 	PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.6", "pfc-r8a7790",
@@ -78,6 +89,17 @@ static const struct pinctrl_map lager_pinctrl_map[] = {
 	/* SCIF1 (CN20: DEBUG SERIAL1) */
 	PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.7", "pfc-r8a7790",
 				  "scif1_data", "scif1"),
+	/* Ether */
+	PIN_MAP_MUX_GROUP_DEFAULT("sh-eth", "pfc-r8a7790",
+				  "eth_link", "eth"),
+	PIN_MAP_MUX_GROUP_DEFAULT("sh-eth", "pfc-r8a7790",
+				  "eth_magic", "eth"),
+	PIN_MAP_MUX_GROUP_DEFAULT("sh-eth", "pfc-r8a7790",
+				  "eth_mdio", "eth"),
+	PIN_MAP_MUX_GROUP_DEFAULT("sh-eth", "pfc-r8a7790",
+				  "eth_rmii", "eth"),
+	PIN_MAP_MUX_GROUP_DEFAULT("sh-eth", "pfc-r8a7790",
+				  "intc_irq0", "intc"),
 };
 
 static void __init lager_add_standard_devices(void)
@@ -89,6 +111,8 @@ static void __init lager_add_standard_devices(void)
 	r8a7790_pinmux_init();
 
 	r8a7790_add_standard_devices();
+	r8a7790_add_ether_device(&ether_platdata);
+
 	platform_device_register_data(&platform_bus, "leds-gpio", -1,
 				      &lager_leds_pdata,
 				      sizeof(lager_leds_pdata));
-- 
1.8.2.1

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

* [PATCH v4 3/3] ARM: shmobile: lager: enable nfsroot in DTS
  2013-07-01  7:20 ` Simon Horman
@ 2013-07-01  7:20   ` Simon Horman
  -1 siblings, 0 replies; 24+ messages in thread
From: Simon Horman @ 2013-07-01  7:20 UTC (permalink / raw)
  To: linux-arm-kernel

Now that Ether support has been added to the lager board
it is possible to use nfsroot. This configuration is
in line with that of other shmobile boards.

Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>

---

This patch has a run-time dependency on "ARM: shmobile: lager: enable Ether"

v2
* Split out as a new patch from "ARM: shmobile: lager: enable Ether"
---
 arch/arm/boot/dts/r8a7790-lager.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts
index 09a84fc..b2f61f0 100644
--- a/arch/arm/boot/dts/r8a7790-lager.dts
+++ b/arch/arm/boot/dts/r8a7790-lager.dts
@@ -16,7 +16,7 @@
 	compatible = "renesas,lager", "renesas,r8a7790";
 
 	chosen {
-		bootargs = "console=ttySC6,115200 ignore_loglevel";
+		bootargs = "console=ttySC6,115200 ignore_loglevel root=/dev/nfs ip=dhcp nfsroot=,rsize@96,wsize@96 rw";
 	};
 
 	memory@40000000 {
-- 
1.8.2.1


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

* [PATCH v4 3/3] ARM: shmobile: lager: enable nfsroot in DTS
@ 2013-07-01  7:20   ` Simon Horman
  0 siblings, 0 replies; 24+ messages in thread
From: Simon Horman @ 2013-07-01  7:20 UTC (permalink / raw)
  To: linux-arm-kernel

Now that Ether support has been added to the lager board
it is possible to use nfsroot. This configuration is
in line with that of other shmobile boards.

Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>

---

This patch has a run-time dependency on "ARM: shmobile: lager: enable Ether"

v2
* Split out as a new patch from "ARM: shmobile: lager: enable Ether"
---
 arch/arm/boot/dts/r8a7790-lager.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts
index 09a84fc..b2f61f0 100644
--- a/arch/arm/boot/dts/r8a7790-lager.dts
+++ b/arch/arm/boot/dts/r8a7790-lager.dts
@@ -16,7 +16,7 @@
 	compatible = "renesas,lager", "renesas,r8a7790";
 
 	chosen {
-		bootargs = "console=ttySC6,115200 ignore_loglevel";
+		bootargs = "console=ttySC6,115200 ignore_loglevel root=/dev/nfs ip=dhcp nfsroot=,rsize=4096,wsize=4096 rw";
 	};
 
 	memory at 40000000 {
-- 
1.8.2.1

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

* Re: [PATCH v4 2/3] ARM: shmobile: lager: enable Ether
  2013-07-01  7:20   ` Simon Horman
@ 2013-07-01 13:29     ` Laurent Pinchart
  -1 siblings, 0 replies; 24+ messages in thread
From: Laurent Pinchart @ 2013-07-01 13:29 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Simon,

On Monday 01 July 2013 16:20:33 Simon Horman wrote:
> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> 
> ---
> 
> This patch has a build-time dependency on "sh_eth: add support for gpio
> reset". This patch has a run-time dependency on "sh_eth: add support for
> r8a7790 SoC".
> 
> v4
> * Annotate ether_platdata as __initdata
> 
> v3
> * Rebase
> 
> v2
> * As suggested by Laurent Pinchart
>   - Do not manipilate sh_eth reset GPIO directly,
>     rather, do so through newly proposed support for this in
>     the sh_eth driver.
> * A suggested by Sergei Shtylyov
>   - Move DTS portion into a separate patch
> ---
>  arch/arm/mach-shmobile/board-lager.c | 24 ++++++++++++++++++++++++
>  1 file changed, 24 insertions(+)
> 
> diff --git a/arch/arm/mach-shmobile/board-lager.c
> b/arch/arm/mach-shmobile/board-lager.c index 0b4a1f9..7d5db20 100644
> --- a/arch/arm/mach-shmobile/board-lager.c
> +++ b/arch/arm/mach-shmobile/board-lager.c
> @@ -71,6 +71,17 @@ static __initdata struct gpio_keys_platform_data
> lager_keys_pdata = { .nbuttons	= ARRAY_SIZE(gpio_buttons),
>  };
> 
> +/* Ether */
> +static struct sh_eth_plat_data ether_platdata __initdata = {
> +	.phy			= 0x1,
> +	.edmac_endian		= EDMAC_LITTLE_ENDIAN,
> +	.register_type		= SH_ETH_REG_FAST_RCAR,
> +	.phy_interface		= PHY_INTERFACE_MODE_RMII,
> +	.ether_link_active_low	= 1,
> +	.needs_gpio_reset	= 1,
> +	.reset_gpio		= RCAR_GP_PIN(5, 31),
> +};
> +
>  static const struct pinctrl_map lager_pinctrl_map[] = {
>  	/* SCIF0 (CN19: DEBUG SERIAL0) */
>  	PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.6", "pfc-r8a7790",
> @@ -78,6 +89,17 @@ static const struct pinctrl_map lager_pinctrl_map[] = {
>  	/* SCIF1 (CN20: DEBUG SERIAL1) */
>  	PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.7", "pfc-r8a7790",
>  				  "scif1_data", "scif1"),
> +	/* Ether */
> +	PIN_MAP_MUX_GROUP_DEFAULT("sh-eth", "pfc-r8a7790",
> +				  "eth_link", "eth"),
> +	PIN_MAP_MUX_GROUP_DEFAULT("sh-eth", "pfc-r8a7790",
> +				  "eth_magic", "eth"),

That pin isn't used on Lager, you can drop it.

By the way, the latest R8A7790 datasheet errata renamed the eth_magic pin to 
eth_wol. What would you think about renaming it to eth_wol in 
drivers/pinctrl/sh-pfc/pfc-r8a7790.c ?

> +	PIN_MAP_MUX_GROUP_DEFAULT("sh-eth", "pfc-r8a7790",
> +				  "eth_mdio", "eth"),
> +	PIN_MAP_MUX_GROUP_DEFAULT("sh-eth", "pfc-r8a7790",
> +				  "eth_rmii", "eth"),
> +	PIN_MAP_MUX_GROUP_DEFAULT("sh-eth", "pfc-r8a7790",
> +				  "intc_irq0", "intc"),
>  };
> 
>  static void __init lager_add_standard_devices(void)
> @@ -89,6 +111,8 @@ static void __init lager_add_standard_devices(void)
>  	r8a7790_pinmux_init();
> 
>  	r8a7790_add_standard_devices();
> +	r8a7790_add_ether_device(&ether_platdata);
> +
>  	platform_device_register_data(&platform_bus, "leds-gpio", -1,
>  				      &lager_leds_pdata,
>  				      sizeof(lager_leds_pdata));
-- 
Regards,

Laurent Pinchart


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

* [PATCH v4 2/3] ARM: shmobile: lager: enable Ether
@ 2013-07-01 13:29     ` Laurent Pinchart
  0 siblings, 0 replies; 24+ messages in thread
From: Laurent Pinchart @ 2013-07-01 13:29 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Simon,

On Monday 01 July 2013 16:20:33 Simon Horman wrote:
> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> 
> ---
> 
> This patch has a build-time dependency on "sh_eth: add support for gpio
> reset". This patch has a run-time dependency on "sh_eth: add support for
> r8a7790 SoC".
> 
> v4
> * Annotate ether_platdata as __initdata
> 
> v3
> * Rebase
> 
> v2
> * As suggested by Laurent Pinchart
>   - Do not manipilate sh_eth reset GPIO directly,
>     rather, do so through newly proposed support for this in
>     the sh_eth driver.
> * A suggested by Sergei Shtylyov
>   - Move DTS portion into a separate patch
> ---
>  arch/arm/mach-shmobile/board-lager.c | 24 ++++++++++++++++++++++++
>  1 file changed, 24 insertions(+)
> 
> diff --git a/arch/arm/mach-shmobile/board-lager.c
> b/arch/arm/mach-shmobile/board-lager.c index 0b4a1f9..7d5db20 100644
> --- a/arch/arm/mach-shmobile/board-lager.c
> +++ b/arch/arm/mach-shmobile/board-lager.c
> @@ -71,6 +71,17 @@ static __initdata struct gpio_keys_platform_data
> lager_keys_pdata = { .nbuttons	= ARRAY_SIZE(gpio_buttons),
>  };
> 
> +/* Ether */
> +static struct sh_eth_plat_data ether_platdata __initdata = {
> +	.phy			= 0x1,
> +	.edmac_endian		= EDMAC_LITTLE_ENDIAN,
> +	.register_type		= SH_ETH_REG_FAST_RCAR,
> +	.phy_interface		= PHY_INTERFACE_MODE_RMII,
> +	.ether_link_active_low	= 1,
> +	.needs_gpio_reset	= 1,
> +	.reset_gpio		= RCAR_GP_PIN(5, 31),
> +};
> +
>  static const struct pinctrl_map lager_pinctrl_map[] = {
>  	/* SCIF0 (CN19: DEBUG SERIAL0) */
>  	PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.6", "pfc-r8a7790",
> @@ -78,6 +89,17 @@ static const struct pinctrl_map lager_pinctrl_map[] = {
>  	/* SCIF1 (CN20: DEBUG SERIAL1) */
>  	PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.7", "pfc-r8a7790",
>  				  "scif1_data", "scif1"),
> +	/* Ether */
> +	PIN_MAP_MUX_GROUP_DEFAULT("sh-eth", "pfc-r8a7790",
> +				  "eth_link", "eth"),
> +	PIN_MAP_MUX_GROUP_DEFAULT("sh-eth", "pfc-r8a7790",
> +				  "eth_magic", "eth"),

That pin isn't used on Lager, you can drop it.

By the way, the latest R8A7790 datasheet errata renamed the eth_magic pin to 
eth_wol. What would you think about renaming it to eth_wol in 
drivers/pinctrl/sh-pfc/pfc-r8a7790.c ?

> +	PIN_MAP_MUX_GROUP_DEFAULT("sh-eth", "pfc-r8a7790",
> +				  "eth_mdio", "eth"),
> +	PIN_MAP_MUX_GROUP_DEFAULT("sh-eth", "pfc-r8a7790",
> +				  "eth_rmii", "eth"),
> +	PIN_MAP_MUX_GROUP_DEFAULT("sh-eth", "pfc-r8a7790",
> +				  "intc_irq0", "intc"),
>  };
> 
>  static void __init lager_add_standard_devices(void)
> @@ -89,6 +111,8 @@ static void __init lager_add_standard_devices(void)
>  	r8a7790_pinmux_init();
> 
>  	r8a7790_add_standard_devices();
> +	r8a7790_add_ether_device(&ether_platdata);
> +
>  	platform_device_register_data(&platform_bus, "leds-gpio", -1,
>  				      &lager_leds_pdata,
>  				      sizeof(lager_leds_pdata));
-- 
Regards,

Laurent Pinchart

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

* Re: [PATCH v4 2/3] ARM: shmobile: lager: enable Ether
  2013-07-01 13:29     ` Laurent Pinchart
@ 2013-07-02  1:22       ` Simon Horman
  -1 siblings, 0 replies; 24+ messages in thread
From: Simon Horman @ 2013-07-02  1:22 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jul 01, 2013 at 03:29:21PM +0200, Laurent Pinchart wrote:
> Hi Simon,
> 
> On Monday 01 July 2013 16:20:33 Simon Horman wrote:
> > Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> > Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> > 
> > ---
> > 
> > This patch has a build-time dependency on "sh_eth: add support for gpio
> > reset". This patch has a run-time dependency on "sh_eth: add support for
> > r8a7790 SoC".
> > 
> > v4
> > * Annotate ether_platdata as __initdata
> > 
> > v3
> > * Rebase
> > 
> > v2
> > * As suggested by Laurent Pinchart
> >   - Do not manipilate sh_eth reset GPIO directly,
> >     rather, do so through newly proposed support for this in
> >     the sh_eth driver.
> > * A suggested by Sergei Shtylyov
> >   - Move DTS portion into a separate patch
> > ---
> >  arch/arm/mach-shmobile/board-lager.c | 24 ++++++++++++++++++++++++
> >  1 file changed, 24 insertions(+)
> > 
> > diff --git a/arch/arm/mach-shmobile/board-lager.c
> > b/arch/arm/mach-shmobile/board-lager.c index 0b4a1f9..7d5db20 100644
> > --- a/arch/arm/mach-shmobile/board-lager.c
> > +++ b/arch/arm/mach-shmobile/board-lager.c
> > @@ -71,6 +71,17 @@ static __initdata struct gpio_keys_platform_data
> > lager_keys_pdata = { .nbuttons	= ARRAY_SIZE(gpio_buttons),
> >  };
> > 
> > +/* Ether */
> > +static struct sh_eth_plat_data ether_platdata __initdata = {
> > +	.phy			= 0x1,
> > +	.edmac_endian		= EDMAC_LITTLE_ENDIAN,
> > +	.register_type		= SH_ETH_REG_FAST_RCAR,
> > +	.phy_interface		= PHY_INTERFACE_MODE_RMII,
> > +	.ether_link_active_low	= 1,
> > +	.needs_gpio_reset	= 1,
> > +	.reset_gpio		= RCAR_GP_PIN(5, 31),
> > +};
> > +
> >  static const struct pinctrl_map lager_pinctrl_map[] = {
> >  	/* SCIF0 (CN19: DEBUG SERIAL0) */
> >  	PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.6", "pfc-r8a7790",
> > @@ -78,6 +89,17 @@ static const struct pinctrl_map lager_pinctrl_map[] = {
> >  	/* SCIF1 (CN20: DEBUG SERIAL1) */
> >  	PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.7", "pfc-r8a7790",
> >  				  "scif1_data", "scif1"),
> > +	/* Ether */
> > +	PIN_MAP_MUX_GROUP_DEFAULT("sh-eth", "pfc-r8a7790",
> > +				  "eth_link", "eth"),
> > +	PIN_MAP_MUX_GROUP_DEFAULT("sh-eth", "pfc-r8a7790",
> > +				  "eth_magic", "eth"),
> 
> That pin isn't used on Lager, you can drop it.

Thanks, I will drop that.

> By the way, the latest R8A7790 datasheet errata renamed the eth_magic pin to 
> eth_wol. What would you think about renaming it to eth_wol in 
> drivers/pinctrl/sh-pfc/pfc-r8a7790.c ?

I do not have a strong opinion but changing it sounds entirely reasonable
to me.

> > +	PIN_MAP_MUX_GROUP_DEFAULT("sh-eth", "pfc-r8a7790",
> > +				  "eth_mdio", "eth"),
> > +	PIN_MAP_MUX_GROUP_DEFAULT("sh-eth", "pfc-r8a7790",
> > +				  "eth_rmii", "eth"),
> > +	PIN_MAP_MUX_GROUP_DEFAULT("sh-eth", "pfc-r8a7790",
> > +				  "intc_irq0", "intc"),
> >  };
> > 
> >  static void __init lager_add_standard_devices(void)
> > @@ -89,6 +111,8 @@ static void __init lager_add_standard_devices(void)
> >  	r8a7790_pinmux_init();
> > 
> >  	r8a7790_add_standard_devices();
> > +	r8a7790_add_ether_device(&ether_platdata);
> > +
> >  	platform_device_register_data(&platform_bus, "leds-gpio", -1,
> >  				      &lager_leds_pdata,
> >  				      sizeof(lager_leds_pdata));

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

* [PATCH v4 2/3] ARM: shmobile: lager: enable Ether
@ 2013-07-02  1:22       ` Simon Horman
  0 siblings, 0 replies; 24+ messages in thread
From: Simon Horman @ 2013-07-02  1:22 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jul 01, 2013 at 03:29:21PM +0200, Laurent Pinchart wrote:
> Hi Simon,
> 
> On Monday 01 July 2013 16:20:33 Simon Horman wrote:
> > Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> > Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> > 
> > ---
> > 
> > This patch has a build-time dependency on "sh_eth: add support for gpio
> > reset". This patch has a run-time dependency on "sh_eth: add support for
> > r8a7790 SoC".
> > 
> > v4
> > * Annotate ether_platdata as __initdata
> > 
> > v3
> > * Rebase
> > 
> > v2
> > * As suggested by Laurent Pinchart
> >   - Do not manipilate sh_eth reset GPIO directly,
> >     rather, do so through newly proposed support for this in
> >     the sh_eth driver.
> > * A suggested by Sergei Shtylyov
> >   - Move DTS portion into a separate patch
> > ---
> >  arch/arm/mach-shmobile/board-lager.c | 24 ++++++++++++++++++++++++
> >  1 file changed, 24 insertions(+)
> > 
> > diff --git a/arch/arm/mach-shmobile/board-lager.c
> > b/arch/arm/mach-shmobile/board-lager.c index 0b4a1f9..7d5db20 100644
> > --- a/arch/arm/mach-shmobile/board-lager.c
> > +++ b/arch/arm/mach-shmobile/board-lager.c
> > @@ -71,6 +71,17 @@ static __initdata struct gpio_keys_platform_data
> > lager_keys_pdata = { .nbuttons	= ARRAY_SIZE(gpio_buttons),
> >  };
> > 
> > +/* Ether */
> > +static struct sh_eth_plat_data ether_platdata __initdata = {
> > +	.phy			= 0x1,
> > +	.edmac_endian		= EDMAC_LITTLE_ENDIAN,
> > +	.register_type		= SH_ETH_REG_FAST_RCAR,
> > +	.phy_interface		= PHY_INTERFACE_MODE_RMII,
> > +	.ether_link_active_low	= 1,
> > +	.needs_gpio_reset	= 1,
> > +	.reset_gpio		= RCAR_GP_PIN(5, 31),
> > +};
> > +
> >  static const struct pinctrl_map lager_pinctrl_map[] = {
> >  	/* SCIF0 (CN19: DEBUG SERIAL0) */
> >  	PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.6", "pfc-r8a7790",
> > @@ -78,6 +89,17 @@ static const struct pinctrl_map lager_pinctrl_map[] = {
> >  	/* SCIF1 (CN20: DEBUG SERIAL1) */
> >  	PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.7", "pfc-r8a7790",
> >  				  "scif1_data", "scif1"),
> > +	/* Ether */
> > +	PIN_MAP_MUX_GROUP_DEFAULT("sh-eth", "pfc-r8a7790",
> > +				  "eth_link", "eth"),
> > +	PIN_MAP_MUX_GROUP_DEFAULT("sh-eth", "pfc-r8a7790",
> > +				  "eth_magic", "eth"),
> 
> That pin isn't used on Lager, you can drop it.

Thanks, I will drop that.

> By the way, the latest R8A7790 datasheet errata renamed the eth_magic pin to 
> eth_wol. What would you think about renaming it to eth_wol in 
> drivers/pinctrl/sh-pfc/pfc-r8a7790.c ?

I do not have a strong opinion but changing it sounds entirely reasonable
to me.

> > +	PIN_MAP_MUX_GROUP_DEFAULT("sh-eth", "pfc-r8a7790",
> > +				  "eth_mdio", "eth"),
> > +	PIN_MAP_MUX_GROUP_DEFAULT("sh-eth", "pfc-r8a7790",
> > +				  "eth_rmii", "eth"),
> > +	PIN_MAP_MUX_GROUP_DEFAULT("sh-eth", "pfc-r8a7790",
> > +				  "intc_irq0", "intc"),
> >  };
> > 
> >  static void __init lager_add_standard_devices(void)
> > @@ -89,6 +111,8 @@ static void __init lager_add_standard_devices(void)
> >  	r8a7790_pinmux_init();
> > 
> >  	r8a7790_add_standard_devices();
> > +	r8a7790_add_ether_device(&ether_platdata);
> > +
> >  	platform_device_register_data(&platform_bus, "leds-gpio", -1,
> >  				      &lager_leds_pdata,
> >  				      sizeof(lager_leds_pdata));

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

* Re: [PATCH v4 2/3] ARM: shmobile: lager: enable Ether
  2013-07-02  1:22       ` Simon Horman
@ 2013-07-03  2:30         ` Laurent Pinchart
  -1 siblings, 0 replies; 24+ messages in thread
From: Laurent Pinchart @ 2013-07-03  2:30 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Simon,

On Tuesday 02 July 2013 10:22:28 Simon Horman wrote:
> On Mon, Jul 01, 2013 at 03:29:21PM +0200, Laurent Pinchart wrote:
> > On Monday 01 July 2013 16:20:33 Simon Horman wrote:
> > > Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > > Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> > > Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> > > 
> > > ---
> > > 
> > > This patch has a build-time dependency on "sh_eth: add support for gpio
> > > reset". This patch has a run-time dependency on "sh_eth: add support for
> > > r8a7790 SoC".
> > > 
> > > v4
> > > * Annotate ether_platdata as __initdata
> > > 
> > > v3
> > > * Rebase
> > > 
> > > v2
> > > * As suggested by Laurent Pinchart
> > >   - Do not manipilate sh_eth reset GPIO directly,
> > >     rather, do so through newly proposed support for this in
> > >     the sh_eth driver.
> > > * A suggested by Sergei Shtylyov
> > >   - Move DTS portion into a separate patch
> > > 
> > > ---
> > > 
> > >  arch/arm/mach-shmobile/board-lager.c | 24 ++++++++++++++++++++++++
> > >  1 file changed, 24 insertions(+)
> > > 
> > > diff --git a/arch/arm/mach-shmobile/board-lager.c
> > > b/arch/arm/mach-shmobile/board-lager.c index 0b4a1f9..7d5db20 100644
> > > --- a/arch/arm/mach-shmobile/board-lager.c
> > > +++ b/arch/arm/mach-shmobile/board-lager.c
> > > @@ -71,6 +71,17 @@ static __initdata struct gpio_keys_platform_data
> > > lager_keys_pdata = { .nbuttons	= ARRAY_SIZE(gpio_buttons),
> > >  };
> > > 
> > > +/* Ether */
> > > +static struct sh_eth_plat_data ether_platdata __initdata = {
> > > +	.phy			= 0x1,
> > > +	.edmac_endian		= EDMAC_LITTLE_ENDIAN,
> > > +	.register_type		= SH_ETH_REG_FAST_RCAR,
> > > +	.phy_interface		= PHY_INTERFACE_MODE_RMII,
> > > +	.ether_link_active_low	= 1,
> > > +	.needs_gpio_reset	= 1,
> > > +	.reset_gpio		= RCAR_GP_PIN(5, 31),
> > > +};
> > > +
> > > 
> > >  static const struct pinctrl_map lager_pinctrl_map[] = {
> > >  	/* SCIF0 (CN19: DEBUG SERIAL0) */
> > >  	PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.6", "pfc-r8a7790",
> > > @@ -78,6 +89,17 @@ static const struct pinctrl_map lager_pinctrl_map[] > > > {
> > >  	/* SCIF1 (CN20: DEBUG SERIAL1) */
> > >  	PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.7", "pfc-r8a7790",
> > >  				  "scif1_data", "scif1"),
> > > +	/* Ether */
> > > +	PIN_MAP_MUX_GROUP_DEFAULT("sh-eth", "pfc-r8a7790",
> > > +				  "eth_link", "eth"),
> > > +	PIN_MAP_MUX_GROUP_DEFAULT("sh-eth", "pfc-r8a7790",
> > > +				  "eth_magic", "eth"),
> > 
> > That pin isn't used on Lager, you can drop it.
> 
> Thanks, I will drop that.
> 
> > By the way, the latest R8A7790 datasheet errata renamed the eth_magic pin
> > to eth_wol. What would you think about renaming it to eth_wol in
> > drivers/pinctrl/sh-pfc/pfc-r8a7790.c ?
> 
> I do not have a strong opinion but changing it sounds entirely reasonable to
> me.

The errata renamed the pin, but the latest datasheet, supposed to include the 
errata, still uses eth_magic. Let's not bother then (even though wol would be 
much more descriptive than magic).

> > > +	PIN_MAP_MUX_GROUP_DEFAULT("sh-eth", "pfc-r8a7790",
> > > +				  "eth_mdio", "eth"),
> > > +	PIN_MAP_MUX_GROUP_DEFAULT("sh-eth", "pfc-r8a7790",
> > > +				  "eth_rmii", "eth"),
> > > +	PIN_MAP_MUX_GROUP_DEFAULT("sh-eth", "pfc-r8a7790",
> > > +				  "intc_irq0", "intc"),
> > >  };
> > >  
> > >  static void __init lager_add_standard_devices(void)
> > > @@ -89,6 +111,8 @@ static void __init lager_add_standard_devices(void)
> > >  	r8a7790_pinmux_init();
> > >  	r8a7790_add_standard_devices();
> > > +	r8a7790_add_ether_device(&ether_platdata);
> > > +
> > >  	platform_device_register_data(&platform_bus, "leds-gpio", -1,
> > >  				      &lager_leds_pdata,
> > >  				      sizeof(lager_leds_pdata));

-- 
Regards,

Laurent Pinchart


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

* [PATCH v4 2/3] ARM: shmobile: lager: enable Ether
@ 2013-07-03  2:30         ` Laurent Pinchart
  0 siblings, 0 replies; 24+ messages in thread
From: Laurent Pinchart @ 2013-07-03  2:30 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Simon,

On Tuesday 02 July 2013 10:22:28 Simon Horman wrote:
> On Mon, Jul 01, 2013 at 03:29:21PM +0200, Laurent Pinchart wrote:
> > On Monday 01 July 2013 16:20:33 Simon Horman wrote:
> > > Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > > Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> > > Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> > > 
> > > ---
> > > 
> > > This patch has a build-time dependency on "sh_eth: add support for gpio
> > > reset". This patch has a run-time dependency on "sh_eth: add support for
> > > r8a7790 SoC".
> > > 
> > > v4
> > > * Annotate ether_platdata as __initdata
> > > 
> > > v3
> > > * Rebase
> > > 
> > > v2
> > > * As suggested by Laurent Pinchart
> > >   - Do not manipilate sh_eth reset GPIO directly,
> > >     rather, do so through newly proposed support for this in
> > >     the sh_eth driver.
> > > * A suggested by Sergei Shtylyov
> > >   - Move DTS portion into a separate patch
> > > 
> > > ---
> > > 
> > >  arch/arm/mach-shmobile/board-lager.c | 24 ++++++++++++++++++++++++
> > >  1 file changed, 24 insertions(+)
> > > 
> > > diff --git a/arch/arm/mach-shmobile/board-lager.c
> > > b/arch/arm/mach-shmobile/board-lager.c index 0b4a1f9..7d5db20 100644
> > > --- a/arch/arm/mach-shmobile/board-lager.c
> > > +++ b/arch/arm/mach-shmobile/board-lager.c
> > > @@ -71,6 +71,17 @@ static __initdata struct gpio_keys_platform_data
> > > lager_keys_pdata = { .nbuttons	= ARRAY_SIZE(gpio_buttons),
> > >  };
> > > 
> > > +/* Ether */
> > > +static struct sh_eth_plat_data ether_platdata __initdata = {
> > > +	.phy			= 0x1,
> > > +	.edmac_endian		= EDMAC_LITTLE_ENDIAN,
> > > +	.register_type		= SH_ETH_REG_FAST_RCAR,
> > > +	.phy_interface		= PHY_INTERFACE_MODE_RMII,
> > > +	.ether_link_active_low	= 1,
> > > +	.needs_gpio_reset	= 1,
> > > +	.reset_gpio		= RCAR_GP_PIN(5, 31),
> > > +};
> > > +
> > > 
> > >  static const struct pinctrl_map lager_pinctrl_map[] = {
> > >  	/* SCIF0 (CN19: DEBUG SERIAL0) */
> > >  	PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.6", "pfc-r8a7790",
> > > @@ -78,6 +89,17 @@ static const struct pinctrl_map lager_pinctrl_map[] =
> > > {
> > >  	/* SCIF1 (CN20: DEBUG SERIAL1) */
> > >  	PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.7", "pfc-r8a7790",
> > >  				  "scif1_data", "scif1"),
> > > +	/* Ether */
> > > +	PIN_MAP_MUX_GROUP_DEFAULT("sh-eth", "pfc-r8a7790",
> > > +				  "eth_link", "eth"),
> > > +	PIN_MAP_MUX_GROUP_DEFAULT("sh-eth", "pfc-r8a7790",
> > > +				  "eth_magic", "eth"),
> > 
> > That pin isn't used on Lager, you can drop it.
> 
> Thanks, I will drop that.
> 
> > By the way, the latest R8A7790 datasheet errata renamed the eth_magic pin
> > to eth_wol. What would you think about renaming it to eth_wol in
> > drivers/pinctrl/sh-pfc/pfc-r8a7790.c ?
> 
> I do not have a strong opinion but changing it sounds entirely reasonable to
> me.

The errata renamed the pin, but the latest datasheet, supposed to include the 
errata, still uses eth_magic. Let's not bother then (even though wol would be 
much more descriptive than magic).

> > > +	PIN_MAP_MUX_GROUP_DEFAULT("sh-eth", "pfc-r8a7790",
> > > +				  "eth_mdio", "eth"),
> > > +	PIN_MAP_MUX_GROUP_DEFAULT("sh-eth", "pfc-r8a7790",
> > > +				  "eth_rmii", "eth"),
> > > +	PIN_MAP_MUX_GROUP_DEFAULT("sh-eth", "pfc-r8a7790",
> > > +				  "intc_irq0", "intc"),
> > >  };
> > >  
> > >  static void __init lager_add_standard_devices(void)
> > > @@ -89,6 +111,8 @@ static void __init lager_add_standard_devices(void)
> > >  	r8a7790_pinmux_init();
> > >  	r8a7790_add_standard_devices();
> > > +	r8a7790_add_ether_device(&ether_platdata);
> > > +
> > >  	platform_device_register_data(&platform_bus, "leds-gpio", -1,
> > >  				      &lager_leds_pdata,
> > >  				      sizeof(lager_leds_pdata));

-- 
Regards,

Laurent Pinchart

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

* Re: [PATCH v4 0/3]  ARM: shmobile: lager: enable Ether
  2013-07-01  7:20 ` Simon Horman
@ 2013-07-16  9:42   ` Laurent Pinchart
  -1 siblings, 0 replies; 24+ messages in thread
From: Laurent Pinchart @ 2013-07-16  9:42 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Simon,

On Monday 01 July 2013 16:20:31 Simon Horman wrote:
> Hi,
> 
> this short series enables the on-board ethernet
> of the r8a7790 SoC for on lager board.
> 
> It has a run-time dependency on
> "sh_eth: add support for r8a7790 SoC"
> 
> It has been built on top of renesas-next-20130701.

Do you plan to respin this series on top of your latest devel branch ? I've 
quickly rebased it and now get receive FIFO overflows when booting over NFS, 
followed by the kernel disabling the sh-eth IRQ.

> Simon Horman (3):
>   ARM: shmobile: r8a7790: add Ether support
>   ARM: shmobile: lager: enable Ether
>   ARM: shmobile: lager: enable nfsroot in DTS
> 
>  arch/arm/boot/dts/r8a7790-lager.dts           |  2 +-
>  arch/arm/mach-shmobile/board-lager.c          | 24 ++++++++++++++++++++++++
> arch/arm/mach-shmobile/clock-r8a7790.c        |  4 ++++
>  arch/arm/mach-shmobile/include/mach/r8a7790.h |  3 +++
>  arch/arm/mach-shmobile/setup-r8a7790.c        | 14 ++++++++++++++
>  5 files changed, 46 insertions(+), 1 deletion(-)

-- 
Regards,

Laurent Pinchart


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

* [PATCH v4 0/3]  ARM: shmobile: lager: enable Ether
@ 2013-07-16  9:42   ` Laurent Pinchart
  0 siblings, 0 replies; 24+ messages in thread
From: Laurent Pinchart @ 2013-07-16  9:42 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Simon,

On Monday 01 July 2013 16:20:31 Simon Horman wrote:
> Hi,
> 
> this short series enables the on-board ethernet
> of the r8a7790 SoC for on lager board.
> 
> It has a run-time dependency on
> "sh_eth: add support for r8a7790 SoC"
> 
> It has been built on top of renesas-next-20130701.

Do you plan to respin this series on top of your latest devel branch ? I've 
quickly rebased it and now get receive FIFO overflows when booting over NFS, 
followed by the kernel disabling the sh-eth IRQ.

> Simon Horman (3):
>   ARM: shmobile: r8a7790: add Ether support
>   ARM: shmobile: lager: enable Ether
>   ARM: shmobile: lager: enable nfsroot in DTS
> 
>  arch/arm/boot/dts/r8a7790-lager.dts           |  2 +-
>  arch/arm/mach-shmobile/board-lager.c          | 24 ++++++++++++++++++++++++
> arch/arm/mach-shmobile/clock-r8a7790.c        |  4 ++++
>  arch/arm/mach-shmobile/include/mach/r8a7790.h |  3 +++
>  arch/arm/mach-shmobile/setup-r8a7790.c        | 14 ++++++++++++++
>  5 files changed, 46 insertions(+), 1 deletion(-)

-- 
Regards,

Laurent Pinchart

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

* Re: [PATCH v4 0/3]  ARM: shmobile: lager: enable Ether
  2013-07-16  9:42   ` Laurent Pinchart
@ 2013-07-16 12:28     ` Sergei Shtylyov
  -1 siblings, 0 replies; 24+ messages in thread
From: Sergei Shtylyov @ 2013-07-16 12:28 UTC (permalink / raw)
  To: linux-arm-kernel

Hello.

On 16-07-2013 13:42, Laurent Pinchart wrote:

>> this short series enables the on-board ethernet
>> of the r8a7790 SoC for on lager board.

>> It has a run-time dependency on
>> "sh_eth: add support for r8a7790 SoC"

>> It has been built on top of renesas-next-20130701.

> Do you plan to respin this series on top of your latest devel branch ? I've
> quickly rebased it and now get receive FIFO overflows when booting over NFS,
> followed by the kernel disabling the sh-eth IRQ.

    That disabling of IRQ should have been fixed in 3.10.

WBR, Sergei


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

* [PATCH v4 0/3]  ARM: shmobile: lager: enable Ether
@ 2013-07-16 12:28     ` Sergei Shtylyov
  0 siblings, 0 replies; 24+ messages in thread
From: Sergei Shtylyov @ 2013-07-16 12:28 UTC (permalink / raw)
  To: linux-arm-kernel

Hello.

On 16-07-2013 13:42, Laurent Pinchart wrote:

>> this short series enables the on-board ethernet
>> of the r8a7790 SoC for on lager board.

>> It has a run-time dependency on
>> "sh_eth: add support for r8a7790 SoC"

>> It has been built on top of renesas-next-20130701.

> Do you plan to respin this series on top of your latest devel branch ? I've
> quickly rebased it and now get receive FIFO overflows when booting over NFS,
> followed by the kernel disabling the sh-eth IRQ.

    That disabling of IRQ should have been fixed in 3.10.

WBR, Sergei

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

* Re: [PATCH v4 0/3]  ARM: shmobile: lager: enable Ether
  2013-07-16  9:42   ` Laurent Pinchart
@ 2013-07-16 23:49     ` Simon Horman
  -1 siblings, 0 replies; 24+ messages in thread
From: Simon Horman @ 2013-07-16 23:49 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jul 16, 2013 at 11:42:12AM +0200, Laurent Pinchart wrote:
> Hi Simon,
> 
> On Monday 01 July 2013 16:20:31 Simon Horman wrote:
> > Hi,
> > 
> > this short series enables the on-board ethernet
> > of the r8a7790 SoC for on lager board.
> > 
> > It has a run-time dependency on
> > "sh_eth: add support for r8a7790 SoC"
> > 
> > It has been built on top of renesas-next-20130701.
> 
> Do you plan to respin this series on top of your latest devel branch ? I've 
> quickly rebased it and now get receive FIFO overflows when booting over NFS, 
> followed by the kernel disabling the sh-eth IRQ.

I am planning to respin it and the driver changes once
net-next re-opens. Which I am expecting to be next week.

> > Simon Horman (3):
> >   ARM: shmobile: r8a7790: add Ether support
> >   ARM: shmobile: lager: enable Ether
> >   ARM: shmobile: lager: enable nfsroot in DTS
> > 
> >  arch/arm/boot/dts/r8a7790-lager.dts           |  2 +-
> >  arch/arm/mach-shmobile/board-lager.c          | 24 ++++++++++++++++++++++++
> > arch/arm/mach-shmobile/clock-r8a7790.c        |  4 ++++
> >  arch/arm/mach-shmobile/include/mach/r8a7790.h |  3 +++
> >  arch/arm/mach-shmobile/setup-r8a7790.c        | 14 ++++++++++++++
> >  5 files changed, 46 insertions(+), 1 deletion(-)
> 
> -- 
> Regards,
> 
> Laurent Pinchart
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

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

* [PATCH v4 0/3]  ARM: shmobile: lager: enable Ether
@ 2013-07-16 23:49     ` Simon Horman
  0 siblings, 0 replies; 24+ messages in thread
From: Simon Horman @ 2013-07-16 23:49 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jul 16, 2013 at 11:42:12AM +0200, Laurent Pinchart wrote:
> Hi Simon,
> 
> On Monday 01 July 2013 16:20:31 Simon Horman wrote:
> > Hi,
> > 
> > this short series enables the on-board ethernet
> > of the r8a7790 SoC for on lager board.
> > 
> > It has a run-time dependency on
> > "sh_eth: add support for r8a7790 SoC"
> > 
> > It has been built on top of renesas-next-20130701.
> 
> Do you plan to respin this series on top of your latest devel branch ? I've 
> quickly rebased it and now get receive FIFO overflows when booting over NFS, 
> followed by the kernel disabling the sh-eth IRQ.

I am planning to respin it and the driver changes once
net-next re-opens. Which I am expecting to be next week.

> > Simon Horman (3):
> >   ARM: shmobile: r8a7790: add Ether support
> >   ARM: shmobile: lager: enable Ether
> >   ARM: shmobile: lager: enable nfsroot in DTS
> > 
> >  arch/arm/boot/dts/r8a7790-lager.dts           |  2 +-
> >  arch/arm/mach-shmobile/board-lager.c          | 24 ++++++++++++++++++++++++
> > arch/arm/mach-shmobile/clock-r8a7790.c        |  4 ++++
> >  arch/arm/mach-shmobile/include/mach/r8a7790.h |  3 +++
> >  arch/arm/mach-shmobile/setup-r8a7790.c        | 14 ++++++++++++++
> >  5 files changed, 46 insertions(+), 1 deletion(-)
> 
> -- 
> Regards,
> 
> Laurent Pinchart
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

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

* Re: [PATCH v4 1/3] ARM: shmobile: r8a7790: add Ether support
  2013-07-01  7:20   ` Simon Horman
@ 2013-07-17  9:11     ` Mark Rutland
  -1 siblings, 0 replies; 24+ messages in thread
From: Mark Rutland @ 2013-07-17  9:11 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jul 01, 2013 at 08:20:32AM +0100, Simon Horman wrote:
> Add Ether clock and platform device for R8A7779 SoC; add a function to
> register this device with board-specific platform data.
> 
> Based on a similar change for the r8a7779 by Sergei Shtylyov.
> 
> Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> 
> ---
> 
> This patch has a run-time dependency on "sh_eth: add support for r8a7790 SoC".
> 
> v3
> * Use newly added "r8a7790-ether" instead of "sh-eth"
> 
> v2
> * Do not add MSTP812, EtherAVB. It is not used.
> * As suggested by Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>   - Move Ethernet element of MSTP enum to a separate line
>   - Move declaration of r8a7790_add_ether_device() to immediately
>     after that of r8a7790_add_standard_devices()
>   - Add __initdata annotation to ether_resource.
> ---
>  arch/arm/mach-shmobile/clock-r8a7790.c        |  4 ++++
>  arch/arm/mach-shmobile/include/mach/r8a7790.h |  3 +++
>  arch/arm/mach-shmobile/setup-r8a7790.c        | 14 ++++++++++++++
>  3 files changed, 21 insertions(+)
> 
> diff --git a/arch/arm/mach-shmobile/clock-r8a7790.c b/arch/arm/mach-shmobile/clock-r8a7790.c
> index 62d8162..2f52c0f 100644
> --- a/arch/arm/mach-shmobile/clock-r8a7790.c
> +++ b/arch/arm/mach-shmobile/clock-r8a7790.c
> @@ -52,6 +52,7 @@
>  #define SMSTPCR3 0xe615013c
>  #define SMSTPCR5 0xe6150144
>  #define SMSTPCR7 0xe615014c
> +#define SMSTPCR8 0xe6150990
>  
>  #define MODEMR		0xE6160060
>  #define SDCKCR		0xE6150074
> @@ -182,6 +183,7 @@ static struct clk div6_clks[DIV6_NR] = {
>  
>  /* MSTP */
>  enum {
> +	MSTP813,
>  	MSTP721, MSTP720,
>  	MSTP717, MSTP716,
>  	MSTP522,
> @@ -192,6 +194,7 @@ enum {
>  };
>  
>  static struct clk mstp_clks[MSTP_NR] = {
> +	[MSTP813] = SH_CLK_MSTP32(&p_clk, SMSTPCR8, 13, 0), /* Ether */
>  	[MSTP721] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 21, 0), /* SCIF0 */
>  	[MSTP720] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 20, 0), /* SCIF1 */
>  	[MSTP717] = SH_CLK_MSTP32(&zs_clk, SMSTPCR7, 17, 0), /* HSCIF0 */
> @@ -260,6 +263,7 @@ static struct clk_lookup lookups[] = {
>  	CLKDEV_DEV_ID("sh-sci.7", &mstp_clks[MSTP720]),
>  	CLKDEV_DEV_ID("sh-sci.8", &mstp_clks[MSTP717]),
>  	CLKDEV_DEV_ID("sh-sci.9", &mstp_clks[MSTP716]),
> +	CLKDEV_DEV_ID("r8a7790-ether", &mstp_clks[MSTP813]),
>  	CLKDEV_DEV_ID("rcar_thermal", &mstp_clks[MSTP522]),
>  	CLKDEV_DEV_ID("ee200000.mmcif", &mstp_clks[MSTP315]),
>  	CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP315]),
> diff --git a/arch/arm/mach-shmobile/include/mach/r8a7790.h b/arch/arm/mach-shmobile/include/mach/r8a7790.h
> index 7851cc1..b827b49 100644
> --- a/arch/arm/mach-shmobile/include/mach/r8a7790.h
> +++ b/arch/arm/mach-shmobile/include/mach/r8a7790.h
> @@ -1,7 +1,10 @@
>  #ifndef __ASM_R8A7790_H__
>  #define __ASM_R8A7790_H__
>  
> +#include <linux/sh_eth.h>
> +
>  void r8a7790_add_standard_devices(void);
> +void r8a7790_add_ether_device(struct sh_eth_plat_data *pdata);
>  void r8a7790_clock_init(void);
>  void r8a7790_pinmux_init(void);
>  void r8a7790_init_delay(void);
> diff --git a/arch/arm/mach-shmobile/setup-r8a7790.c b/arch/arm/mach-shmobile/setup-r8a7790.c
> index d89cd83..fad4251 100644
> --- a/arch/arm/mach-shmobile/setup-r8a7790.c
> +++ b/arch/arm/mach-shmobile/setup-r8a7790.c
> @@ -31,6 +31,20 @@
>  #include <mach/r8a7790.h>
>  #include <asm/mach/arch.h>
>  
> +/* Ether */
> +static struct resource ether_resources[] __initdata = {
> +	DEFINE_RES_MEM(0xee700000, 0x400),
> +	DEFINE_RES_IRQ(gic_spi(162)), /* IRQ0 */
> +};
> +
> +void __init r8a7790_add_ether_device(struct sh_eth_plat_data *pdata)
> +{
> +	platform_device_register_resndata(&platform_bus, "r8a7790-ether", -1,
> +					  ether_resources,
> +					  ARRAY_SIZE(ether_resources),
> +					  pdata, sizeof(*pdata));
> +}

Why are we hardcoding the address and interrupt of a device rather than
describing it in the devicetree? This is the most trivial case to
describe.

Thanks,
Mark.

> +
>  static struct resource pfc_resources[] __initdata = {
>  	DEFINE_RES_MEM(0xe6060000, 0x250),
>  };
> -- 
> 1.8.2.1
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 

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

* [PATCH v4 1/3] ARM: shmobile: r8a7790: add Ether support
@ 2013-07-17  9:11     ` Mark Rutland
  0 siblings, 0 replies; 24+ messages in thread
From: Mark Rutland @ 2013-07-17  9:11 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jul 01, 2013 at 08:20:32AM +0100, Simon Horman wrote:
> Add Ether clock and platform device for R8A7779 SoC; add a function to
> register this device with board-specific platform data.
> 
> Based on a similar change for the r8a7779 by Sergei Shtylyov.
> 
> Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> 
> ---
> 
> This patch has a run-time dependency on "sh_eth: add support for r8a7790 SoC".
> 
> v3
> * Use newly added "r8a7790-ether" instead of "sh-eth"
> 
> v2
> * Do not add MSTP812, EtherAVB. It is not used.
> * As suggested by Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>   - Move Ethernet element of MSTP enum to a separate line
>   - Move declaration of r8a7790_add_ether_device() to immediately
>     after that of r8a7790_add_standard_devices()
>   - Add __initdata annotation to ether_resource.
> ---
>  arch/arm/mach-shmobile/clock-r8a7790.c        |  4 ++++
>  arch/arm/mach-shmobile/include/mach/r8a7790.h |  3 +++
>  arch/arm/mach-shmobile/setup-r8a7790.c        | 14 ++++++++++++++
>  3 files changed, 21 insertions(+)
> 
> diff --git a/arch/arm/mach-shmobile/clock-r8a7790.c b/arch/arm/mach-shmobile/clock-r8a7790.c
> index 62d8162..2f52c0f 100644
> --- a/arch/arm/mach-shmobile/clock-r8a7790.c
> +++ b/arch/arm/mach-shmobile/clock-r8a7790.c
> @@ -52,6 +52,7 @@
>  #define SMSTPCR3 0xe615013c
>  #define SMSTPCR5 0xe6150144
>  #define SMSTPCR7 0xe615014c
> +#define SMSTPCR8 0xe6150990
>  
>  #define MODEMR		0xE6160060
>  #define SDCKCR		0xE6150074
> @@ -182,6 +183,7 @@ static struct clk div6_clks[DIV6_NR] = {
>  
>  /* MSTP */
>  enum {
> +	MSTP813,
>  	MSTP721, MSTP720,
>  	MSTP717, MSTP716,
>  	MSTP522,
> @@ -192,6 +194,7 @@ enum {
>  };
>  
>  static struct clk mstp_clks[MSTP_NR] = {
> +	[MSTP813] = SH_CLK_MSTP32(&p_clk, SMSTPCR8, 13, 0), /* Ether */
>  	[MSTP721] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 21, 0), /* SCIF0 */
>  	[MSTP720] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 20, 0), /* SCIF1 */
>  	[MSTP717] = SH_CLK_MSTP32(&zs_clk, SMSTPCR7, 17, 0), /* HSCIF0 */
> @@ -260,6 +263,7 @@ static struct clk_lookup lookups[] = {
>  	CLKDEV_DEV_ID("sh-sci.7", &mstp_clks[MSTP720]),
>  	CLKDEV_DEV_ID("sh-sci.8", &mstp_clks[MSTP717]),
>  	CLKDEV_DEV_ID("sh-sci.9", &mstp_clks[MSTP716]),
> +	CLKDEV_DEV_ID("r8a7790-ether", &mstp_clks[MSTP813]),
>  	CLKDEV_DEV_ID("rcar_thermal", &mstp_clks[MSTP522]),
>  	CLKDEV_DEV_ID("ee200000.mmcif", &mstp_clks[MSTP315]),
>  	CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP315]),
> diff --git a/arch/arm/mach-shmobile/include/mach/r8a7790.h b/arch/arm/mach-shmobile/include/mach/r8a7790.h
> index 7851cc1..b827b49 100644
> --- a/arch/arm/mach-shmobile/include/mach/r8a7790.h
> +++ b/arch/arm/mach-shmobile/include/mach/r8a7790.h
> @@ -1,7 +1,10 @@
>  #ifndef __ASM_R8A7790_H__
>  #define __ASM_R8A7790_H__
>  
> +#include <linux/sh_eth.h>
> +
>  void r8a7790_add_standard_devices(void);
> +void r8a7790_add_ether_device(struct sh_eth_plat_data *pdata);
>  void r8a7790_clock_init(void);
>  void r8a7790_pinmux_init(void);
>  void r8a7790_init_delay(void);
> diff --git a/arch/arm/mach-shmobile/setup-r8a7790.c b/arch/arm/mach-shmobile/setup-r8a7790.c
> index d89cd83..fad4251 100644
> --- a/arch/arm/mach-shmobile/setup-r8a7790.c
> +++ b/arch/arm/mach-shmobile/setup-r8a7790.c
> @@ -31,6 +31,20 @@
>  #include <mach/r8a7790.h>
>  #include <asm/mach/arch.h>
>  
> +/* Ether */
> +static struct resource ether_resources[] __initdata = {
> +	DEFINE_RES_MEM(0xee700000, 0x400),
> +	DEFINE_RES_IRQ(gic_spi(162)), /* IRQ0 */
> +};
> +
> +void __init r8a7790_add_ether_device(struct sh_eth_plat_data *pdata)
> +{
> +	platform_device_register_resndata(&platform_bus, "r8a7790-ether", -1,
> +					  ether_resources,
> +					  ARRAY_SIZE(ether_resources),
> +					  pdata, sizeof(*pdata));
> +}

Why are we hardcoding the address and interrupt of a device rather than
describing it in the devicetree? This is the most trivial case to
describe.

Thanks,
Mark.

> +
>  static struct resource pfc_resources[] __initdata = {
>  	DEFINE_RES_MEM(0xe6060000, 0x250),
>  };
> -- 
> 1.8.2.1
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 

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

* Re: [PATCH v4 1/3] ARM: shmobile: r8a7790: add Ether support
  2013-07-17  9:11     ` Mark Rutland
@ 2013-07-17 23:01       ` Simon Horman
  -1 siblings, 0 replies; 24+ messages in thread
From: Simon Horman @ 2013-07-17 23:01 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jul 17, 2013 at 10:11:03AM +0100, Mark Rutland wrote:

[snip]

> Why are we hardcoding the address and interrupt of a device rather than
> describing it in the devicetree? This is the most trivial case to
> describe.

The approach that shmobile is taking is to either initialise a device
entirely using C (non-DT) or entirely using DT. And moreover to either
initialise a board using C or DT (though in the latter case some devices
still end up being initialised in C to provide a minimally working system).

At this time for more recent boards we typically provide both a C and DT
versions to initialise a board. The C version typically is able to
initialise a fuller set of hardware while the DT version catches up.

In this case the device is being initialised in C. And this code is
intended ti be used when a board and thus its SoC is initialised using C.

Once the SH ethernet driver and all its pre-requisite drivers and
infrastructure can be initialised using DT then that will be used when
initialising the board using DT.

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

* [PATCH v4 1/3] ARM: shmobile: r8a7790: add Ether support
@ 2013-07-17 23:01       ` Simon Horman
  0 siblings, 0 replies; 24+ messages in thread
From: Simon Horman @ 2013-07-17 23:01 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jul 17, 2013 at 10:11:03AM +0100, Mark Rutland wrote:

[snip]

> Why are we hardcoding the address and interrupt of a device rather than
> describing it in the devicetree? This is the most trivial case to
> describe.

The approach that shmobile is taking is to either initialise a device
entirely using C (non-DT) or entirely using DT. And moreover to either
initialise a board using C or DT (though in the latter case some devices
still end up being initialised in C to provide a minimally working system).

At this time for more recent boards we typically provide both a C and DT
versions to initialise a board. The C version typically is able to
initialise a fuller set of hardware while the DT version catches up.

In this case the device is being initialised in C. And this code is
intended ti be used when a board and thus its SoC is initialised using C.

Once the SH ethernet driver and all its pre-requisite drivers and
infrastructure can be initialised using DT then that will be used when
initialising the board using DT.

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

end of thread, other threads:[~2013-07-17 23:01 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-01  7:20 [PATCH v4 0/3] ARM: shmobile: lager: enable Ether Simon Horman
2013-07-01  7:20 ` Simon Horman
2013-07-01  7:20 ` [PATCH v4 1/3] ARM: shmobile: r8a7790: add Ether support Simon Horman
2013-07-01  7:20   ` Simon Horman
2013-07-17  9:11   ` Mark Rutland
2013-07-17  9:11     ` Mark Rutland
2013-07-17 23:01     ` Simon Horman
2013-07-17 23:01       ` Simon Horman
2013-07-01  7:20 ` [PATCH v4 2/3] ARM: shmobile: lager: enable Ether Simon Horman
2013-07-01  7:20   ` Simon Horman
2013-07-01 13:29   ` Laurent Pinchart
2013-07-01 13:29     ` Laurent Pinchart
2013-07-02  1:22     ` Simon Horman
2013-07-02  1:22       ` Simon Horman
2013-07-03  2:30       ` Laurent Pinchart
2013-07-03  2:30         ` Laurent Pinchart
2013-07-01  7:20 ` [PATCH v4 3/3] ARM: shmobile: lager: enable nfsroot in DTS Simon Horman
2013-07-01  7:20   ` Simon Horman
2013-07-16  9:42 ` [PATCH v4 0/3] ARM: shmobile: lager: enable Ether Laurent Pinchart
2013-07-16  9:42   ` Laurent Pinchart
2013-07-16 12:28   ` Sergei Shtylyov
2013-07-16 12:28     ` Sergei Shtylyov
2013-07-16 23:49   ` Simon Horman
2013-07-16 23:49     ` Simon Horman

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.