Kconfig: Remove BOARD_ID_MANUAL option

The BOARD_ID_MANUAL and BOARD_ID_STRING options were introduced for the
Urara board which is now long dead, and have never been used anywhere
else. They were trying to do something that we usually handle with a
separate SKU ID these days, whereas BOARD_ID is supposed to be reserved
for different revisions of the same board/SKU. Get rid of it to make
further refactoring of other options easier.

Also shove some stuff back into the Urara mainboard that should've never
crept into generic headers.

Change-Id: I4e7018066eadb38bced96d8eca2ffd4f0dd17110
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/22694
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
diff --git a/Makefile.inc b/Makefile.inc
index 4473bf5..f93b4bd 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -999,13 +999,6 @@
 bootsplash$(BOOTSPLASH_SUFFIX)-file := $(call strip_quotes,$(CONFIG_BOOTSPLASH_FILE))
 bootsplash$(BOOTSPLASH_SUFFIX)-type := bootsplash
 
-cbfs-files-$(CONFIG_BOARD_ID_MANUAL) += board_id
-board_id-file := $(obj)/board_id
-board_id-type := raw
-
-$(obj)/board_id:
-	printf $(CONFIG_BOARD_ID_STRING) > $@
-
 # Ensure that no payload segment overlaps with memory regions used by ramstage
 # (not for x86 since it can relocate itself in that case)
 ifneq ($(CONFIG_ARCH_X86),y)
diff --git a/src/Kconfig b/src/Kconfig
index 8873ec8..bc8f059 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -236,14 +236,6 @@
 
 	  If unsure, select 'N'
 
-config BOARD_ID_STRING
-	string "Board ID"
-	# Default value set at the end of the file
-	depends on BOARD_ID_MANUAL
-	help
-	  This string is placed in the 'board_id' CBFS file for indicating
-	  board type.
-
 config RAM_CODE_SUPPORT
 	bool
 	help
@@ -1222,16 +1214,6 @@
 	  Mainboards that can read a board ID from the hardware straps
 	  (ie. GPIO) select this configuration option.
 
-config BOARD_ID_MANUAL
-	bool
-	default n
-	depends on !BOARD_ID_AUTO
-	help
-	  If you want to maintain a board ID, but the hardware does not
-	  have straps to automatically determine the ID, you can say Y
-	  here and add a file named 'board_id' to CBFS. If you don't know
-	  what this is about, say N.
-
 config BOOTBLOCK_CUSTOM
 	# To be selected by arch, SoC or mainboard if it does not want use the normal
 	# src/lib/bootblock.c#main() C entry point.
@@ -1256,10 +1238,6 @@
 config INCLUDE_CONFIG_FILE
 	default y
 
-config BOARD_ID_STRING
-	default "(none)"
-	depends on BOARD_ID_MANUAL
-
 config BOOTSPLASH_FILE
 	depends on BOOTSPLASH_IMAGE
 	default "bootsplash.jpg"
diff --git a/src/include/boardid.h b/src/include/boardid.h
index 6bb2c18..121d052 100644
--- a/src/include/boardid.h
+++ b/src/include/boardid.h
@@ -18,11 +18,6 @@
 
 #include <stdint.h>
 
-struct board_hw {
-	uint8_t i2c_interface;
-};
-
-const struct board_hw *board_get_hw(void);
 uint8_t board_id(void);
 uint32_t ram_code(void);
 
diff --git a/src/lib/coreboot_table.c b/src/lib/coreboot_table.c
index f152f34..29dd53a 100644
--- a/src/lib/coreboot_table.c
+++ b/src/lib/coreboot_table.c
@@ -246,7 +246,7 @@
 
 static void lb_board_id(struct lb_header *header)
 {
-#if IS_ENABLED(CONFIG_BOARD_ID_AUTO) || IS_ENABLED(CONFIG_BOARD_ID_MANUAL)
+#if IS_ENABLED(CONFIG_BOARD_ID_AUTO)
 	struct lb_board_id  *bid;
 
 	bid = (struct lb_board_id *)lb_new_record(header);
diff --git a/src/mainboard/google/urara/Kconfig b/src/mainboard/google/urara/Kconfig
index 06263d5..3d415c4 100644
--- a/src/mainboard/google/urara/Kconfig
+++ b/src/mainboard/google/urara/Kconfig
@@ -24,7 +24,6 @@
 	select CPU_IMGTEC_PISTACHIO
 	select COMMON_CBFS_SPI_WRAPPER
 	select SPI_FLASH
-	select BOARD_ID_MANUAL
 
 config MAINBOARD_DIR
 	string
diff --git a/src/mainboard/google/urara/bootblock.c b/src/mainboard/google/urara/bootblock.c
index 121f35d..2b5a48a 100644
--- a/src/mainboard/google/urara/bootblock.c
+++ b/src/mainboard/google/urara/bootblock.c
@@ -20,6 +20,8 @@
 #include <assert.h>
 #include <boardid.h>
 
+#include "urara_boardid.h"
+
 #define PADS_FUNCTION_SELECT0_ADDR	(0xB8101C00 + 0xC0)
 
 #define GPIO_BIT_EN_ADDR(bank)		(0xB8101C00 + 0x200 + (0x24 * (bank)))
diff --git a/src/mainboard/google/urara/urara_boardid.h b/src/mainboard/google/urara/urara_boardid.h
index e638555..bc61085 100644
--- a/src/mainboard/google/urara/urara_boardid.h
+++ b/src/mainboard/google/urara/urara_boardid.h
@@ -27,4 +27,10 @@
 #define URARA_BOARD_ID_KENNET	4
 #define URARA_BOARD_ID_SPACE	5
 
+struct board_hw {
+	uint8_t i2c_interface;
+};
+
+const struct board_hw *board_get_hw(void);
+
 #endif