cyan: merge into Strago intf
Cyan is a strago, just combine the platforms.
BUG=b:174770233
TEST="mosys platform model" on cyan
Change-Id: I50b9622591eabcc38c2646e211229319b81e392f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/mosys/+/2572023
Tested-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: C Shapiro <shapiroc@chromium.org>
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
diff --git a/platform/x86_64/cyan/cyan.c b/platform/x86_64/cyan/cyan.c
deleted file mode 100644
index 5b1b110..0000000
--- a/platform/x86_64/cyan/cyan.c
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Copyright 2013, Google Inc.
- * All rights reserved.
- *
- * 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 <stdlib.h>
-#include <unistd.h>
-
-#include "lib/elog.h"
-#include "lib/memory.h"
-#include "lib/probe.h"
-#include "lib/smbios.h"
-
-#include "mosys/alloc.h"
-#include "mosys/command_list.h"
-#include "mosys/platform.h"
-#include "mosys/intf_list.h"
-#include "mosys/log.h"
-
-#include "drivers/google/cros_ec.h"
-
-#include "cyan.h"
-
-struct probe_ids {
- const char *names[2];
- const char *frids[2];
-};
-
-static const struct probe_ids probe_id_list[] = {
- { { "Cyan", NULL },
- { "Google_Cyan", NULL },
- },
- { { NULL } }
-};
-
-static struct platform_cmd *cyan_sub[] = {
- &cmd_ec,
- &cmd_memory,
- &cmd_platform,
- &cmd_eventlog,
- NULL
-};
-
-static int cyan_probe(struct platform_intf *intf)
-{
- static int status = 0, probed = 0;
- const struct probe_ids *pid;
-
- if (probed)
- return status;
-
- for (pid = probe_id_list; pid && pid->names[0]; pid++) {
- /* FRID */
- if ((status = probe_frid(pid->frids)))
- goto exit;
-
- /* SMBIOS */
- if ((status = probe_smbios(intf, pid->names)))
- goto exit;
- }
- return 0;
-
-exit:
- probed = 1;
- /* Update canonical platform name */
- intf->name = pid->names[0];
- return status;
-}
-
-static struct eventlog_cb cyan_eventlog_cb = {
- .print_type = &elog_print_type,
- .print_data = &elog_print_data,
- .print_multi = &elog_print_multi,
- .verify = &elog_verify,
- .verify_header = &elog_verify_header,
- .fetch = &elog_fetch_from_smbios,
-};
-
-static struct platform_cb cyan_cb = {
- .ec = &cros_ec_cb,
- .memory = &smbios_memory_cb,
- .sys = &cyan_sys_cb,
- .eventlog = &cyan_eventlog_cb,
-};
-
-static struct platform_intf platform_cyan = {
- .type = PLATFORM_X86_64,
- .sub = cyan_sub,
- .cb = &cyan_cb,
- .probe = &cyan_probe,
-};
-REGISTER_PLATFORM(platform_cyan, "cyan");
diff --git a/platform/x86_64/cyan/cyan.h b/platform/x86_64/cyan/cyan.h
deleted file mode 100644
index 5963ad1..0000000
--- a/platform/x86_64/cyan/cyan.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright 2013, Google Inc.
- * All rights reserved.
- *
- * 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 PLATFORM_CYAN_H__
-#define PLATFORM_CYAN_H__
-
-#include <inttypes.h>
-#include "mosys/platform.h"
-
-/* platform callbacks */
-extern struct sys_cb cyan_sys_cb; /* sys.c */
-
-#endif /* PLATFORM_CYAN_H__ */
diff --git a/platform/x86_64/cyan/meson.build b/platform/x86_64/cyan/meson.build
deleted file mode 100644
index e2cc120..0000000
--- a/platform/x86_64/cyan/meson.build
+++ /dev/null
@@ -1,4 +0,0 @@
-platform_support_src += files(
- 'cyan.c',
- 'sys.c',
-)
diff --git a/platform/x86_64/cyan/sys.c b/platform/x86_64/cyan/sys.c
deleted file mode 100644
index f5de948..0000000
--- a/platform/x86_64/cyan/sys.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright 2013, Google Inc.
- * All rights reserved.
- *
- * 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 "drivers/google/cros_ec.h"
-#include "lib/smbios.h"
-#include "mosys/platform.h"
-
-#include "cyan.h"
-
-struct sys_cb cyan_sys_cb = {
- .version = &cros_ec_board_version_str,
- .vendor = &smbios_sysinfo_get_vendor,
-};
diff --git a/platform/x86_64/meson.build b/platform/x86_64/meson.build
index 2097dfb..fc92661 100644
--- a/platform/x86_64/meson.build
+++ b/platform/x86_64/meson.build
@@ -12,7 +12,6 @@
subdir('zork')
else
subdir('auron')
- subdir('cyan')
subdir('glados')
subdir('jecht')
subdir('rambi')
diff --git a/platform/x86_64/strago/strago.c b/platform/x86_64/strago/strago.c
index 82366ad..3055222 100644
--- a/platform/x86_64/strago/strago.c
+++ b/platform/x86_64/strago/strago.c
@@ -59,6 +59,9 @@
{ { "Celes", NULL },
{ "Celes", NULL },
},
+ { { "Cyan", NULL },
+ { "Google_Cyan", NULL },
+ },
{ { "Edgar", NULL },
{ "Edgar", NULL },
},