fm: Don't allow disabling of FM1-DTSEC1
authorKumar Gala <galak@kernel.crashing.org>
Fri, 14 Oct 2011 08:17:56 +0000 (03:17 -0500)
committerKumar Gala <galak@kernel.crashing.org>
Tue, 18 Oct 2011 05:36:15 +0000 (00:36 -0500)
The MDIO controller to talk to external PHYs is on FM1-DTSEC1 so don't
allow disabling.  If we disable it we end up powering the block down in
the SoC and thus can't communicate to any external PHYs.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
drivers/net/fm/p1023.c
drivers/net/fm/p3060.c
drivers/net/fm/p4080.c
drivers/net/fm/p5020.c

index b17dc40b8a8f900fe73ee7386652d1929f447afd..9765da5b2354af0e196e9f40f7b93015619c346d 100644 (file)
@@ -39,6 +39,11 @@ static int is_device_disabled(enum fm_port port)
 void fman_disable_port(enum fm_port port)
 {
        ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
+
+       /* don't allow disabling of DTSEC1 as its needed for MDIO */
+       if (port == FM1_DTSEC1)
+               return;
+
        setbits_be32(&gur->devdisr, port_to_devdisr[port]);
 }
 
index 176e1d292cfe21bca0b52854ab6ec8781752dfc1..c9748a954cca44eda07323f013f7d49a457f7d4c 100644 (file)
@@ -45,6 +45,11 @@ static int is_device_disabled(enum fm_port port)
 void fman_disable_port(enum fm_port port)
 {
        ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
+
+       /* don't allow disabling of DTSEC1 as its needed for MDIO */
+       if (port == FM1_DTSEC1)
+               return;
+
        setbits_be32(&gur->devdisr2, port_to_devdisr[port]);
 }
 
index 791caab7ecda51772c086d12e9f573e7e0dc3d39..9dc6049c360cc1bc267ccbca5f8a04fda8bc1848 100644 (file)
@@ -47,6 +47,11 @@ static int is_device_disabled(enum fm_port port)
 void fman_disable_port(enum fm_port port)
 {
        ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
+
+       /* don't allow disabling of DTSEC1 as its needed for MDIO */
+       if (port == FM1_DTSEC1)
+               return;
+
        setbits_be32(&gur->devdisr2, port_to_devdisr[port]);
 }
 
index 69c27d22371fa7b1a36c54283cde092fe30c03b6..a7a6e43fe2c038293878f1ae6b59a8e3a8f760e0 100644 (file)
@@ -43,6 +43,11 @@ static int is_device_disabled(enum fm_port port)
 void fman_disable_port(enum fm_port port)
 {
        ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
+
+       /* don't allow disabling of DTSEC1 as its needed for MDIO */
+       if (port == FM1_DTSEC1)
+               return;
+
        setbits_be32(&gur->devdisr2, port_to_devdisr[port]);
 }