]> git.sur5r.net Git - u-boot/blobdiff - board/keymile/km82xx/km82xx.c
Merge branch 'u-boot-samsung/master' into 'u-boot-arm/master'
[u-boot] / board / keymile / km82xx / km82xx.c
index 67b69f6cb34712d807bb7bace1a930c518a690c7..f98844d317db7ce34b603f2a05923f26c21c65ed 100644 (file)
 #include <libfdt.h>
 #endif
 
-#if defined(CONFIG_HARD_I2C) || defined(CONFIG_SOFT_I2C)
 #include <i2c.h>
-#endif
-
 #include "../common/common.h"
 
 /*
@@ -370,7 +367,7 @@ static void set_pin(int state, unsigned long mask);
  * will toggle once what forces the mgocge3un part to restart
  * immediately.
  */
-void handle_mgcoge3un_reset(void)
+static void handle_mgcoge3un_reset(void)
 {
        char *bobcatreset = getenv("bobcatreset");
        if (bobcatreset) {
@@ -385,6 +382,14 @@ void handle_mgcoge3un_reset(void)
 }
 #endif
 
+int ethernet_present(void)
+{
+       struct km_bec_fpga *base =
+               (struct km_bec_fpga *)CONFIG_SYS_KMBEC_FPGA_BASE;
+
+       return in_8(&base->bprth) & PIGGY_PRESENT;
+}
+
 /*
  * Early board initalization.
  */