]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
net: tsec: Fix Marvell 88E1121R phy init
authorAnatolij Gustschin <agust@denx.de>
Tue, 2 Dec 2008 09:31:04 +0000 (10:31 +0100)
committerBen Warren <biggerbadderben@gmail.com>
Fri, 5 Dec 2008 06:51:54 +0000 (22:51 -0800)
This patch tries to ensure that phy interrupt pin
won't be asserted after booting. We experienced
following issues with current 88E1121R phy init:

Marvell 88E1121R phy can be hardware-configured
to share MDC/MDIO and interrupt pins for both ports
P0 and P1 (e.g. as configured on socrates board).
Port 0 interrupt pin will be shared by both ports
in such configuration. After booting Linux and
configuring eth0 interface, port 0 phy interrupts
are enabled. After rebooting without proper eth0
interface shutdown port 0 phy interrupts remain
enabled so any change on port 0 (link status, etc.)
cause assertion of the interrupt. Now booting Linux
and configuring eth1 interface will cause permanent
phy interrupt storm as the registered phy 1 interrupt
handler doesn't acknowledge phy 0 interrupts. This
of course should be fixed in Linux driver too.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Acked-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
drivers/net/tsec.c
include/tsec.h

index d7da0819d10bd07f2e5913618393888de03193e2..fbc9a6dd05b4a3178b80168cf316c173f866ee85 100644 (file)
@@ -1196,6 +1196,9 @@ struct phy_info phy_info_M88E1121R = {
                           {MIIM_88E1121_PHY_LED_CTRL, miim_read,
                            &mii_88E1121_set_led},
                           {MIIM_CONTROL, MIIM_CONTROL_INIT, &mii_cr_init},
+                          /* Disable IRQs and de-assert interrupt */
+                          {MIIM_88E1121_PHY_IRQ_EN, 0, NULL},
+                          {MIIM_88E1121_PHY_IRQ_STATUS, miim_read, NULL},
                           {miim_end,}
                           },
        (struct phy_cmd[]){     /* startup */
index d2951f6d33bf396d7a2850267fbb65e0ad73ebad..7b52e06ab003acd935c8062180583337afbd13b6 100644 (file)
 #define MIIM_88E1121_PHY_LED_PAGE      3
 #define MIIM_88E1121_PHY_LED_DEF       0x0030
 
+/* 88E1121 PHY IRQ Enable/Status Register */
+#define MIIM_88E1121_PHY_IRQ_EN                18
+#define MIIM_88E1121_PHY_IRQ_STATUS    19
+
 #define MIIM_88E1121_PHY_PAGE          22
 
 /* 88E1145 Extended PHY Specific Control Register */