From a122cd9c34a4a99656050aeddbc4acd28e295fe7 Mon Sep 17 00:00:00 2001 From: Jack Rosenthal Date: Wed, 23 Sep 2020 08:38:17 -0600 Subject: zephyr: provide compatible config_chip.h and board.h files These include files are expected by the EC config system. For board.h, we intentionally leave it empty. For config_chip.h, we populate it with preprocessor guards that translate Zephyr config options to EC config options, and enable/disable some defaults for Zephyr. BUG=chromium:167590251 BRANCH=none TEST=compile common/timer.c with follow-up CLs Change-Id: I2294c6a296f69ae8d514b74ea29f288fe4a240fc Signed-off-by: Jack Rosenthal Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2427098 Reviewed-by: Jett Rink --- zephyr/shim/include/board.h | 11 +++++++++++ zephyr/shim/include/config_chip.h | 22 ++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 zephyr/shim/include/board.h create mode 100644 zephyr/shim/include/config_chip.h diff --git a/zephyr/shim/include/board.h b/zephyr/shim/include/board.h new file mode 100644 index 0000000000..01f9344a8a --- /dev/null +++ b/zephyr/shim/include/board.h @@ -0,0 +1,11 @@ +/* Copyright 2020 The Chromium OS Authors. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#ifndef __BOARD_H +#define __BOARD_H + +/* Intentionally empty. */ + +#endif /* __BOARD_H */ diff --git a/zephyr/shim/include/config_chip.h b/zephyr/shim/include/config_chip.h new file mode 100644 index 0000000000..0929b20031 --- /dev/null +++ b/zephyr/shim/include/config_chip.h @@ -0,0 +1,22 @@ +/* Copyright 2020 The Chromium OS Authors. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#ifndef __CROS_EC_CONFIG_CHIP_H +#define __CROS_EC_CONFIG_CHIP_H + +/* + * This file translates Kconfig options to platform/ec options. + * + * Options which are from Zephyr platform/ec module (Kconfig) start + * with CONFIG_PLATFORM_EC_, and can be found in the Kconfig file. + * + * Options which are for the platform/ec configuration can be found in + * common/config.h. + */ + +#define CONFIG_ZEPHYR +#define CHROMIUM_EC + +#endif /* __CROS_EC_CONFIG_CHIP_H */ -- cgit v1.2.1