Drop support for cheza

Project was cancelled and never launched.

BUG=b:187788563
TEST=compiles

Change-Id: I0da8a39b6fb5c2fb5b700dc0d5d4b8aafe8f7de9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/mosys/+/3072104
Tested-by: Jack Rosenthal <jrosenth@chromium.org>
Auto-Submit: Jack Rosenthal <jrosenth@chromium.org>
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
diff --git a/platform/aarch64/cheza b/platform/aarch64/cheza
deleted file mode 120000
index d1754fc..0000000
--- a/platform/aarch64/cheza
+++ /dev/null
@@ -1 +0,0 @@
-../arm/cheza
\ No newline at end of file
diff --git a/platform/aarch64/meson.build b/platform/aarch64/meson.build
index d89f143..e59ad53 100644
--- a/platform/aarch64/meson.build
+++ b/platform/aarch64/meson.build
@@ -11,7 +11,6 @@
 #   placed under here, not under platform/arm/.
 
 if use_cros_config
-  subdir('cheza')
   subdir('kukui')
   subdir('trogdor')
 endif
diff --git a/platform/arm/cheza/cheza.c b/platform/arm/cheza/cheza.c
deleted file mode 100644
index ada2c50..0000000
--- a/platform/arm/cheza/cheza.c
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright 2018, 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 "cheza.h"
-#include "drivers/google/cros_ec.h"
-#include "lib/cros_config.h"
-#include "lib/fdt.h"
-#include "lib/file.h"
-#include "lib/math.h"
-#include "lib/probe.h"
-#include "lib/sku.h"
-#include "mosys/command_list.h"
-#include "mosys/platform.h"
-#include "mosys/intf_list.h"
-#include "mosys/log.h"
-
-static struct platform_cmd *cheza_sub[] = {
-	&cmd_ec,
-	&cmd_memory,
-	&cmd_platform,
-	&cmd_eventlog,
-	NULL
-};
-
-static int cheza_probe(struct platform_intf *intf)
-{
-	static const char* platform_arr[] = {"cheza", NULL};
-	static struct sku_info sku_info;
-
-	int ret = cros_config_read_sku_info_fdt(intf, platform_arr, &sku_info);
-	/* If there was no error, indicate that we found a match */
-	if (!ret) {
-		intf->sku_info = &sku_info;
-		return 1;
-	}
-
-	return ret;
-}
-
-static struct platform_cb cheza_cb = {
-	.ec		= &cros_ec_cb,
-	.memory		= &cheza_memory_cb,
-	.sys		= &fdt_sysinfo_cb,
-};
-
-static struct platform_intf platform_cheza = {
-	.type		= PLATFORM_ARMV8,
-	.sub		= cheza_sub,
-	.cb		= &cheza_cb,
-	.probe		= &cheza_probe,
-};
-REGISTER_PLATFORM(platform_cheza, "Cheza");
diff --git a/platform/arm/cheza/cheza.h b/platform/arm/cheza/cheza.h
deleted file mode 100644
index c248f2f..0000000
--- a/platform/arm/cheza/cheza.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright 2018, 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 GOOGLE_CHEZA_H
-#define GOOGLE_CHEZA_H
-
-#include <inttypes.h>
-#include "mosys/platform.h"
-
-#define CHEZA_HOST_FIRMWARE_ROM_SIZE		(8192 * 1024)
-
-/* platform callbacks */
-extern struct memory_cb cheza_memory_cb;
-
-#endif /* GOOGLE_CHEZA_H */
diff --git a/platform/arm/cheza/memory.c b/platform/arm/cheza/memory.c
deleted file mode 100644
index a2f7af1..0000000
--- a/platform/arm/cheza/memory.c
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright 2018, 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 "lib/fdt.h"
-#include "lib/nonspd.h"
-
-#include "mosys/log.h"
-#include "mosys/platform.h"
-
-#include "cheza.h"
-
-static int cheza_dimm_count;
-static const struct nonspd_mem_info *cheza_mem_info;
-
-/* read RAM code and fill in values needed by memory commands */
-static int read_ram_code(struct platform_intf *intf)
-{
-	static int done;
-	static int ret;
-	uint32_t ram_code;
-
-	if (done)
-		return ret;
-
-	if (fdt_get_ram_code(&ram_code) < 0) {
-		lprintf(LOG_ERR, "Unable to obtain RAM code.\n");
-		return -1;
-	}
-
-	switch (ram_code) {
-	case 0:
-		cheza_dimm_count = 1;
-		cheza_mem_info = &samsung_lpddr4_k3uh5h50mm_agcj;
-		break;
-	default:
-		lprintf(LOG_ERR, "Unknown ram code.\n");
-		ret = -1;
-		break;
-	}
-
-	done = 1;
-	return ret;
-}
-
-/*
- * dimm_count  -  return total number of dimm slots
- *
- * @intf:       platform interface
- *
- * returns dimm slot count
- */
-static int dimm_count(struct platform_intf *intf)
-{
-	if (read_ram_code(intf) < 0)
-		return -1;
-
-	return cheza_dimm_count;
-}
-
-static int get_mem_info(struct platform_intf *intf, int dimm,
-			const struct nonspd_mem_info **info)
-{
-	if (read_ram_code(intf) < 0)
-		return -1;
-
-	*info = cheza_mem_info;
-	return 0;
-}
-
-struct memory_cb cheza_memory_cb = {
-	.dimm_count		= &dimm_count,
-	.nonspd_mem_info	= &get_mem_info,
-};
diff --git a/platform/arm/cheza/meson.build b/platform/arm/cheza/meson.build
deleted file mode 100644
index ac93828..0000000
--- a/platform/arm/cheza/meson.build
+++ /dev/null
@@ -1,4 +0,0 @@
-platform_support_src += files(
-  'memory.c',
-  'cheza.c',
-)
diff --git a/platform/arm/meson.build b/platform/arm/meson.build
index 9d5b2c8..058a17c 100644
--- a/platform/arm/meson.build
+++ b/platform/arm/meson.build
@@ -1,7 +1,6 @@
 if use_cros_config
   subdir('asurada')
   subdir('cherry')
-  subdir('cheza')
   subdir('kukui')
   subdir('trogdor')
 else