Add Ether's PHY IRQ support for R8A7790/Lager board
cover Add Ether's PHY IRQ support for R8A7790/Lager board
Hello.
Here's the set of 2 patches 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 R8A7790/Lager board. The patchset depends on the two 'sh_eth' driver patches posted earlier in order to compile and work. It would be good if Dave Miller could merge these patches thru his tree, along with 'sh_eth' patches as this would have prevented delaying these patches to 3.15 which seems inevitable otherwise (well, unless Simon merges net-next to his tree?). I'll rebase the patches to the 'net-next.git' repo if Dave consents to merging them...
[1/2] ARM: shmobile: Lager: pass Ether PHY IRQ
[2/2] ARM: shmobile: Lager: conditionally select CONFIG_MICREL_PHY
WBR, Sergei
PATCH 1/2 ARM: shmobile: Lager: 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-lager.c | 4 ++++ 1 file changed, 4 insertions(+)
Index: renesas/arch/arm/mach-shmobile/board-lager.c =================================--- renesas.orig/arch/arm/mach-shmobile/board-lager.c +++ renesas/arch/arm/mach-shmobile/board-lager.c
@@ -22,6 +22,7 @@
#include <linux/gpio_keys.h>
#include <linux/input.h>
#include <linux/interrupt.h>
+#include <linux/irq.h>
#include <linux/kernel.h>
#include <linux/leds.h>
#include <linux/mmc/host.h>
@@ -228,6 +229,7 @@ static const struct resource mmcif1_reso
/* 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,
@@ -391,6 +393,8 @@ static void __init lager_init(void)
{
lager_add_standard_devices();
+ irq_set_irq_type(irq_pin(0), IRQ_TYPE_LEVEL_LOW);
+
if (IS_ENABLED(CONFIG_PHYLIB))
phy_register_fixup_for_id("r8a7790-ether-ff:01",
lager_ksz8041_fixup);
PATCH 1/2 ARM: shmobile: Lager: 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.Signed-off-by Sergei Shtylyov <[email protected]>
Hi Sergei,
for better or for worse I believe this is a v3.15 candidate.
Could you repost it once v3.14-rc1 has been released, I believe it will include the dependencies of this patch.
Thanks
PATCH 1/2 ARM: shmobile: Lager: pass Ether PHY IRQ
In reply to Sergei ShtylyovQuoted 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.Signed-off-by Sergei Shtylyov <[email protected]>--- arch/arm/mach-shmobile/board-lager.c | 4 ++++ 1 file changed, 4 insertions(+)
Thanks for your efforts. The code looks fine. I have now also tested this on my Lager board.
Cheers,
/ magnus
PATCH 1/2 ARM: shmobile: Lager: 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.Signed-off-by Sergei Shtylyov <[email protected]>
Quoted 8 lines
Quoted 3 lines
--- arch/arm/mach-shmobile/board-lager.c | 4 ++++ 1 file changed, 4 insertions(+)Thanks for your efforts. The code looks fine. I have now also tested this on my Lager board.
Acked-by Magnus Damm <[email protected]>
Hi Sergei,
please repost this patch with Magnus's ack once an rc release is available with the pre-requisites of this patch.
Thanks
PATCH 2/2 ARM: shmobile: Lager: conditionally select CONFIG_MICREL_PHY
In reply to Sergei ShtylyovNow that support for KSZ8041RNLI is added to the Micrel PHY driver and we intend to support PHY IRQs on the Lager board, we have to enable the Micrel driver. Do this by selecting CONFIG_MICREL_PHY for Lager if CONFIG_SH_ETH is enabled.
--- arch/arm/mach-shmobile/Kconfig | 2 ++ 1 file changed, 2 insertions(+)
Index: renesas/arch/arm/mach-shmobile/Kconfig =================================--- renesas.orig/arch/arm/mach-shmobile/Kconfig +++ renesas/arch/arm/mach-shmobile/Kconfig
@@ -54,6 +54,7 @@ config MACH_KZM9D
config MACH_LAGER
bool "Lager board"
depends on ARCH_R8A7790
+ select MICREL_PHY if SH_ETH
comment "Renesas ARM SoCs System Configuration"
endif
@@ -261,6 +262,7 @@ config MACH_LAGER
bool "Lager board"
depends on ARCH_R8A7790
select USE_OF
+ select MICREL_PHY if SH_ETH
config MACH_KOELSCH
bool "Koelsch board"
PATCH 2/2 ARM: shmobile: Lager: conditionally select CONFIG_MICREL_PHY
Quoted 5 lines · Sergei Shtylyov
Now that support for KSZ8041RNLI is added to the Micrel PHY driver and we intend to support PHY IRQs on the Lager board, we have to enable the Micrel driver. Do this by selecting
CONFIG_MICREL_PHYfor Lager ifCONFIG_SH_ETHis enabled.Signed-off-by Sergei Shtylyov <[email protected]>
Hi Sergei,
while I am very happy to see this change unfortunately it no longer applies. Could you please rebase it on top of renesas-devel-v3.13-rc4-20131219?
Thanks
Quoted 26 lines
--- arch/arm/mach-shmobile/Kconfig | 2 ++ 1 file changed, 2 insertions(+)Index: renesas/arch/arm/mach-shmobile/Kconfig
===================================================================arch/arm/mach-shmobile/Kconfig +2
-0@@ -54,6 +54,7 @@ config MACH_KZM9D config MACH_LAGER bool "Lager board" depends on ARCH_R8A7790 + select MICREL_PHY if SH_ETH comment "Renesas ARM SoCs System Configuration" endif@@ -261,6 +262,7 @@ config MACH_LAGER bool "Lager board" depends on ARCH_R8A7790 select USE_OF + select MICREL_PHY if SH_ETH config MACH_KOELSCH bool "Koelsch board"
PATCH 2/2 ARM: shmobile: Lager: conditionally select CONFIG_MICREL_PHY
Hello.
Quoted 11 lines · Simon Horman
Quoted 5 lines
Now that support for KSZ8041RNLI is added to the Micrel PHY driver and we intend to support PHY IRQs on the Lager board, we have to enable the Micrel driver. Do this by selecting
CONFIG_MICREL_PHYfor Lager ifCONFIG_SH_ETHis enabled.Signed-off-by Sergei Shtylyov <[email protected]>Hi Sergei,
while I am very happy to see this change unfortunately it no longer applies. Could you please rebase it on top of renesas-devel-v3.13-rc4-20131219?
Hmm, it *was done* on top of this tag. Perhaps you meant today's
renesas-devel-v3.13-rc5-20131223?
Quoted 1 line
Thanks
WBR, Sergei
PATCH 2/2 ARM: shmobile: Lager: conditionally select CONFIG_MICREL_PHY
Hello.
Quoted 7 lines · Sergei Shtylyov
Quoted 6 lines
Quoted 6 lines
Now that support for KSZ8041RNLI is added to the Micrel PHY driver and we intend
to support PHY IRQs on the Lager board, we have to enable the Micrel driver. Do this by selectingCONFIG_MICREL_PHYfor Lager ifCONFIG_SH_ETHis enabled.Signed-off-by Sergei Shtylyov <[email protected]>
Quoted 8 lines
Quoted 5 lines
Hi Sergei,
while I am very happy to see this change unfortunately it no longer applies. Could you please rebase it on top of renesas-devel-v3.13-rc4-20131219?
Hmm, it *was done* on top of this tag. Perhaps you meant today's
renesas-devel-v3.13-rc5-20131223?
It continues to apply even to that tag seamlessly. Some issue must be on
your side...
Quoted 1 line
Quoted 1 line
Thanks
WBR, Sergei
PATCH 2/2 ARM: shmobile: Lager: conditionally select CONFIG_MICREL_PHY
Quoted 17 lines · Sergei Shtylyov
Hello.
Quoted 12 lines · Sergei Shtylyov
Quoted 12 lines
Quoted 6 lines
Now that support for KSZ8041RNLI is added to the Micrel PHY driver and we intend
to support PHY IRQs on the Lager board, we have to enable the Micrel driver. Do this by selectingCONFIG_MICREL_PHYfor Lager ifCONFIG_SH_ETHis enabled.Signed-off-by Sergei Shtylyov <[email protected]>Hi Sergei,
while I am very happy to see this change unfortunately it no longer applies. Could you please rebase it on top of renesas-devel-v3.13-rc4-20131219?
Quoted 5 lines
Quoted 2 lines
Hmm, it *was done* on top of this tag. Perhaps you meant today's
renesas-devel-v3.13-rc5-20131223?It continues to apply even to that tag seamlessly. Some issue
must be on your side...
Indeed. I have now queued up the patch.