[U-Boot] [PATCH 3/3] x86: coreboot: Wrap cros_ec initialization
Bin Meng
bmeng.cn at gmail.com
Sat Jan 3 15:40:26 CET 2015
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.cn at 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
More information about the U-Boot
mailing list