diff options
author | Jack Rosenthal <jrosenth@chromium.org> | 2020-09-23 08:38:17 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-10-01 19:14:39 +0000 |
commit | a122cd9c34a4a99656050aeddbc4acd28e295fe7 (patch) | |
tree | 336c46085a2738f37b22ffb4a2d95cf9d1de1f81 | |
parent | ee4037ea734103169bd1cae24ab3b6a5e2e71f67 (diff) | |
download | chrome-ec-a122cd9c34a4a99656050aeddbc4acd28e295fe7.tar.gz |
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 <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2427098
Reviewed-by: Jett Rink <jettrink@chromium.org>
-rw-r--r-- | zephyr/shim/include/board.h | 11 | ||||
-rw-r--r-- | zephyr/shim/include/config_chip.h | 22 |
2 files changed, 33 insertions, 0 deletions
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 */ |