]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - arch/arm/lib/board.c
upgrade to upstream version 2013.07
[karo-tx-uboot.git] / arch / arm / lib / board.c
index 4b60a10d2f94065e9ba37d90d0c2436d4524026e..ad78e7366761bca5615dce7e8cd7285c56c97bb0 100644 (file)
@@ -6,23 +6,7 @@
  * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
  * Marius Groeger <mgroeger@sysgo.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+
  */
 
 /*
@@ -53,6 +37,7 @@
 #include <fdtdec.h>
 #include <post.h>
 #include <logbuff.h>
+#include <asm/sections.h>
 
 #ifdef CONFIG_BITBANGMII
 #include <miiphy.h>
@@ -68,7 +53,7 @@ extern void dataflash_print_info(void);
 #endif
 
 #if defined(CONFIG_HARD_I2C) || \
-    defined(CONFIG_SOFT_I2C)
+       defined(CONFIG_SYS_I2C)
 #include <i2c.h>
 #endif
 
@@ -138,7 +123,7 @@ static int display_banner(void)
  * has the disadvantage that you either get nothing, or everything.
  * On PowerPC, you might see "DRAM: " before the system hangs - which
  * gives a simple yet clear indication which part of the
- * initialization is failing.
+ * initialization if failing.
  */
 static int display_dram_config(void)
 {
@@ -164,11 +149,15 @@ static int display_dram_config(void)
        return (0);
 }
 
-#if defined(CONFIG_HARD_I2C) || defined(CONFIG_SOFT_I2C)
+#if defined(CONFIG_HARD_I2C) || defined(CONFIG_SYS_I2C)
 static int init_func_i2c(void)
 {
        puts("I2C:   ");
+#ifdef CONFIG_SYS_I2C
+       i2c_init_all();
+#else
        i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
+#endif
        puts("ready\n");
        return (0);
 }
@@ -267,7 +256,7 @@ init_fnc_t *init_sequence[] = {
 #if defined(CONFIG_DISPLAY_BOARDINFO)
        checkboard,             /* display board info */
 #endif
-#if defined(CONFIG_HARD_I2C) || defined(CONFIG_SOFT_I2C)
+#if defined(CONFIG_HARD_I2C) || defined(CONFIG_SYS_I2C)
        init_func_i2c,
 #endif
        dram_init,              /* configure available RAM banks */
@@ -706,9 +695,3 @@ void board_init_r(gd_t *id, ulong dest_addr)
 
        /* NOTREACHED - no way out of command loop except booting */
 }
-
-void hang(void)
-{
-       puts("### ERROR ### Please RESET the board ###\n");
-       for (;;);
-}