<p>Furquan Shaikh has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/21682">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">mb/google/*: Use newly added Chrome EC boardid function<br><br>Instead of duplicating code across multiple mainboards, use newly<br>added helper function to read boardid from Chrome EC.<br><br>Change-Id: I1671c0a0b87d0c4c45da5340e8f17a4a798317ca<br>Signed-off-by: Furquan Shaikh <furquan@chromium.org><br>---<br>M src/mainboard/google/chell/Kconfig<br>M src/mainboard/google/chell/Makefile.inc<br>D src/mainboard/google/chell/boardid.c<br>M src/mainboard/google/cyan/Kconfig<br>M src/mainboard/google/cyan/Makefile.inc<br>D src/mainboard/google/cyan/boardid.c<br>M src/mainboard/google/eve/Kconfig<br>M src/mainboard/google/eve/Makefile.inc<br>D src/mainboard/google/eve/boardid.c<br>M src/mainboard/google/fizz/Kconfig<br>M src/mainboard/google/fizz/Makefile.inc<br>D src/mainboard/google/fizz/boardid.c<br>M src/mainboard/google/glados/Kconfig<br>M src/mainboard/google/glados/Makefile.inc<br>D src/mainboard/google/glados/boardid.c<br>M src/mainboard/google/lars/Kconfig<br>M src/mainboard/google/lars/Makefile.inc<br>D src/mainboard/google/lars/boardid.c<br>M src/mainboard/google/poppy/Kconfig<br>M src/mainboard/google/poppy/Makefile.inc<br>D src/mainboard/google/poppy/boardid.c<br>M src/mainboard/google/poppy/variants/baseboard/Makefile.inc<br>D src/mainboard/google/poppy/variants/baseboard/boardid.c<br>M src/mainboard/google/reef/Kconfig<br>M src/mainboard/google/reef/Makefile.inc<br>D src/mainboard/google/reef/boardid.c<br>M src/mainboard/google/reef/variants/baseboard/Makefile.inc<br>D src/mainboard/google/reef/variants/baseboard/boardid.c<br>M src/mainboard/intel/kunimitsu/Kconfig<br>M src/mainboard/intel/kunimitsu/Makefile.inc<br>D src/mainboard/intel/kunimitsu/boardid.c<br>M src/mainboard/intel/strago/Kconfig<br>M src/mainboard/intel/strago/Makefile.inc<br>D src/mainboard/intel/strago/boardid.c<br>34 files changed, 10 insertions(+), 351 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/82/21682/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/src/mainboard/google/chell/Kconfig b/src/mainboard/google/chell/Kconfig<br>index d353b44..277c98f 100644<br>--- a/src/mainboard/google/chell/Kconfig<br>+++ b/src/mainboard/google/chell/Kconfig<br>@@ -8,6 +8,7 @@<br>  select DRIVERS_I2C_NAU8825<br>    select EC_GOOGLE_CHROMEEC<br>     select EC_GOOGLE_CHROMEEC_ACPI_MEMMAP<br>+        select EC_GOOGLE_CHROMEEC_BOARDID<br>     select EC_GOOGLE_CHROMEEC_LPC<br>         select EC_GOOGLE_CHROMEEC_MEC<br>         select EC_GOOGLE_CHROMEEC_PD<br>diff --git a/src/mainboard/google/chell/Makefile.inc b/src/mainboard/google/chell/Makefile.inc<br>index e52eb7e..9160266 100644<br>--- a/src/mainboard/google/chell/Makefile.inc<br>+++ b/src/mainboard/google/chell/Makefile.inc<br>@@ -17,7 +17,6 @@<br> <br> bootblock-y += bootblock_mainboard.c<br> <br>-romstage-y += boardid.c<br> romstage-y += pei_data.c<br> <br> bootblock-$(CONFIG_CHROMEOS) += chromeos.c<br>@@ -27,7 +26,6 @@<br> <br> ramstage-$(CONFIG_EC_GOOGLE_CHROMEEC) += ec.c<br> <br>-ramstage-y += boardid.c<br> ramstage-y += mainboard.c<br> ramstage-y += pei_data.c<br> ramstage-y += ramstage.c<br>diff --git a/src/mainboard/google/chell/boardid.c b/src/mainboard/google/chell/boardid.c<br>deleted file mode 100644<br>index 4eb9f48..0000000<br>--- a/src/mainboard/google/chell/boardid.c<br>+++ /dev/null<br>@@ -1,28 +0,0 @@<br>-/*<br>- * This file is part of the coreboot project.<br>- *<br>- * Copyright (C) 2015 Google Inc.<br>- * Copyright (C) 2015 Intel Corporation<br>- *<br>- * This program is free software; you can redistribute it and/or modify<br>- * it under the terms of the GNU General Public License as published by<br>- * the Free Software Foundation; version 2 of the License.<br>- *<br>- * This program is distributed in the hope that it will be useful,<br>- * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>- * GNU General Public License for more details.<br>- */<br>-<br>-#include <boardid.h><br>-#include <ec/google/chromeec/ec.h><br>-<br>-uint8_t board_id(void)<br>-{<br>-       MAYBE_STATIC int id = -1;<br>-<br>- if (id < 0)<br>-               id = google_chromeec_get_board_version();<br>-<br>- return id;<br>-}<br>diff --git a/src/mainboard/google/cyan/Kconfig b/src/mainboard/google/cyan/Kconfig<br>index a660c2f..c02352d 100644<br>--- a/src/mainboard/google/cyan/Kconfig<br>+++ b/src/mainboard/google/cyan/Kconfig<br>@@ -2,6 +2,7 @@<br>  def_bool n<br>    select BOARD_ROMSIZE_KB_8192<br>  select EC_GOOGLE_CHROMEEC<br>+    select EC_GOOGLE_CHROMEEC_BOARDID<br>     select EC_GOOGLE_CHROMEEC_MEC<br>         select EC_GOOGLE_CHROMEEC_ACPI_MEMMAP<br>         select ENABLE_BUILTIN_COM1<br>diff --git a/src/mainboard/google/cyan/Makefile.inc b/src/mainboard/google/cyan/Makefile.inc<br>index 01c2a91..0b11aa3 100644<br>--- a/src/mainboard/google/cyan/Makefile.inc<br>+++ b/src/mainboard/google/cyan/Makefile.inc<br>@@ -18,7 +18,6 @@<br> romstage-$(CONFIG_ENABLE_BUILTIN_COM1) += com_init.c<br> romstage-y += spd/spd.c<br> <br>-ramstage-y += boardid.c<br> ramstage-$(CONFIG_CHROMEOS) += chromeos.c<br> ramstage-y += ec.c<br> ramstage-y += irqroute.c<br>diff --git a/src/mainboard/google/cyan/boardid.c b/src/mainboard/google/cyan/boardid.c<br>deleted file mode 100644<br>index 5364bb9..0000000<br>--- a/src/mainboard/google/cyan/boardid.c<br>+++ /dev/null<br>@@ -1,30 +0,0 @@<br>-/*<br>- * This file is part of the coreboot project.<br>- *<br>- * Copyright (C) 2013 Google Inc.<br>- * Copyright (C) 2015 Intel Corp.<br>- *<br>- * This program is free software; you can redistribute it and/or modify<br>- * it under the terms of the GNU General Public License as published by<br>- * the Free Software Foundation; version 2 of the License.<br>- *<br>- * This program is distributed in the hope that it will be useful,<br>- * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>- * GNU General Public License for more details.<br>- */<br>-<br>-#include <boardid.h><br>-#include <stdlib.h><br>-#include <ec/google/chromeec/ec.h><br>-<br>-uint8_t board_id(void)<br>-{<br>-       static int id = -1;<br>-<br>-#if IS_ENABLED(CONFIG_EC_GOOGLE_CHROMEEC)<br>-   if (id < 0)<br>-               id = google_chromeec_get_board_version();<br>-#endif<br>-   return id;<br>-}<br>diff --git a/src/mainboard/google/eve/Kconfig b/src/mainboard/google/eve/Kconfig<br>index 16bcbd5..f576fa7 100644<br>--- a/src/mainboard/google/eve/Kconfig<br>+++ b/src/mainboard/google/eve/Kconfig<br>@@ -10,6 +10,7 @@<br>    select DRIVERS_I2C_MAX98927<br>   select DRIVERS_SPI_ACPI<br>       select EC_GOOGLE_CHROMEEC<br>+    select EC_GOOGLE_CHROMEEC_BOARDID<br>     select EC_GOOGLE_CHROMEEC_LPC<br>         select HAVE_ACPI_RESUME<br>       select HAVE_ACPI_TABLES<br>diff --git a/src/mainboard/google/eve/Makefile.inc b/src/mainboard/google/eve/Makefile.inc<br>index 8723e0c..c96e23e 100644<br>--- a/src/mainboard/google/eve/Makefile.inc<br>+++ b/src/mainboard/google/eve/Makefile.inc<br>@@ -17,14 +17,11 @@<br> <br> bootblock-y += bootblock.c<br> <br>-romstage-y += boardid.c<br>-<br> bootblock-$(CONFIG_CHROMEOS) += chromeos.c<br> verstage-$(CONFIG_CHROMEOS) += chromeos.c<br> romstage-$(CONFIG_CHROMEOS) += chromeos.c<br> ramstage-$(CONFIG_CHROMEOS) += chromeos.c<br> <br>-ramstage-y += boardid.c<br> ramstage-y += mainboard.c<br> ramstage-y += ramstage.c<br> ramstage-$(CONFIG_EC_GOOGLE_CHROMEEC) += ec.c<br>diff --git a/src/mainboard/google/eve/boardid.c b/src/mainboard/google/eve/boardid.c<br>deleted file mode 100644<br>index e33c094..0000000<br>--- a/src/mainboard/google/eve/boardid.c<br>+++ /dev/null<br>@@ -1,27 +0,0 @@<br>-/*<br>- * This file is part of the coreboot project.<br>- *<br>- * Copyright (C) 2016 Google Inc.<br>- *<br>- * This program is free software; you can redistribute it and/or modify<br>- * it under the terms of the GNU General Public License as published by<br>- * the Free Software Foundation; version 2 of the License.<br>- *<br>- * This program is distributed in the hope that it will be useful,<br>- * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>- * GNU General Public License for more details.<br>- */<br>-<br>-#include <boardid.h><br>-#include <ec/google/chromeec/ec.h><br>-<br>-uint8_t board_id(void)<br>-{<br>-    MAYBE_STATIC int id = -1;<br>-<br>- if (id < 0)<br>-               id = google_chromeec_get_board_version();<br>-<br>- return id;<br>-}<br>diff --git a/src/mainboard/google/fizz/Kconfig b/src/mainboard/google/fizz/Kconfig<br>index 107af9a..61158c9 100644<br>--- a/src/mainboard/google/fizz/Kconfig<br>+++ b/src/mainboard/google/fizz/Kconfig<br>@@ -7,6 +7,7 @@<br>  select DRIVERS_I2C_GENERIC<br>    select DRIVERS_SPI_ACPI<br>       select EC_GOOGLE_CHROMEEC<br>+    select EC_GOOGLE_CHROMEEC_BOARDID<br>     select EC_GOOGLE_CHROMEEC_LPC<br>         select HAVE_ACPI_RESUME<br>       select HAVE_ACPI_TABLES<br>diff --git a/src/mainboard/google/fizz/Makefile.inc b/src/mainboard/google/fizz/Makefile.inc<br>index d74b707..534968c 100644<br>--- a/src/mainboard/google/fizz/Makefile.inc<br>+++ b/src/mainboard/google/fizz/Makefile.inc<br>@@ -18,10 +18,8 @@<br> <br> verstage-$(CONFIG_CHROMEOS) += chromeos.c<br> <br>-romstage-y += boardid.c<br> romstage-$(CONFIG_CHROMEOS) += chromeos.c<br> <br>-ramstage-y += boardid.c<br> ramstage-$(CONFIG_CHROMEOS) += chromeos.c<br> ramstage-$(CONFIG_EC_GOOGLE_CHROMEEC) += ec.c<br> ramstage-y += mainboard.c<br>diff --git a/src/mainboard/google/fizz/boardid.c b/src/mainboard/google/fizz/boardid.c<br>deleted file mode 100644<br>index 440a5a9..0000000<br>--- a/src/mainboard/google/fizz/boardid.c<br>+++ /dev/null<br>@@ -1,27 +0,0 @@<br>-/*<br>- * This file is part of the coreboot project.<br>- *<br>- * Copyright (C) 2017 Google Inc.<br>- *<br>- * This program is free software; you can redistribute it and/or modify<br>- * it under the terms of the GNU General Public License as published by<br>- * the Free Software Foundation; version 2 of the License.<br>- *<br>- * This program is distributed in the hope that it will be useful,<br>- * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>- * GNU General Public License for more details.<br>- */<br>-<br>-#include <boardid.h><br>-#include <ec/google/chromeec/ec.h><br>-<br>-uint8_t board_id(void)<br>-{<br>-      MAYBE_STATIC int id = -1;<br>-<br>- if (id < 0)<br>-               id = google_chromeec_get_board_version();<br>-<br>- return id;<br>-}<br>diff --git a/src/mainboard/google/glados/Kconfig b/src/mainboard/google/glados/Kconfig<br>index 254e54a..1a19fd1 100644<br>--- a/src/mainboard/google/glados/Kconfig<br>+++ b/src/mainboard/google/glados/Kconfig<br>@@ -7,6 +7,7 @@<br>  select DRIVERS_I2C_GENERIC<br>    select DRIVERS_I2C_NAU8825<br>    select EC_GOOGLE_CHROMEEC<br>+    select EC_GOOGLE_CHROMEEC_BOARDID<br>     select EC_GOOGLE_CHROMEEC_ACPI_MEMMAP<br>         select EC_GOOGLE_CHROMEEC_LPC<br>         select EC_GOOGLE_CHROMEEC_MEC<br>diff --git a/src/mainboard/google/glados/Makefile.inc b/src/mainboard/google/glados/Makefile.inc<br>index e52eb7e..9160266 100644<br>--- a/src/mainboard/google/glados/Makefile.inc<br>+++ b/src/mainboard/google/glados/Makefile.inc<br>@@ -17,7 +17,6 @@<br> <br> bootblock-y += bootblock_mainboard.c<br> <br>-romstage-y += boardid.c<br> romstage-y += pei_data.c<br> <br> bootblock-$(CONFIG_CHROMEOS) += chromeos.c<br>@@ -27,7 +26,6 @@<br> <br> ramstage-$(CONFIG_EC_GOOGLE_CHROMEEC) += ec.c<br> <br>-ramstage-y += boardid.c<br> ramstage-y += mainboard.c<br> ramstage-y += pei_data.c<br> ramstage-y += ramstage.c<br>diff --git a/src/mainboard/google/glados/boardid.c b/src/mainboard/google/glados/boardid.c<br>deleted file mode 100644<br>index 4eb9f48..0000000<br>--- a/src/mainboard/google/glados/boardid.c<br>+++ /dev/null<br>@@ -1,28 +0,0 @@<br>-/*<br>- * This file is part of the coreboot project.<br>- *<br>- * Copyright (C) 2015 Google Inc.<br>- * Copyright (C) 2015 Intel Corporation<br>- *<br>- * This program is free software; you can redistribute it and/or modify<br>- * it under the terms of the GNU General Public License as published by<br>- * the Free Software Foundation; version 2 of the License.<br>- *<br>- * This program is distributed in the hope that it will be useful,<br>- * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>- * GNU General Public License for more details.<br>- */<br>-<br>-#include <boardid.h><br>-#include <ec/google/chromeec/ec.h><br>-<br>-uint8_t board_id(void)<br>-{<br>-       MAYBE_STATIC int id = -1;<br>-<br>- if (id < 0)<br>-               id = google_chromeec_get_board_version();<br>-<br>- return id;<br>-}<br>diff --git a/src/mainboard/google/lars/Kconfig b/src/mainboard/google/lars/Kconfig<br>index 24e3880..4a49460 100644<br>--- a/src/mainboard/google/lars/Kconfig<br>+++ b/src/mainboard/google/lars/Kconfig<br>@@ -9,6 +9,7 @@<br>  select DRIVERS_I2C_NAU8825<br>    select EC_GOOGLE_CHROMEEC<br>     select EC_GOOGLE_CHROMEEC_ACPI_MEMMAP<br>+        select EC_GOOGLE_CHROMEEC_BOARDID<br>     select EC_GOOGLE_CHROMEEC_LPC<br>         select EC_GOOGLE_CHROMEEC_MEC<br>         select EC_GOOGLE_CHROMEEC_PD<br>diff --git a/src/mainboard/google/lars/Makefile.inc b/src/mainboard/google/lars/Makefile.inc<br>index cafa12c..c8480f3 100644<br>--- a/src/mainboard/google/lars/Makefile.inc<br>+++ b/src/mainboard/google/lars/Makefile.inc<br>@@ -18,7 +18,6 @@<br> <br> bootblock-y += bootblock_mainboard.c<br> <br>-romstage-y += boardid.c<br> romstage-y += pei_data.c<br> <br> bootblock-$(CONFIG_CHROMEOS) += chromeos.c<br>@@ -28,7 +27,6 @@<br> <br> ramstage-$(CONFIG_EC_GOOGLE_CHROMEEC) += ec.c<br> <br>-ramstage-y += boardid.c<br> ramstage-y += mainboard.c<br> ramstage-y += pei_data.c<br> ramstage-y += ramstage.c<br>diff --git a/src/mainboard/google/lars/boardid.c b/src/mainboard/google/lars/boardid.c<br>deleted file mode 100644<br>index 4eb9f48..0000000<br>--- a/src/mainboard/google/lars/boardid.c<br>+++ /dev/null<br>@@ -1,28 +0,0 @@<br>-/*<br>- * This file is part of the coreboot project.<br>- *<br>- * Copyright (C) 2015 Google Inc.<br>- * Copyright (C) 2015 Intel Corporation<br>- *<br>- * This program is free software; you can redistribute it and/or modify<br>- * it under the terms of the GNU General Public License as published by<br>- * the Free Software Foundation; version 2 of the License.<br>- *<br>- * This program is distributed in the hope that it will be useful,<br>- * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>- * GNU General Public License for more details.<br>- */<br>-<br>-#include <boardid.h><br>-#include <ec/google/chromeec/ec.h><br>-<br>-uint8_t board_id(void)<br>-{<br>-      MAYBE_STATIC int id = -1;<br>-<br>- if (id < 0)<br>-               id = google_chromeec_get_board_version();<br>-<br>- return id;<br>-}<br>diff --git a/src/mainboard/google/poppy/Kconfig b/src/mainboard/google/poppy/Kconfig<br>index 127f8c3..7eb4398 100644<br>--- a/src/mainboard/google/poppy/Kconfig<br>+++ b/src/mainboard/google/poppy/Kconfig<br>@@ -8,6 +8,7 @@<br>      select DRIVERS_I2C_MAX98927<br>   select DRIVERS_SPI_ACPI<br>       select EC_GOOGLE_CHROMEEC<br>+    select EC_GOOGLE_CHROMEEC_BOARDID<br>     select EC_GOOGLE_CHROMEEC_LPC<br>         select HAVE_ACPI_RESUME<br>       select HAVE_ACPI_TABLES<br>diff --git a/src/mainboard/google/poppy/Makefile.inc b/src/mainboard/google/poppy/Makefile.inc<br>index c837acd..133317c 100644<br>--- a/src/mainboard/google/poppy/Makefile.inc<br>+++ b/src/mainboard/google/poppy/Makefile.inc<br>@@ -18,10 +18,8 @@<br> <br> verstage-$(CONFIG_CHROMEOS) += chromeos.c<br> <br>-romstage-y += boardid.c<br> romstage-$(CONFIG_CHROMEOS) += chromeos.c<br> <br>-ramstage-y += boardid.c<br> ramstage-$(CONFIG_CHROMEOS) += chromeos.c<br> ramstage-$(CONFIG_EC_GOOGLE_CHROMEEC) += ec.c<br> ramstage-y += mainboard.c<br>diff --git a/src/mainboard/google/poppy/boardid.c b/src/mainboard/google/poppy/boardid.c<br>deleted file mode 100644<br>index 4607f34..0000000<br>--- a/src/mainboard/google/poppy/boardid.c<br>+++ /dev/null<br>@@ -1,28 +0,0 @@<br>-/*<br>- * This file is part of the coreboot project.<br>- *<br>- * Copyright (C) 2016 Google Inc.<br>- *<br>- * This program is free software; you can redistribute it and/or modify<br>- * it under the terms of the GNU General Public License as published by<br>- * the Free Software Foundation; version 2 of the License.<br>- *<br>- * This program is distributed in the hope that it will be useful,<br>- * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>- * GNU General Public License for more details.<br>- */<br>-<br>-#include <baseboard/variants.h><br>-#include <boardid.h><br>-#include <stddef.h><br>-<br>-uint8_t board_id(void)<br>-{<br>-      MAYBE_STATIC int id = -1;<br>-<br>- if (id < 0)<br>-               id = variant_board_id();<br>-<br>-  return id;<br>-}<br>diff --git a/src/mainboard/google/poppy/variants/baseboard/Makefile.inc b/src/mainboard/google/poppy/variants/baseboard/Makefile.inc<br>index b1f70b1..1d25510 100644<br>--- a/src/mainboard/google/poppy/variants/baseboard/Makefile.inc<br>+++ b/src/mainboard/google/poppy/variants/baseboard/Makefile.inc<br>@@ -1,8 +1,6 @@<br> bootblock-y += gpio.c<br> <br>-romstage-y += boardid.c<br> romstage-y += memory.c<br> <br>-ramstage-y += boardid.c<br> ramstage-y += gpio.c<br> ramstage-y += nhlt.c<br>diff --git a/src/mainboard/google/poppy/variants/baseboard/boardid.c b/src/mainboard/google/poppy/variants/baseboard/boardid.c<br>deleted file mode 100644<br>index 1cb084a..0000000<br>--- a/src/mainboard/google/poppy/variants/baseboard/boardid.c<br>+++ /dev/null<br>@@ -1,22 +0,0 @@<br>-/*<br>- * This file is part of the coreboot project.<br>- *<br>- * Copyright 2017 Google Inc.<br>- *<br>- * This program is free software; you can redistribute it and/or modify<br>- * it under the terms of the GNU General Public License as published by<br>- * the Free Software Foundation; version 2 of the License.<br>- *<br>- * This program is distributed in the hope that it will be useful,<br>- * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>- * GNU General Public License for more details.<br>- */<br>-<br>-#include <baseboard/variants.h><br>-#include <ec/google/chromeec/ec.h><br>-<br>-uint8_t __attribute__((weak)) variant_board_id(void)<br>-{<br>-     return google_chromeec_get_board_version();<br>-}<br>diff --git a/src/mainboard/google/reef/Kconfig b/src/mainboard/google/reef/Kconfig<br>index 41d3dcb..bea7fd0 100644<br>--- a/src/mainboard/google/reef/Kconfig<br>+++ b/src/mainboard/google/reef/Kconfig<br>@@ -9,6 +9,7 @@<br>         select DRIVERS_I2C_HID<br>        select DRIVERS_PS2_KEYBOARD<br>   select EC_GOOGLE_CHROMEEC<br>+    select EC_GOOGLE_CHROMEEC_BOARDID<br>     select EC_GOOGLE_CHROMEEC_LPC<br>         select HAVE_ACPI_RESUME<br>       select HAVE_ACPI_TABLES<br>diff --git a/src/mainboard/google/reef/Makefile.inc b/src/mainboard/google/reef/Makefile.inc<br>index ac654fb..3701a91 100644<br>--- a/src/mainboard/google/reef/Makefile.inc<br>+++ b/src/mainboard/google/reef/Makefile.inc<br>@@ -2,9 +2,7 @@<br> bootblock-y += ec.c<br> <br> romstage-$(CONFIG_CHROMEOS) += chromeos.c<br>-romstage-y += boardid.c<br> <br>-ramstage-y += boardid.c<br> ramstage-$(CONFIG_CHROMEOS) += chromeos.c<br> ramstage-y += ec.c<br> ramstage-y += mainboard.c<br>diff --git a/src/mainboard/google/reef/boardid.c b/src/mainboard/google/reef/boardid.c<br>deleted file mode 100644<br>index f240fca..0000000<br>--- a/src/mainboard/google/reef/boardid.c<br>+++ /dev/null<br>@@ -1,29 +0,0 @@<br>-/*<br>- * This file is part of the coreboot project.<br>- *<br>- * Copyright (C) 2015 Google Inc.<br>- * Copyright (C) 2015 Intel Corporation<br>- *<br>- * This program is free software; you can redistribute it and/or modify<br>- * it under the terms of the GNU General Public License as published by<br>- * the Free Software Foundation; version 2 of the License.<br>- *<br>- * This program is distributed in the hope that it will be useful,<br>- * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>- * GNU General Public License for more details.<br>- */<br>-<br>-#include <baseboard/variants.h><br>-#include <boardid.h><br>-#include <stddef.h><br>-<br>-uint8_t board_id(void)<br>-{<br>-  MAYBE_STATIC int id = -1;<br>-<br>- if (id < 0)<br>-               id = variant_board_id();<br>-<br>-  return id;<br>-}<br>diff --git a/src/mainboard/google/reef/variants/baseboard/Makefile.inc b/src/mainboard/google/reef/variants/baseboard/Makefile.inc<br>index d2d344c..63b03a6 100644<br>--- a/src/mainboard/google/reef/variants/baseboard/Makefile.inc<br>+++ b/src/mainboard/google/reef/variants/baseboard/Makefile.inc<br>@@ -1,9 +1,7 @@<br> bootblock-y += gpio.c<br> <br>-romstage-y += boardid.c<br> romstage-y += memory.c<br> <br>-ramstage-y += boardid.c<br> ramstage-y += gpio.c<br> ramstage-y += nhlt.c<br> <br>diff --git a/src/mainboard/google/reef/variants/baseboard/boardid.c b/src/mainboard/google/reef/variants/baseboard/boardid.c<br>deleted file mode 100644<br>index 26f1588..0000000<br>--- a/src/mainboard/google/reef/variants/baseboard/boardid.c<br>+++ /dev/null<br>@@ -1,22 +0,0 @@<br>-/*<br>- * This file is part of the coreboot project.<br>- *<br>- * Copyright 2016 Google Inc.<br>- *<br>- * This program is free software; you can redistribute it and/or modify<br>- * it under the terms of the GNU General Public License as published by<br>- * the Free Software Foundation; version 2 of the License.<br>- *<br>- * This program is distributed in the hope that it will be useful,<br>- * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>- * GNU General Public License for more details.<br>- */<br>-<br>-#include <baseboard/variants.h><br>-#include <ec/google/chromeec/ec.h><br>-<br>-uint8_t __attribute__((weak)) variant_board_id(void)<br>-{<br>- return google_chromeec_get_board_version();<br>-}<br>diff --git a/src/mainboard/intel/kunimitsu/Kconfig b/src/mainboard/intel/kunimitsu/Kconfig<br>index 71b465d..49991b8 100644<br>--- a/src/mainboard/intel/kunimitsu/Kconfig<br>+++ b/src/mainboard/intel/kunimitsu/Kconfig<br>@@ -9,6 +9,7 @@<br>         select DRIVERS_I2C_NAU8825<br>    select EC_GOOGLE_CHROMEEC<br>     select EC_GOOGLE_CHROMEEC_ACPI_MEMMAP<br>+        select EC_GOOGLE_CHROMEEC_BOARDID<br>     select EC_GOOGLE_CHROMEEC_LPC<br>         select EC_GOOGLE_CHROMEEC_MEC<br>         select EC_GOOGLE_CHROMEEC_PD<br>diff --git a/src/mainboard/intel/kunimitsu/Makefile.inc b/src/mainboard/intel/kunimitsu/Makefile.inc<br>index 86be420..dc4b83c 100644<br>--- a/src/mainboard/intel/kunimitsu/Makefile.inc<br>+++ b/src/mainboard/intel/kunimitsu/Makefile.inc<br>@@ -18,7 +18,6 @@<br> <br> bootblock-y += bootblock_mainboard.c<br> <br>-romstage-y += boardid.c<br> romstage-y += pei_data.c<br> <br> bootblock-$(CONFIG_CHROMEOS) += chromeos.c<br>@@ -28,7 +27,6 @@<br> <br> ramstage-$(CONFIG_EC_GOOGLE_CHROMEEC) += ec.c<br> <br>-ramstage-y += boardid.c<br> ramstage-y += mainboard.c<br> ramstage-y += pei_data.c<br> ramstage-y += ramstage.c<br>diff --git a/src/mainboard/intel/kunimitsu/boardid.c b/src/mainboard/intel/kunimitsu/boardid.c<br>deleted file mode 100644<br>index 4eb9f48..0000000<br>--- a/src/mainboard/intel/kunimitsu/boardid.c<br>+++ /dev/null<br>@@ -1,28 +0,0 @@<br>-/*<br>- * This file is part of the coreboot project.<br>- *<br>- * Copyright (C) 2015 Google Inc.<br>- * Copyright (C) 2015 Intel Corporation<br>- *<br>- * This program is free software; you can redistribute it and/or modify<br>- * it under the terms of the GNU General Public License as published by<br>- * the Free Software Foundation; version 2 of the License.<br>- *<br>- * This program is distributed in the hope that it will be useful,<br>- * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>- * GNU General Public License for more details.<br>- */<br>-<br>-#include <boardid.h><br>-#include <ec/google/chromeec/ec.h><br>-<br>-uint8_t board_id(void)<br>-{<br>-  MAYBE_STATIC int id = -1;<br>-<br>- if (id < 0)<br>-               id = google_chromeec_get_board_version();<br>-<br>- return id;<br>-}<br>diff --git a/src/mainboard/intel/strago/Kconfig b/src/mainboard/intel/strago/Kconfig<br>index 44ca249..bef0e63 100644<br>--- a/src/mainboard/intel/strago/Kconfig<br>+++ b/src/mainboard/intel/strago/Kconfig<br>@@ -4,6 +4,7 @@<br>      def_bool y<br>    select BOARD_ROMSIZE_KB_8192<br>  select EC_GOOGLE_CHROMEEC<br>+    select EC_GOOGLE_CHROMEEC_BOARDID<br>     select EC_GOOGLE_CHROMEEC_MEC<br>         select EC_GOOGLE_CHROMEEC_ACPI_MEMMAP<br>         select ENABLE_BUILTIN_COM1<br>diff --git a/src/mainboard/intel/strago/Makefile.inc b/src/mainboard/intel/strago/Makefile.inc<br>index 5ba7bcc..bbef8b9 100644<br>--- a/src/mainboard/intel/strago/Makefile.inc<br>+++ b/src/mainboard/intel/strago/Makefile.inc<br>@@ -14,11 +14,9 @@<br> ## GNU General Public License for more details.<br> ##<br> <br>-romstage-y += boardid.c<br> romstage-$(CONFIG_MAINBOARD_HAS_CHROMEOS) += chromeos.c<br> romstage-$(CONFIG_ENABLE_BUILTIN_COM1) += com_init.c<br> <br>-ramstage-y += boardid.c<br> ramstage-$(CONFIG_MAINBOARD_HAS_CHROMEOS) += chromeos.c<br> ramstage-$(CONFIG_MAINBOARD_HAS_CHROMEOS) += ec.c<br> ramstage-$(CONFIG_MAINBOARD_HAS_CHROMEOS) += gpio.c<br>diff --git a/src/mainboard/intel/strago/boardid.c b/src/mainboard/intel/strago/boardid.c<br>deleted file mode 100644<br>index b531778..0000000<br>--- a/src/mainboard/intel/strago/boardid.c<br>+++ /dev/null<br>@@ -1,30 +0,0 @@<br>-/*<br>- * This file is part of the coreboot project.<br>- *<br>- * Copyright(C) 2013 Google Inc.<br>- * Copyright (C) 2015 Intel Corp.<br>- *<br>- * This program is free software; you can redistribute it and/or modify<br>- * it under the terms of the GNU General Public License as published by<br>- * the Free Software Foundation; version 2 of the License.<br>- *<br>- * This program is distributed in the hope that it will be useful,<br>- * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>- * GNU General Public License for more details.<br>- */<br>-<br>-#include <boardid.h><br>-#include <stdlib.h><br>-#include "ec/google/chromeec/ec.h"<br>-<br>-uint8_t board_id(void)<br>-{<br>-        MAYBE_STATIC int id = -1;<br>-<br>-#if IS_ENABLED(CONFIG_EC_GOOGLE_CHROMEEC)<br>-     if (id < 0)<br>-               id = google_chromeec_get_board_version();<br>-#endif<br>-   return id;<br>-}<br></pre><p>To view, visit <a href="https://review.coreboot.org/21682">change 21682</a>. To unsubscribe, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/21682"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I1671c0a0b87d0c4c45da5340e8f17a4a798317ca </div>
<div style="display:none"> Gerrit-Change-Number: 21682 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Furquan Shaikh <furquan@google.com> </div>