]> git.sur5r.net Git - u-boot/blobdiff - drivers/net/fm/p1023.c
Merge branch 'next' of git://git.denx.de/u-boot-mpc83xx
[u-boot] / drivers / net / fm / p1023.c
index b17dc40b8a8f900fe73ee7386652d1929f447afd..0eaad0f45d1e442f2295dea5c15c3082b447f91c 100644 (file)
@@ -1,20 +1,7 @@
 /*
  * Copyright 2011 Freescale Semiconductor, Inc.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
+ * SPDX-License-Identifier:    GPL-2.0+
  */
 #include <common.h>
 #include <phy.h>
@@ -23,7 +10,7 @@
 #include <asm/immap_85xx.h>
 #include <asm/fsl_serdes.h>
 
-u32 port_to_devdisr[] = {
+static u32 port_to_devdisr[] = {
        [FM1_DTSEC1] = MPC85xx_DEVDISR_TSEC1,
        [FM1_DTSEC2] = MPC85xx_DEVDISR_TSEC2,
 };
@@ -39,6 +26,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]);
 }