]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/keymile/common/common.c
Merge remote-tracking branch 'u-boot-samsung/master'
[karo-tx-uboot.git] / board / keymile / common / common.c
index 86b81102e991cb17d78ca22df8fe55d0a6251e8f..2ddb3da38f35f7245551bd66ebbffabd71f59420 100644 (file)
@@ -12,7 +12,7 @@
 #include <ioports.h>
 #include <command.h>
 #include <malloc.h>
-#include <hush.h>
+#include <cli_hush.h>
 #include <net.h>
 #include <netdev.h>
 #include <asm/io.h>
 #include "common.h"
 #include <i2c.h>
 
-#if !defined(CONFIG_MPC83xx)
-static void i2c_write_start_seq(void);
-#endif
-
 DECLARE_GLOBAL_DATA_PTR;
 
 /*
@@ -78,7 +74,6 @@ int set_km_env(void)
 }
 
 #if defined(CONFIG_SYS_I2C_INIT_BOARD)
-#if !defined(CONFIG_MPC83xx)
 static void i2c_write_start_seq(void)
 {
        set_sda(1);
@@ -101,21 +96,6 @@ static void i2c_write_start_seq(void)
  */
 int i2c_make_abort(void)
 {
-
-#if defined(CONFIG_HARD_I2C) && !defined(MACH_TYPE_KM_KIRKWOOD)
-       immap_t *immap = (immap_t *)CONFIG_SYS_IMMR;
-       i2c8260_t *i2c  = (i2c8260_t *)&immap->im_i2c;
-
-       /*
-        * disable I2C controller first, otherwhise it thinks we want to
-        * talk to the slave port...
-        */
-       clrbits_8(&i2c->i2c_i2mod, 0x01);
-
-       /* Set the PortPins to GPIO */
-       setports(1);
-#endif
-
        int     scl_state = 0;
        int     sda_state = 0;
        int     i = 0;
@@ -148,13 +128,8 @@ int i2c_make_abort(void)
        set_sda(1);
        get_sda();
 
-#if defined(CONFIG_HARD_I2C)
-       /* Set the PortPins back to use for I2C */
-       setports(0);
-#endif
        return ret;
 }
-#endif
 
 /**
  * i2c_init_board - reset i2c bus. When the board is powercycled during a
@@ -167,6 +142,7 @@ void i2c_init_board(void)
 }
 #endif
 
+#if defined(CONFIG_KM_COMMON_ETH_INIT)
 int board_eth_init(bd_t *bis)
 {
        if (ethernet_present())
@@ -174,6 +150,7 @@ int board_eth_init(bd_t *bis)
 
        return -1;
 }
+#endif
 
 /*
  * do_setboardid command
@@ -226,7 +203,7 @@ U_BOOT_CMD(km_setboardid, 1, 0, do_setboardid, "setboardid", "read out bid and "
  *                             application and in the init scripts (?)
  *     return 0 in case of match, 1 if not match or error
  */
-int do_checkboardidhwk(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_checkboardidhwk(cmd_tbl_t *cmdtp, int flag, int argc,
                        char *const argv[])
 {
        unsigned long ivmbid = 0, ivmhwkey = 0;
@@ -367,7 +344,7 @@ U_BOOT_CMD(km_checkbidhwk, 2, 0, do_checkboardidhwk,
  *  if the testpin of the board is asserted, return 1
  *  *  else return 0
  */
-int do_checktestboot(cmd_tbl_t *cmdtp, int flag, int argc,
+static int do_checktestboot(cmd_tbl_t *cmdtp, int flag, int argc,
                        char *const argv[])
 {
        int testpin = 0;