* [PATCH v2 1/4] ARM: shmobile: marzen-reference: Reference the correct IRQ for ethernet
2013-05-15 2:57 [PATCH v2 0/4] marzen-reference ethernet patches Simon Horman
@ 2013-05-15 2:57 ` Simon Horman
2013-05-15 2:57 ` [PATCH v2 2/4] ARM: shmobile: marzen-reference: Update lan device name in pinctrl maps Simon Horman
` (2 subsequent siblings)
3 siblings, 0 replies; 11+ messages in thread
From: Simon Horman @ 2013-05-15 2:57 UTC (permalink / raw)
To: linux-arm-kernel
From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
The SMSC ethernet controller uses an external IRQ line that goes through
the irqpin controller. Set the interrupt parent to irqpin0 and fix the
interrupt number.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/boot/dts/r8a7779-marzen-reference.dts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/r8a7779-marzen-reference.dts b/arch/arm/boot/dts/r8a7779-marzen-reference.dts
index 72be4c8..10cfc7f 100644
--- a/arch/arm/boot/dts/r8a7779-marzen-reference.dts
+++ b/arch/arm/boot/dts/r8a7779-marzen-reference.dts
@@ -38,8 +38,8 @@
compatible = "smsc,lan9220", "smsc,lan9115";
reg = <0x18000000 0x100>;
phy-mode = "mii";
- interrupt-parent = <&gic>;
- interrupts = <0 28 0x4>;
+ interrupt-parent = <&irqpin0>;
+ interrupts = <1 0x4>;
reg-io-width = <4>;
vddvario-supply = <&fixedregulator3v3>;
vdd33a-supply = <&fixedregulator3v3>;
--
1.8.2.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH v2 2/4] ARM: shmobile: marzen-reference: Update lan device name in pinctrl maps
2013-05-15 2:57 [PATCH v2 0/4] marzen-reference ethernet patches Simon Horman
2013-05-15 2:57 ` [PATCH v2 1/4] ARM: shmobile: marzen-reference: Reference the correct IRQ for ethernet Simon Horman
@ 2013-05-15 2:57 ` Simon Horman
2013-05-15 2:57 ` [PATCH v2 3/4] ARM: shmobile: marzen-reference: Initialise irqpin Simon Horman
2013-05-15 2:57 ` [PATCH v2 4/4] ARM: shmobile: marzen-reference: Set SMSC lan to use irq-push-pull Simon Horman
3 siblings, 0 replies; 11+ messages in thread
From: Simon Horman @ 2013-05-15 2:57 UTC (permalink / raw)
To: linux-arm-kernel
From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
The ethernet device is instantiated from the device tree, use the
correct name in the pinctrl mappings.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/mach-shmobile/board-marzen-reference.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-shmobile/board-marzen-reference.c b/arch/arm/mach-shmobile/board-marzen-reference.c
index 480d882..5332e89 100644
--- a/arch/arm/mach-shmobile/board-marzen-reference.c
+++ b/arch/arm/mach-shmobile/board-marzen-reference.c
@@ -43,9 +43,9 @@ static const struct pinctrl_map marzen_pinctrl_map[] = {
PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7779",
"sdhi0_wp", "sdhi0"),
/* SMSC */
- PIN_MAP_MUX_GROUP_DEFAULT("smsc911x", "pfc-r8a7779",
+ PIN_MAP_MUX_GROUP_DEFAULT("18000000.lan0", "pfc-r8a7779",
"intc_irq1_b", "intc"),
- PIN_MAP_MUX_GROUP_DEFAULT("smsc911x", "pfc-r8a7779",
+ PIN_MAP_MUX_GROUP_DEFAULT("18000000.lan0", "pfc-r8a7779",
"lbsc_ex_cs0", "lbsc"),
};
--
1.8.2.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH v2 3/4] ARM: shmobile: marzen-reference: Initialise irqpin
2013-05-15 2:57 [PATCH v2 0/4] marzen-reference ethernet patches Simon Horman
2013-05-15 2:57 ` [PATCH v2 1/4] ARM: shmobile: marzen-reference: Reference the correct IRQ for ethernet Simon Horman
2013-05-15 2:57 ` [PATCH v2 2/4] ARM: shmobile: marzen-reference: Update lan device name in pinctrl maps Simon Horman
@ 2013-05-15 2:57 ` Simon Horman
2013-05-15 9:28 ` Laurent Pinchart
2013-05-15 2:57 ` [PATCH v2 4/4] ARM: shmobile: marzen-reference: Set SMSC lan to use irq-push-pull Simon Horman
3 siblings, 1 reply; 11+ messages in thread
From: Simon Horman @ 2013-05-15 2:57 UTC (permalink / raw)
To: linux-arm-kernel
Empirically it appears to be necessary to call r8a7779_init_irq_extpin(1)
in order to initialise irqpin for use with IRQ1. This is already done in
the marzen board code. This adds the call to the marzen-reference board
code.
The motivation for this is to allow use of SMSC LAN, which uses IRQ1, with
marzen-reference.
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/mach-shmobile/board-marzen-reference.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-shmobile/board-marzen-reference.c b/arch/arm/mach-shmobile/board-marzen-reference.c
index 5332e89..f83b6d1 100644
--- a/arch/arm/mach-shmobile/board-marzen-reference.c
+++ b/arch/arm/mach-shmobile/board-marzen-reference.c
@@ -63,12 +63,18 @@ static const char *marzen_boards_compat_dt[] __initdata = {
NULL,
};
+void __init marzen_init_irq(void)
+{
+ r8a7779_init_irq_extpin(1); /* IRQ1 as individual interrupt */
+ r8a7779_init_irq_dt();
+}
+
DT_MACHINE_START(MARZEN, "marzen")
.smp = smp_ops(r8a7779_smp_ops),
.map_io = r8a7779_map_io,
.init_early = r8a7779_init_delay,
.nr_irqs = NR_IRQS_LEGACY,
- .init_irq = r8a7779_init_irq_dt,
+ .init_irq = marzen_init_irq,
.init_machine = marzen_init,
.init_time = shmobile_timer_init,
.dt_compat = marzen_boards_compat_dt,
--
1.8.2.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH v2 3/4] ARM: shmobile: marzen-reference: Initialise irqpin
2013-05-15 2:57 ` [PATCH v2 3/4] ARM: shmobile: marzen-reference: Initialise irqpin Simon Horman
@ 2013-05-15 9:28 ` Laurent Pinchart
2013-05-15 23:56 ` Simon Horman
0 siblings, 1 reply; 11+ messages in thread
From: Laurent Pinchart @ 2013-05-15 9:28 UTC (permalink / raw)
To: linux-arm-kernel
Hi Simon,
Thanks for the patch.
On Wednesday 15 May 2013 11:57:29 Simon Horman wrote:
> Empirically it appears to be necessary to call r8a7779_init_irq_extpin(1)
> in order to initialise irqpin for use with IRQ1. This is already done in
> the marzen board code. This adds the call to the marzen-reference board
> code.
>
> The motivation for this is to allow use of SMSC LAN, which uses IRQ1, with
> marzen-reference.
This is an acceptable workaround for now, but in the not-so-long term we want
to move that code to the irqpin driver.
I've had a brief look at the irq-renesas-intc-irqpin driver, and it definitely
looks like some love is needed there. I don't have any free time for that at
the moment, but I could provide pointers if anyone wants to work on moving
irqpin-related arch code to the driver.
> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> ---
> arch/arm/mach-shmobile/board-marzen-reference.c | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-shmobile/board-marzen-reference.c
> b/arch/arm/mach-shmobile/board-marzen-reference.c index 5332e89..f83b6d1
> 100644
> --- a/arch/arm/mach-shmobile/board-marzen-reference.c
> +++ b/arch/arm/mach-shmobile/board-marzen-reference.c
> @@ -63,12 +63,18 @@ static const char *marzen_boards_compat_dt[] __initdata
> = { NULL,
> };
>
> +void __init marzen_init_irq(void)
> +{
> + r8a7779_init_irq_extpin(1); /* IRQ1 as individual interrupt */
> + r8a7779_init_irq_dt();
> +}
> +
> DT_MACHINE_START(MARZEN, "marzen")
> .smp = smp_ops(r8a7779_smp_ops),
> .map_io = r8a7779_map_io,
> .init_early = r8a7779_init_delay,
> .nr_irqs = NR_IRQS_LEGACY,
> - .init_irq = r8a7779_init_irq_dt,
> + .init_irq = marzen_init_irq,
> .init_machine = marzen_init,
> .init_time = shmobile_timer_init,
> .dt_compat = marzen_boards_compat_dt,
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2 3/4] ARM: shmobile: marzen-reference: Initialise irqpin
2013-05-15 9:28 ` Laurent Pinchart
@ 2013-05-15 23:56 ` Simon Horman
0 siblings, 0 replies; 11+ messages in thread
From: Simon Horman @ 2013-05-15 23:56 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, May 15, 2013 at 11:28:15AM +0200, Laurent Pinchart wrote:
> Hi Simon,
>
> Thanks for the patch.
>
> On Wednesday 15 May 2013 11:57:29 Simon Horman wrote:
> > Empirically it appears to be necessary to call r8a7779_init_irq_extpin(1)
> > in order to initialise irqpin for use with IRQ1. This is already done in
> > the marzen board code. This adds the call to the marzen-reference board
> > code.
> >
> > The motivation for this is to allow use of SMSC LAN, which uses IRQ1, with
> > marzen-reference.
>
> This is an acceptable workaround for now, but in the not-so-long term we want
> to move that code to the irqpin driver.
Yes, I agree that this not a long term solution.
> I've had a brief look at the irq-renesas-intc-irqpin driver, and it definitely
> looks like some love is needed there. I don't have any free time for that at
> the moment, but I could provide pointers if anyone wants to work on moving
> irqpin-related arch code to the driver.
>
> > Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> > ---
> > arch/arm/mach-shmobile/board-marzen-reference.c | 8 +++++++-
> > 1 file changed, 7 insertions(+), 1 deletion(-)
> >
> > diff --git a/arch/arm/mach-shmobile/board-marzen-reference.c
> > b/arch/arm/mach-shmobile/board-marzen-reference.c index 5332e89..f83b6d1
> > 100644
> > --- a/arch/arm/mach-shmobile/board-marzen-reference.c
> > +++ b/arch/arm/mach-shmobile/board-marzen-reference.c
> > @@ -63,12 +63,18 @@ static const char *marzen_boards_compat_dt[] __initdata
> > = { NULL,
> > };
> >
> > +void __init marzen_init_irq(void)
> > +{
> > + r8a7779_init_irq_extpin(1); /* IRQ1 as individual interrupt */
> > + r8a7779_init_irq_dt();
> > +}
> > +
> > DT_MACHINE_START(MARZEN, "marzen")
> > .smp = smp_ops(r8a7779_smp_ops),
> > .map_io = r8a7779_map_io,
> > .init_early = r8a7779_init_delay,
> > .nr_irqs = NR_IRQS_LEGACY,
> > - .init_irq = r8a7779_init_irq_dt,
> > + .init_irq = marzen_init_irq,
> > .init_machine = marzen_init,
> > .init_time = shmobile_timer_init,
> > .dt_compat = marzen_boards_compat_dt,
> --
> Regards,
>
> Laurent Pinchart
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v2 4/4] ARM: shmobile: marzen-reference: Set SMSC lan to use irq-push-pull
2013-05-15 2:57 [PATCH v2 0/4] marzen-reference ethernet patches Simon Horman
` (2 preceding siblings ...)
2013-05-15 2:57 ` [PATCH v2 3/4] ARM: shmobile: marzen-reference: Initialise irqpin Simon Horman
@ 2013-05-15 2:57 ` Simon Horman
2013-05-15 9:15 ` Laurent Pinchart
3 siblings, 1 reply; 11+ messages in thread
From: Simon Horman @ 2013-05-15 2:57 UTC (permalink / raw)
To: linux-arm-kernel
This change makes the DTS consistent with the platform data
that exists in board-marzen.c.
Empirically it does not appear to be necessary.
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/boot/dts/r8a7779-marzen-reference.dts | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/boot/dts/r8a7779-marzen-reference.dts b/arch/arm/boot/dts/r8a7779-marzen-reference.dts
index 10cfc7f..fe32e1a 100644
--- a/arch/arm/boot/dts/r8a7779-marzen-reference.dts
+++ b/arch/arm/boot/dts/r8a7779-marzen-reference.dts
@@ -40,6 +40,7 @@
phy-mode = "mii";
interrupt-parent = <&irqpin0>;
interrupts = <1 0x4>;
+ smsc,irq-push-pull;
reg-io-width = <4>;
vddvario-supply = <&fixedregulator3v3>;
vdd33a-supply = <&fixedregulator3v3>;
--
1.8.2.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH v2 4/4] ARM: shmobile: marzen-reference: Set SMSC lan to use irq-push-pull
2013-05-15 2:57 ` [PATCH v2 4/4] ARM: shmobile: marzen-reference: Set SMSC lan to use irq-push-pull Simon Horman
@ 2013-05-15 9:15 ` Laurent Pinchart
2014-05-12 22:26 ` Laurent Pinchart
0 siblings, 1 reply; 11+ messages in thread
From: Laurent Pinchart @ 2013-05-15 9:15 UTC (permalink / raw)
To: linux-arm-kernel
Hi Simon,
Thanks for the patch.
On Wednesday 15 May 2013 11:57:30 Simon Horman wrote:
> This change makes the DTS consistent with the platform data
> that exists in board-marzen.c.
>
> Empirically it does not appear to be necessary.
>
> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> arch/arm/boot/dts/r8a7779-marzen-reference.dts | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm/boot/dts/r8a7779-marzen-reference.dts
> b/arch/arm/boot/dts/r8a7779-marzen-reference.dts index 10cfc7f..fe32e1a
> 100644
> --- a/arch/arm/boot/dts/r8a7779-marzen-reference.dts
> +++ b/arch/arm/boot/dts/r8a7779-marzen-reference.dts
> @@ -40,6 +40,7 @@
> phy-mode = "mii";
> interrupt-parent = <&irqpin0>;
> interrupts = <1 0x4>;
> + smsc,irq-push-pull;
> reg-io-width = <4>;
> vddvario-supply = <&fixedregulator3v3>;
> vdd33a-supply = <&fixedregulator3v3>;
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2 4/4] ARM: shmobile: marzen-reference: Set SMSC lan to use irq-push-pull
2013-05-15 9:15 ` Laurent Pinchart
@ 2014-05-12 22:26 ` Laurent Pinchart
2014-05-13 1:11 ` Simon Horman
0 siblings, 1 reply; 11+ messages in thread
From: Laurent Pinchart @ 2014-05-12 22:26 UTC (permalink / raw)
To: linux-arm-kernel
Hi Simon,
On Wednesday 15 May 2013 11:15:01 Laurent Pinchart wrote:
> Hi Simon,
>
> Thanks for the patch.
>
> On Wednesday 15 May 2013 11:57:30 Simon Horman wrote:
> > This change makes the DTS consistent with the platform data
> > that exists in board-marzen.c.
> >
> > Empirically it does not appear to be necessary.
> >
> > Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
>
> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
I've noticed that this patch hasn't landed in mainline. Do you still plan to
upstream it ?
While the board has a pull-up resistor on the IRQ signal and can thus
accommodate an open-drain configuration, using push-pull mode would lower the
rise time.
> > ---
> >
> > arch/arm/boot/dts/r8a7779-marzen-reference.dts | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/arch/arm/boot/dts/r8a7779-marzen-reference.dts
> > b/arch/arm/boot/dts/r8a7779-marzen-reference.dts index 10cfc7f..fe32e1a
> > 100644
> > --- a/arch/arm/boot/dts/r8a7779-marzen-reference.dts
> > +++ b/arch/arm/boot/dts/r8a7779-marzen-reference.dts
> > @@ -40,6 +40,7 @@
> >
> > phy-mode = "mii";
> > interrupt-parent = <&irqpin0>;
> > interrupts = <1 0x4>;
> >
> > + smsc,irq-push-pull;
> >
> > reg-io-width = <4>;
> > vddvario-supply = <&fixedregulator3v3>;
> > vdd33a-supply = <&fixedregulator3v3>;
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2 4/4] ARM: shmobile: marzen-reference: Set SMSC lan to use irq-push-pull
2014-05-12 22:26 ` Laurent Pinchart
@ 2014-05-13 1:11 ` Simon Horman
2014-05-13 7:07 ` Simon Horman
0 siblings, 1 reply; 11+ messages in thread
From: Simon Horman @ 2014-05-13 1:11 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, May 13, 2014 at 12:26:35AM +0200, Laurent Pinchart wrote:
> Hi Simon,
>
> On Wednesday 15 May 2013 11:15:01 Laurent Pinchart wrote:
> > Hi Simon,
> >
> > Thanks for the patch.
> >
> > On Wednesday 15 May 2013 11:57:30 Simon Horman wrote:
> > > This change makes the DTS consistent with the platform data
> > > that exists in board-marzen.c.
> > >
> > > Empirically it does not appear to be necessary.
> > >
> > > Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> >
> > Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>
> I've noticed that this patch hasn't landed in mainline. Do you still plan to
> upstream it ?
>
> While the board has a pull-up resistor on the IRQ signal and can thus
> accommodate an open-drain configuration, using push-pull mode would lower the
> rise time.
Sorry for letting that slip through the cracks (for an entire year!).
I'll queue it up after giving Magnus a chance to veto it.
> > > ---
> > >
> > > arch/arm/boot/dts/r8a7779-marzen-reference.dts | 1 +
> > > 1 file changed, 1 insertion(+)
> > >
> > > diff --git a/arch/arm/boot/dts/r8a7779-marzen-reference.dts
> > > b/arch/arm/boot/dts/r8a7779-marzen-reference.dts index 10cfc7f..fe32e1a
> > > 100644
> > > --- a/arch/arm/boot/dts/r8a7779-marzen-reference.dts
> > > +++ b/arch/arm/boot/dts/r8a7779-marzen-reference.dts
> > > @@ -40,6 +40,7 @@
> > >
> > > phy-mode = "mii";
> > > interrupt-parent = <&irqpin0>;
> > > interrupts = <1 0x4>;
> > >
> > > + smsc,irq-push-pull;
> > >
> > > reg-io-width = <4>;
> > > vddvario-supply = <&fixedregulator3v3>;
> > > vdd33a-supply = <&fixedregulator3v3>;
>
> --
> Regards,
>
> Laurent Pinchart
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2 4/4] ARM: shmobile: marzen-reference: Set SMSC lan to use irq-push-pull
2014-05-13 1:11 ` Simon Horman
@ 2014-05-13 7:07 ` Simon Horman
0 siblings, 0 replies; 11+ messages in thread
From: Simon Horman @ 2014-05-13 7:07 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, May 13, 2014 at 10:11:28AM +0900, Simon Horman wrote:
> On Tue, May 13, 2014 at 12:26:35AM +0200, Laurent Pinchart wrote:
> > Hi Simon,
> >
> > On Wednesday 15 May 2013 11:15:01 Laurent Pinchart wrote:
> > > Hi Simon,
> > >
> > > Thanks for the patch.
> > >
> > > On Wednesday 15 May 2013 11:57:30 Simon Horman wrote:
> > > > This change makes the DTS consistent with the platform data
> > > > that exists in board-marzen.c.
> > > >
> > > > Empirically it does not appear to be necessary.
> > > >
> > > > Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> > >
> > > Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> >
> > I've noticed that this patch hasn't landed in mainline. Do you still plan to
> > upstream it ?
> >
> > While the board has a pull-up resistor on the IRQ signal and can thus
> > accommodate an open-drain configuration, using push-pull mode would lower the
> > rise time.
>
> Sorry for letting that slip through the cracks (for an entire year!).
> I'll queue it up after giving Magnus a chance to veto it.
I have spoken to Magnus off-line and queued up this patch.
^ permalink raw reply [flat|nested] 11+ messages in thread