hatch: Add support for Kohaku

BUG=b:131265296
TEST=build mosys and test on Hatch_whl, the correct ROM size is
returned.

Change-Id: I2ec11d6f1a13d256b6548914e182ea43e19b1e86
Reviewed-on: https://chromium-review.googlesource.com/1584404
Commit-Ready: Philip Chen <philipchen@chromium.org>
Tested-by: Philip Chen <philipchen@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
diff --git a/platform/hatch/eeprom.c b/platform/hatch/eeprom.c
index 74f4ec3..f585653 100644
--- a/platform/hatch/eeprom.c
+++ b/platform/hatch/eeprom.c
@@ -47,7 +47,14 @@
 
 static int host_firmware_size(struct platform_intf *intf)
 {
-	return HATCH_HOST_FIRMWARE_ROM_SIZE;
+	const char *smbios_name;
+
+	smbios_name = smbios_sysinfo_get_name(intf);
+
+	if (!strcmp(smbios_name, "Hatch") || !strcmp(smbios_name, "Hatch_whl"))
+		return HATCH_HOST_FIRMWARE_ROM_SIZE_32MB;
+
+	return HATCH_HOST_FIRMWARE_ROM_SIZE_16MB;
 }
 
 static int host_firmware_read(struct platform_intf *intf,
diff --git a/platform/hatch/hatch.c b/platform/hatch/hatch.c
index 963f98e..a7ec4cc 100644
--- a/platform/hatch/hatch.c
+++ b/platform/hatch/hatch.c
@@ -59,7 +59,7 @@
 	NULL
 };
 
-static const char *platform_names = "Hatch,Hatch_whl";
+static const char *platform_names = "Hatch,Hatch_whl,Kohaku";
 
 int hatch_probe(struct platform_intf *intf)
 {
diff --git a/platform/hatch/hatch.h b/platform/hatch/hatch.h
index 807691e..4ef6115 100644
--- a/platform/hatch/hatch.h
+++ b/platform/hatch/hatch.h
@@ -35,7 +35,8 @@
 #include <inttypes.h>
 #include "mosys/platform.h"
 
-#define HATCH_HOST_FIRMWARE_ROM_SIZE		(32768 * 1024)
+#define HATCH_HOST_FIRMWARE_ROM_SIZE_32MB	(32768 * 1024)
+#define HATCH_HOST_FIRMWARE_ROM_SIZE_16MB	(16384 * 1024)
 
 /* platform callbacks */
 extern struct eeprom_cb hatch_eeprom_cb;	/* eeprom.c */