]> git.sur5r.net Git - u-boot/blobdiff - board/sandburst/metrobox/metrobox.c
Merge branch 'master' of git://git.denx.de/u-boot-i2c
[u-boot] / board / sandburst / metrobox / metrobox.c
index ad3f9bc28e1f964443dc1b9068986a432a27f419..5bc7f2f4332819d88932fc6e9f557199c025a4f2 100644 (file)
@@ -2,23 +2,7 @@
  *  Copyright (c) 2005
  *  Travis B. Sawyer,  Sandburst Corporation, tsawyer@sandburst.com
  *
- * 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 <config.h>
 #include <common.h>
@@ -30,7 +14,6 @@
 #include <asm/io.h>
 #include <spd_sdram.h>
 #include <i2c.h>
-#include "../common/ppc440gx_i2c.h"
 #include "../common/sb_common.h"
 #if defined(CONFIG_HAS_ETH0) || defined(CONFIG_HAS_ETH1) || \
     defined(CONFIG_HAS_ETH2) || defined(CONFIG_HAS_ETH3)
@@ -202,36 +185,36 @@ int board_early_init_f (void)
         * UIC2         UIC1
         * UIC3         UIC2
         */
-       mtdcr (uic1sr, 0xffffffff);     /* clear all */
-       mtdcr (uic1er, 0x00000000);     /* disable all */
-       mtdcr (uic1cr, 0x00000000);     /* all non- critical */
-       mtdcr (uic1pr, 0xfffffe03);     /* polarity */
-       mtdcr (uic1tr, 0x01c00000);     /* trigger edge vs level */
-       mtdcr (uic1vr, 0x00000001);     /* int31 highest, base=0x000 */
-       mtdcr (uic1sr, 0xffffffff);     /* clear all */
-
-       mtdcr (uic2sr, 0xffffffff);     /* clear all */
-       mtdcr (uic2er, 0x00000000);     /* disable all */
-       mtdcr (uic2cr, 0x00000000);     /* all non-critical */
-       mtdcr (uic2pr, 0xffffc8ff);     /* polarity */
-       mtdcr (uic2tr, 0x00ff0000);     /* trigger edge vs level */
-       mtdcr (uic2vr, 0x00000001);     /* int31 highest, base=0x000 */
-       mtdcr (uic2sr, 0xffffffff);     /* clear all */
-
-       mtdcr (uic3sr, 0xffffffff);     /* clear all */
-       mtdcr (uic3er, 0x00000000);     /* disable all */
-       mtdcr (uic3cr, 0x00000000);     /* all non-critical */
-       mtdcr (uic3pr, 0xffff83ff);     /* polarity */
-       mtdcr (uic3tr, 0x00ff8c0f);     /* trigger edge vs level */
-       mtdcr (uic3vr, 0x00000001);     /* int31 highest, base=0x000 */
-       mtdcr (uic3sr, 0xffffffff);     /* clear all */
-
-       mtdcr (uic0sr, 0xfc000000);     /* clear all */
-       mtdcr (uic0er, 0x00000000);     /* disable all */
-       mtdcr (uic0cr, 0x00000000);     /* all non-critical */
-       mtdcr (uic0pr, 0xfc000000);
-       mtdcr (uic0tr, 0x00000000);
-       mtdcr (uic0vr, 0x00000001);
+       mtdcr (UIC1SR, 0xffffffff);     /* clear all */
+       mtdcr (UIC1ER, 0x00000000);     /* disable all */
+       mtdcr (UIC1CR, 0x00000000);     /* all non- critical */
+       mtdcr (UIC1PR, 0xfffffe03);     /* polarity */
+       mtdcr (UIC1TR, 0x01c00000);     /* trigger edge vs level */
+       mtdcr (UIC1VR, 0x00000001);     /* int31 highest, base=0x000 */
+       mtdcr (UIC1SR, 0xffffffff);     /* clear all */
+
+       mtdcr (UIC2SR, 0xffffffff);     /* clear all */
+       mtdcr (UIC2ER, 0x00000000);     /* disable all */
+       mtdcr (UIC2CR, 0x00000000);     /* all non-critical */
+       mtdcr (UIC2PR, 0xffffc8ff);     /* polarity */
+       mtdcr (UIC2TR, 0x00ff0000);     /* trigger edge vs level */
+       mtdcr (UIC2VR, 0x00000001);     /* int31 highest, base=0x000 */
+       mtdcr (UIC2SR, 0xffffffff);     /* clear all */
+
+       mtdcr (UIC3SR, 0xffffffff);     /* clear all */
+       mtdcr (UIC3ER, 0x00000000);     /* disable all */
+       mtdcr (UIC3CR, 0x00000000);     /* all non-critical */
+       mtdcr (UIC3PR, 0xffff83ff);     /* polarity */
+       mtdcr (UIC3TR, 0x00ff8c0f);     /* trigger edge vs level */
+       mtdcr (UIC3VR, 0x00000001);     /* int31 highest, base=0x000 */
+       mtdcr (UIC3SR, 0xffffffff);     /* clear all */
+
+       mtdcr (UIC0SR, 0xfc000000);     /* clear all */
+       mtdcr (UIC0ER, 0x00000000);     /* disable all */
+       mtdcr (UIC0CR, 0x00000000);     /* all non-critical */
+       mtdcr (UIC0PR, 0xfc000000);
+       mtdcr (UIC0TR, 0x00000000);
+       mtdcr (UIC0VR, 0x00000001);
 
        fpga_init();
 
@@ -305,11 +288,6 @@ int checkboard (void)
  ************************************************************************/
 int misc_init_f (void)
 {
-       /* Turn on i2c bus 1 */
-       puts ("I2C1:  ");
-       i2c1_init (CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
-       puts ("ready\n");
-
        /* Turn on fans */
        sbcommon_fans();
 
@@ -485,7 +463,7 @@ void fpga_init(void)
        return;
 }
 
-int metroboxSetupVars(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int metroboxSetupVars(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
        unsigned short sernum;
        char envstr[255];
@@ -545,7 +523,7 @@ int metroboxSetupVars(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        return(1);
 }
 
-int metroboxRecover(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int metroboxRecover(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
        unsigned short sernum;
        char envstr[255];