From: Bin Meng Date: Sat, 3 Jan 2015 22:40:26 +0800 Subject: [U-Boot] [PATCH 3/3] x86: coreboot: Wrap cros_ec initialization In-Reply-To: <1420296026-8764-1-git-send-email-bmeng.cn@gmail.com> References: <1420296026-8764-1-git-send-email-bmeng.cn@gmail.com> Message-ID: <1420296026-8764-4-git-send-email-bmeng.cn@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- 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