[PATCH 0/1] Add Ether's PHY IRQ support for R8A7791/Koelsch board

STALE4576d

8 messages, 3 authors, 2014-01-20 · open the first message on its own page

[PATCH 0/1] Add Ether's PHY IRQ support for R8A7791/Koelsch board

From: Sergei Shtylyov <hidden>
Date: 2013-12-19 23:26:38

Hello.

   Here's the patch against Simon Horman's 'renesas.git' repo,
'renesas-devel-v3.13-rc4-20131219' tag. Here we add support for the Ether's PHY
IRQ to the R8A7791/Koelsch board. The patchset depends on the two 'sh_eth' driver
patches posted earlier in order to compile and work.

[1/1] ARM: shmobile: Koelsch: pass Ether PHY IRQ

WBR, Sergei

[PATCH 1/1] ARM: shmobile: Koelsch: pass Ether PHY IRQ

From: Sergei Shtylyov <hidden>
Date: 2013-12-19 23:28:00

Pass Ether's PHY IRQ (which is IRQC's IRQ0) to the 'sh_eth' driver. Set the IRQ
trigger type to be low-level as per the Micrel PHY driver's setup.

Signed-off-by: Sergei Shtylyov <redacted>

---
 arch/arm/mach-shmobile/board-koelsch.c |    4 ++++
 1 file changed, 4 insertions(+)

Index: renesas/arch/arm/mach-shmobile/board-koelsch.c
===================================================================
--- renesas.orig/arch/arm/mach-shmobile/board-koelsch.c
+++ renesas/arch/arm/mach-shmobile/board-koelsch.c
@@ -23,6 +23,7 @@
 #include <linux/gpio.h>
 #include <linux/gpio_keys.h>
 #include <linux/input.h>
+#include <linux/irq.h>
 #include <linux/kernel.h>
 #include <linux/leds.h>
 #include <linux/phy.h>
@@ -92,6 +93,7 @@ static void __init koelsch_add_du_device
 /* Ether */
 static const struct sh_eth_plat_data ether_pdata __initconst = {
 	.phy			= 0x1,
+	.phy_irq		= irq_pin(0),
 	.edmac_endian		= EDMAC_LITTLE_ENDIAN,
 	.phy_interface		= PHY_INTERFACE_MODE_RMII,
 	.ether_link_active_low	= 1,
@@ -215,6 +217,8 @@ static void __init koelsch_init(void)
 {
 	koelsch_add_standard_devices();
 
+	irq_set_irq_type(irq_pin(0), IRQ_TYPE_LEVEL_LOW);
+
 	if (IS_ENABLED(CONFIG_PHYLIB))
 		phy_register_fixup_for_id("r8a7791-ether-ff:01",
 					  koelsch_ksz8041_fixup);

[PATCH 1/1] ARM: shmobile: Koelsch: pass Ether PHY IRQ

From: horms@verge.net.au (Simon Horman)
Date: 2013-12-27 02:12:27

On Fri, Dec 20, 2013 at 02:28:00AM +0300, Sergei Shtylyov wrote:
Pass Ether's PHY IRQ (which is IRQC's IRQ0) to the 'sh_eth' driver. Set the IRQ
trigger type to be low-level as per the Micrel PHY driver's setup.

Signed-off-by: Sergei Shtylyov <redacted>
Hi Sergei,

does this depend on changes that have been queued up in net or net-next
since v3.13-rc1? If so are they present in v3.13-rc5? If not please
repost when an rc release with the required dependencies is available.
quoted hunk
---
 arch/arm/mach-shmobile/board-koelsch.c |    4 ++++
 1 file changed, 4 insertions(+)

Index: renesas/arch/arm/mach-shmobile/board-koelsch.c
===================================================================
--- renesas.orig/arch/arm/mach-shmobile/board-koelsch.c
+++ renesas/arch/arm/mach-shmobile/board-koelsch.c
@@ -23,6 +23,7 @@
 #include <linux/gpio.h>
 #include <linux/gpio_keys.h>
 #include <linux/input.h>
+#include <linux/irq.h>
 #include <linux/kernel.h>
 #include <linux/leds.h>
 #include <linux/phy.h>
@@ -92,6 +93,7 @@ static void __init koelsch_add_du_device
 /* Ether */
 static const struct sh_eth_plat_data ether_pdata __initconst = {
 	.phy			= 0x1,
+	.phy_irq		= irq_pin(0),
 	.edmac_endian		= EDMAC_LITTLE_ENDIAN,
 	.phy_interface		= PHY_INTERFACE_MODE_RMII,
 	.ether_link_active_low	= 1,
@@ -215,6 +217,8 @@ static void __init koelsch_init(void)
 {
 	koelsch_add_standard_devices();
 
+	irq_set_irq_type(irq_pin(0), IRQ_TYPE_LEVEL_LOW);
+
 	if (IS_ENABLED(CONFIG_PHYLIB))
 		phy_register_fixup_for_id("r8a7791-ether-ff:01",
 					  koelsch_ksz8041_fixup);
--
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

[PATCH 1/1] ARM: shmobile: Koelsch: pass Ether PHY IRQ

From: Sergei Shtylyov <hidden>
Date: 2013-12-27 11:38:10

Hello.

On 27-12-2013 6:12, Simon Horman wrote:
quoted
Pass Ether's PHY IRQ (which is IRQC's IRQ0) to the 'sh_eth' driver. Set the IRQ
trigger type to be low-level as per the Micrel PHY driver's setup.
quoted
Signed-off-by: Sergei Shtylyov <redacted>
Hi Sergei,
does this depend on changes that have been queued up in net or net-next
since v3.13-rc1?
    Yes, in net-next.
If so are they present in v3.13-rc5?
    No, they should be available in 3.14-rc1.
If not please
repost when an rc release with the required dependencies is available.
    You mean this patch should inevitably wait for 3.15? I hoped either you or 
DaveM could still queue this patch for 3.14...

WBR, Sergei

[PATCH 1/1] ARM: shmobile: Koelsch: pass Ether PHY IRQ

From: horms@verge.net.au (Simon Horman)
Date: 2014-01-06 05:39:15

On Fri, Dec 27, 2013 at 03:38:10PM +0400, Sergei Shtylyov wrote:
Hello.

On 27-12-2013 6:12, Simon Horman wrote:
quoted
quoted
Pass Ether's PHY IRQ (which is IRQC's IRQ0) to the 'sh_eth' driver. Set the IRQ
trigger type to be low-level as per the Micrel PHY driver's setup.
quoted
quoted
Signed-off-by: Sergei Shtylyov <redacted>
quoted
Hi Sergei,
quoted
does this depend on changes that have been queued up in net or net-next
since v3.13-rc1?
   Yes, in net-next.
quoted
If so are they present in v3.13-rc5?
   No, they should be available in 3.14-rc1.
quoted
If not please
repost when an rc release with the required dependencies is available.
   You mean this patch should inevitably wait for 3.15? I hoped
either you or DaveM could still queue this patch for 3.14...
Sorry, it was too late for v3.14 and I would prefer if you didn't route
this via Dave's tree.

[PATCH 1/1] ARM: shmobile: Koelsch: pass Ether PHY IRQ

From: Sergei Shtylyov <hidden>
Date: 2014-01-06 12:47:58

Hello.

On 06-01-2014 9:39, Simon Horman wrote:
quoted
quoted
quoted
Pass Ether's PHY IRQ (which is IRQC's IRQ0) to the 'sh_eth' driver. Set the IRQ
trigger type to be low-level as per the Micrel PHY driver's setup.
quoted
quoted
quoted
Signed-off-by: Sergei Shtylyov <redacted>
quoted
quoted
Hi Sergei,
quoted
quoted
does this depend on changes that have been queued up in net or net-next
since v3.13-rc1?
quoted
    Yes, in net-next.
quoted
quoted
If so are they present in v3.13-rc5?
quoted
    No, they should be available in 3.14-rc1.
quoted
quoted
If not please
repost when an rc release with the required dependencies is available.
quoted
    You mean this patch should inevitably wait for 3.15? I hoped
either you or DaveM could still queue this patch for 3.14...
Sorry, it was too late for v3.14 and I would prefer if you didn't route
this via Dave's tree.
    I somehow thought you were asking about the Lager patch. No, I wasn't 
going to route the Koelsch patch via Dave, only Lager. Dave doesn't seem eager 
to do it anyway.

WBR, Sergei

[PATCH 1/1] ARM: shmobile: Koelsch: pass Ether PHY IRQ

From: magnus.damm@gmail.com (Magnus Damm)
Date: 2014-01-17 06:02:20

On Fri, Dec 20, 2013 at 8:28 AM, Sergei Shtylyov
[off-list ref] wrote:
Pass Ether's PHY IRQ (which is IRQC's IRQ0) to the 'sh_eth' driver. Set the IRQ
trigger type to be low-level as per the Micrel PHY driver's setup.

Signed-off-by: Sergei Shtylyov <redacted>

---
 arch/arm/mach-shmobile/board-koelsch.c |    4 ++++
 1 file changed, 4 insertions(+)
Thanks for this. The code looks good to me. I have now tested this on
my Koelsch board using ifconfig up/down and checking /proc/interrupts.

Acked-by: Magnus Damm <redacted>

Cheers,

/ magnus

[PATCH 1/1] ARM: shmobile: Koelsch: pass Ether PHY IRQ

From: horms@verge.net.au (Simon Horman)
Date: 2014-01-20 00:32:44

On Fri, Jan 17, 2014 at 03:02:20PM +0900, Magnus Damm wrote:
On Fri, Dec 20, 2013 at 8:28 AM, Sergei Shtylyov
[off-list ref] wrote:
quoted
Pass Ether's PHY IRQ (which is IRQC's IRQ0) to the 'sh_eth' driver. Set the IRQ
trigger type to be low-level as per the Micrel PHY driver's setup.

Signed-off-by: Sergei Shtylyov <redacted>

---
 arch/arm/mach-shmobile/board-koelsch.c |    4 ++++
 1 file changed, 4 insertions(+)
Thanks for this. The code looks good to me. I have now tested this on
my Koelsch board using ifconfig up/down and checking /proc/interrupts.

Acked-by: Magnus Damm <redacted>
Hi Sergei,

please repost this patch with Magnus's ack once an rc release is
available with the pre-requisites of this patch.

Thanks
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help