diff mbox

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

Message ID 201312200228.00555.sergei.shtylyov@cogentembedded.com (mailing list archive)
State Superseded
Headers show

Commit Message

Sergei Shtylyov Dec. 19, 2013, 11:28 p.m. UTC
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 <sergei.shtylyov@cogentembedded.com>

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

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

Comments

Simon Horman Dec. 27, 2013, 2:12 a.m. UTC | #1
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 <sergei.shtylyov@cogentembedded.com>

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.

> 
> ---
>  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@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
--
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
Sergei Shtylyov Dec. 27, 2013, 11:38 a.m. UTC | #2
Hello.

On 27-12-2013 6:12, Simon Horman 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 <sergei.shtylyov@cogentembedded.com>

> 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

--
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
Simon Horman Jan. 6, 2014, 5:39 a.m. UTC | #3
On Fri, Dec 27, 2013 at 03:38:10PM +0400, Sergei Shtylyov wrote:
> Hello.
> 
> On 27-12-2013 6:12, Simon Horman 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 <sergei.shtylyov@cogentembedded.com>
> 
> >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...

Sorry, it was too late for v3.14 and I would prefer if you didn't route
this via Dave's tree.
--
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
Sergei Shtylyov Jan. 6, 2014, 12:47 p.m. UTC | #4
Hello.

On 06-01-2014 9:39, Simon Horman 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 <sergei.shtylyov@cogentembedded.com>

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

> 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

--
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
Magnus Damm Jan. 17, 2014, 6:02 a.m. UTC | #5
On Fri, Dec 20, 2013 at 8:28 AM, Sergei Shtylyov
<sergei.shtylyov@cogentembedded.com> 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 <sergei.shtylyov@cogentembedded.com>
>
> ---
>  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 <damm@opensource.se>

Cheers,

/ magnus
--
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
Simon Horman Jan. 20, 2014, 12:32 a.m. UTC | #6
On Fri, Jan 17, 2014 at 03:02:20PM +0900, Magnus Damm wrote:
> On Fri, Dec 20, 2013 at 8:28 AM, Sergei Shtylyov
> <sergei.shtylyov@cogentembedded.com> 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 <sergei.shtylyov@cogentembedded.com>
> >
> > ---
> >  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 <damm@opensource.se>

Hi Sergei,

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

Thanks
--
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
diff mbox

Patch

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