diff mbox

[U-Boot,RESEND,v4,10/12] x86: coreboot: Wrap cros_ec initialization

Message ID 1420553664-3281-11-git-send-email-bmeng.cn@gmail.com
State Accepted
Delegated to: Simon Glass
Headers show

Commit Message

Bin Meng Jan. 6, 2015, 2:14 p.m. UTC
cros_ec_board_init() should be called only when CONFIG_CROS_EC is
enabled.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>

---

Changes in v4: None
Changes in v3: None
Changes in v2:
- Leave CROS_EC defines unchanged in coreboot.h

 board/coreboot/coreboot/coreboot.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Simon Glass Jan. 7, 2015, 2:41 a.m. UTC | #1
On 6 January 2015 at 07:14, Bin Meng <bmeng.cn@gmail.com> wrote:
> cros_ec_board_init() should be called only when CONFIG_CROS_EC is
> enabled.
>
> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
> Acked-by: Simon Glass <sjg@chromium.org>
>
> ---
>
> Changes in v4: None
> Changes in v3: None
> Changes in v2:
> - Leave CROS_EC defines unchanged in coreboot.h
>
>  board/coreboot/coreboot/coreboot.c | 2 ++
>  1 file changed, 2 insertions(+)

Applied to u-boot-x86/next, thanks!
diff mbox

Patch

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;
 }