From: Kumar Gala Date: Fri, 14 Oct 2011 08:17:56 +0000 (-0500) Subject: fm: Don't allow disabling of FM1-DTSEC1 X-Git-Tag: v2011.12-rc1~510^2~8 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f5b9e736418422f9f3501b9854294b38275f4abd;p=u-boot fm: Don't allow disabling of FM1-DTSEC1 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 --- diff --git a/drivers/net/fm/p1023.c b/drivers/net/fm/p1023.c index b17dc40b8a..9765da5b23 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 176e1d292c..c9748a954c 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 791caab7ec..9dc6049c36 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 69c27d2237..a7a6e43fe2 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]); }