]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - arch/powerpc/cpu/mpc8xxx/fdt.c
Update from 2013.01 to 2013.07
[karo-tx-uboot.git] / arch / powerpc / cpu / mpc8xxx / fdt.c
index 284709428d9c5c6907b43ac0a8b7e8e8bb183cb0..89966e0d2f79bca056eac532acc26b7f998e4367 100644 (file)
@@ -4,23 +4,7 @@
  * This file is derived from arch/powerpc/cpu/mpc85xx/cpu.c and
  * arch/powerpc/cpu/mpc86xx/cpu.c. Basically this file contains
  * cpu specific common code for 85xx/86xx processors.
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * 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>
@@ -167,6 +151,11 @@ void fdt_fixup_dr_usb(void *blob, bd_t *bd)
                                }
                        }
 
+                       if (mode_idx < 0 || phy_idx < 0) {
+                               puts("ERROR: wrong usb mode/phy defined!!\n");
+                               return;
+                       }
+
                        dr_mode_type = modes[mode_idx];
                        dr_phy_type = phys[phy_idx];