sarien: Add empty wilco ec handling

Sarien was set to use the cros_ec callbacks, which will not work
on this platform.

As a placeholder provide a wilco_ec callback that returns hardcoded
values.  Eventually this will be able to read from sysfs but the
kernel code is not yet landed.

This is required for FAFT testing.

BUG=b:121380403
BRANCH=none
TEST=manual:
localhost$ mosys ec info
google | wilco | 0.0.0

Change-Id: Ifccf70191bc5fc90708900ea312e29b56c75e770
Signed-off-by: Duncan Laurie <dlaurie@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1413931
Reviewed-by: Simon Glass <sjg@chromium.org>
diff --git a/drivers/google/meson.build b/drivers/google/meson.build
index df176b9..330fe4b 100644
--- a/drivers/google/meson.build
+++ b/drivers/google/meson.build
@@ -5,4 +5,5 @@
   'cros_ec_dev.c',
   'cros_ec_cb.c',
   'cros_ec_lock.c',
+  'wilco_ec.c'
 )
diff --git a/drivers/google/wilco_ec.c b/drivers/google/wilco_ec.c
new file mode 100644
index 0000000..2266004
--- /dev/null
+++ b/drivers/google/wilco_ec.c
@@ -0,0 +1,58 @@
+/*
+ * Copyright 2019 Google LLC
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *    * Redistributions of source code must retain the above copyright
+ *      notice, this list of conditions and the following disclaimer.
+ *    * Redistributions in binary form must reproduce the above
+ *      copyright notice, this list of conditions and the following
+ *      disclaimer in the documentation and/or other materials provided
+ *      with the distribution.
+ *    * Neither the name of Google Inc. nor the names of its
+ *      contributors may be used to endorse or promote products derived
+ *      from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "mosys/callbacks.h"
+#include "mosys/platform.h"
+
+#define WILCO_EC_NAME "wilco"
+#define WILCO_EC_VENDOR "google"
+#define WILCO_EC_VERSION "0.0.0"
+
+static const char *wilco_ec_name(struct platform_intf *intf, struct ec_cb *ec)
+{
+	return WILCO_EC_NAME;
+}
+
+static const char *wilco_ec_vendor(struct platform_intf *intf, struct ec_cb *ec)
+{
+	return WILCO_EC_VENDOR;
+}
+
+static const char *wilco_ec_fw_version(struct platform_intf *intf,
+		struct ec_cb *ec)
+{
+	return WILCO_EC_VERSION;
+}
+
+struct ec_cb wilco_ec_cb = {
+	.vendor		= wilco_ec_vendor,
+	.name		= wilco_ec_name,
+	.fw_version	= wilco_ec_fw_version,
+};
diff --git a/include/drivers/google/wilco_ec.h b/include/drivers/google/wilco_ec.h
new file mode 100644
index 0000000..79954b5
--- /dev/null
+++ b/include/drivers/google/wilco_ec.h
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2019 Google LLC
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *    * Redistributions of source code must retain the above copyright
+ *      notice, this list of conditions and the following disclaimer.
+ *    * Redistributions in binary form must reproduce the above
+ *      copyright notice, this list of conditions and the following
+ *      disclaimer in the documentation and/or other materials provided
+ *      with the distribution.
+ *    * Neither the name of Google Inc. nor the names of its
+ *      contributors may be used to endorse or promote products derived
+ *      from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef MOSYS_DRIVERS_GOOGLE_WILCO_EC_H__
+#define MOSYS_DRIVERS_GOOGLE_WILCO_EC_H__
+
+extern struct ec_cb wilco_ec_cb;
+
+#endif	/* MOSYS_DRIVERS_GOOGLE_WILCO_EC__ */
diff --git a/platform/sarien/sarien.c b/platform/sarien/sarien.c
index f691c6c..7928340 100644
--- a/platform/sarien/sarien.c
+++ b/platform/sarien/sarien.c
@@ -40,7 +40,7 @@
 #include "mosys/intf_list.h"
 #include "mosys/log.h"
 
-#include "drivers/google/cros_ec.h"
+#include "drivers/google/wilco_ec.h"
 
 #include "lib/cros_config.h"
 #include "lib/smbios.h"
@@ -99,7 +99,7 @@
 };
 
 struct platform_cb sarien_cb = {
-	.ec		= &cros_ec_cb,
+	.ec		= &wilco_ec_cb,
 	.eeprom		= &sarien_eeprom_cb,
 	.memory		= &sarien_memory_cb,
 	.nvram		= &sarien_nvram_cb,