Patchwork [U-Boot] fm: Don't allow disabling of FM1-DTSEC1

login
register
mail settings
Submitter Kumar Gala
Date Oct. 14, 2011, 2:09 p.m.
Message ID <1318601371-26571-1-git-send-email-galak@kernel.crashing.org>
Download mbox | patch
Permalink /patch/119790/
State Accepted
Commit f5b9e736418422f9f3501b9854294b38275f4abd
Delegated to: Kumar Gala
Headers show

Comments

Kumar Gala - Oct. 14, 2011, 2:09 p.m.
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 |    5 +++++
 drivers/net/fm/p3060.c |    5 +++++
 drivers/net/fm/p4080.c |    5 +++++
 drivers/net/fm/p5020.c |    5 +++++
 4 files changed, 20 insertions(+), 0 deletions(-)
Kumar Gala - Oct. 21, 2011, 5:09 a.m.
On Oct 14, 2011, at 9:09 AM, Kumar Gala wrote:

> 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 |    5 +++++
> drivers/net/fm/p3060.c |    5 +++++
> drivers/net/fm/p4080.c |    5 +++++
> drivers/net/fm/p5020.c |    5 +++++
> 4 files changed, 20 insertions(+), 0 deletions(-)

applied to 85xx

- k

Patch

diff --git a/drivers/net/fm/p1023.c b/drivers/net/fm/p1023.c
index b17dc40..9765da5 100644
--- a/drivers/net/fm/p1023.c
+++ b/drivers/net/fm/p1023.c
@@ -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]);
 }
 
diff --git a/drivers/net/fm/p3060.c b/drivers/net/fm/p3060.c
index b25bca7..0b7b765 100644
--- a/drivers/net/fm/p3060.c
+++ b/drivers/net/fm/p3060.c
@@ -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]);
 }
 
diff --git a/drivers/net/fm/p4080.c b/drivers/net/fm/p4080.c
index 791caab..9dc6049 100644
--- a/drivers/net/fm/p4080.c
+++ b/drivers/net/fm/p4080.c
@@ -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]);
 }
 
diff --git a/drivers/net/fm/p5020.c b/drivers/net/fm/p5020.c
index 69c27d2..a7a6e43 100644
--- a/drivers/net/fm/p5020.c
+++ b/drivers/net/fm/p5020.c
@@ -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]);
 }