cros_ec_board_init() should be called only when CONFIG_CROS_EC is
enabled. Also undef CONFIG_CROS_EC in the coreboot configuration.

Signed-off-by: Bin Meng <bmeng...@gmail.com>

---

 board/coreboot/coreboot/coreboot.c | 2 ++
 include/configs/coreboot.h         | 4 +++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/board/coreboot/coreboot/coreboot.c 
b/board/coreboot/coreboot/coreboot.c
index 154faf6..e076ea6 100644
--- a/board/coreboot/coreboot/coreboot.c
+++ b/board/coreboot/coreboot/coreboot.c
@@ -10,8 +10,10 @@
 
 int arch_early_init_r(void)
 {
+#ifdef CONFIG_CROS_EC
        if (cros_ec_board_init())
                return -1;
+#endif
 
        return 0;
 }
diff --git a/include/configs/coreboot.h b/include/configs/coreboot.h
index 990a2d1..e5fe5e0 100644
--- a/include/configs/coreboot.h
+++ b/include/configs/coreboot.h
@@ -67,9 +67,11 @@
 
 #define CONFIG_BOOTDELAY       2
 
-#define CONFIG_CROS_EC
+#undef CONFIG_CROS_EC
+#ifdef CONFIG_CROS_EC
 #define CONFIG_CROS_EC_LPC
 #define CONFIG_CMD_CROS_EC
+#endif
 #define CONFIG_ARCH_EARLY_INIT_R
 
 #endif /* __CONFIG_H */
-- 
1.8.2.1

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to