tizen 2.3.1 release
[platform/kernel/u-boot.git] / arch / powerpc / cpu / mpc85xx / p1022_serdes.c
index 14d17eb..e4c9c22 100644 (file)
@@ -2,7 +2,10 @@
  * Copyright 2010 Freescale Semiconductor, Inc.
  * Author: Timur Tabi <timur@freescale.com>
  *
- * SPDX-License-Identifier:    GPL-2.0+
+ * 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.
  */
 
 #include <config.h>
@@ -90,7 +93,7 @@ void fsl_serdes_init(void)
 
        debug("PORDEVSR[IO_SEL_SRDS] = %x\n", srds_cfg);
 
-       if (srds_cfg >= ARRAY_SIZE(serdes1_cfg_tbl)) {
+       if (srds_cfg > ARRAY_SIZE(serdes1_cfg_tbl)) {
                printf("Invalid PORDEVSR[IO_SEL_SRDS] = %d\n", srds_cfg);
                return;
        }
@@ -99,7 +102,7 @@ void fsl_serdes_init(void)
                serdes1_prtcl_map |= (1 << lane_prtcl);
        }
 
-       if (srds_cfg >= ARRAY_SIZE(serdes2_cfg_tbl)) {
+       if (srds_cfg > ARRAY_SIZE(serdes2_cfg_tbl)) {
                printf("Invalid PORDEVSR[IO_SEL_SRDS] = %d\n", srds_cfg);
                return;
        }