]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - post/cpu/mpc8xx/uart.c
Merge branch 'u-boot/master'
[karo-tx-uboot.git] / post / cpu / mpc8xx / uart.c
index f351ac06d72468fa68bda7de6bf67f73d6489722..5214c71b085cd394cc975bda57e39f03ac06524a 100644 (file)
@@ -2,23 +2,7 @@
  * (C) Copyright 2002
  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  *
- * 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>
@@ -61,8 +45,6 @@ static int ctlr_list[][2] =
 static int ctlr_list[][2] = { };
 #endif
 
-#define CTRL_LIST_SIZE (sizeof(ctlr_list) / sizeof(ctlr_list[0]))
-
 static struct {
        void (*init) (int index);
        void (*halt) (int index);
@@ -124,7 +106,7 @@ static void smc_init (int smc_index)
                        ~(smc_index == 1 ? BCSR1_RS232EN_1 : BCSR1_RS232EN_2);
 #endif
 
-#if defined(CONFIG_RPXLITE) || defined(CONFIG_RPXCLASSIC)
+#if defined(CONFIG_RPXLITE)
        /* Enable Monitor Port Transceiver */
        *((uchar *) BCSR0) |= BCSR0_ENMONXCVR;
 #endif
@@ -159,10 +141,6 @@ static void smc_init (int smc_index)
        up->smc_rfcr = SMC_EB;
        up->smc_tfcr = SMC_EB;
 
-#if defined(CONFIG_MBX)
-       board_serial_init ();
-#endif
-
        /* Set UART mode, 8 bit, no parity, one stop.
         * Enable receive and transmit.
         * Set local loopback mode.
@@ -540,7 +518,7 @@ int uart_post_test (int flags)
        ctlr_proc[CTLR_SCC].putc = scc_putc;
        ctlr_proc[CTLR_SCC].getc = scc_getc;
 
-       for (i = 0; i < CTRL_LIST_SIZE; i++) {
+       for (i = 0; i < ARRAY_SIZE(ctlr_list); i++) {
                if (test_ctlr (ctlr_list[i][0], ctlr_list[i][1]) != 0) {
                        res = -1;
                }