Skip to contentSkip to conversation

Add Ether's PHY IRQ support for R8A7791/Koelsch board

PATCH Superseded Sergei Shtylyov 3 participants 8 messages Dec 19, 2013 – Jan 20, 2014 SuperH

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover Add Ether's PHY IRQ support for R8A7791/Koelsch board

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

#1 lore raw

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

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.

---
 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);

#2 lore raw

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

Quoted 4 lines · Sergei Shtylyov

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.

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 39 lines
---
 arch/arm/mach-shmobile/board-koelsch.c |    4 ++++
 1 file changed, 4 insertions(+)

Index: renesas/arch/arm/mach-shmobile/board-koelsch.c
===================================================================

arch/arm/mach-shmobile/board-koelsch.c +4 -1
@@ -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

#3 lore raw

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

Hello.

Quoted 9 lines · Simon Horman
Quoted 4 lines

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.

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.

Quoted 1 line

If so are they present in v3.13-rc5?

No, they should be available in 3.14-rc1.

Quoted 2 lines

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

#4 lore raw

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

Quoted 18 lines · Sergei Shtylyov

Hello.

Quoted 9 lines · Simon Horman
Quoted 4 lines

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.

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.

Quoted 1 line

If so are they present in v3.13-rc5?

Quoted 7 lines

No, they should be available in 3.14-rc1.

Quoted 2 lines

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.

#5 lore raw

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

Hello.

Quoted 16 lines · Simon Horman
Quoted 15 lines
Quoted 9 lines
Quoted 4 lines

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.

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.

Quoted 1 line

If so are they present in v3.13-rc5?

No, they should be available in 3.14-rc1.

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

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.

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

#6 lore raw

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

In reply to Sergei Shtylyov
Quoted 8 lines · Sergei Shtylyov

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.

---
 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.

Cheers,

/ magnus

#7 lore raw

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

Quoted 7 lines · Magnus Damm
Quoted 5 lines · Sergei Shtylyov

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 8 lines
Quoted 3 lines
---
 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.

Hi Sergei,

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

Thanks