diff options
author | Jack Rosenthal <jrosenth@chromium.org> | 2021-08-18 18:06:09 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-08-19 06:44:51 +0000 |
commit | 493627b22c604a0b37f43ba027d1c480beb8d404 (patch) | |
tree | 045df76896b567b31e565f6321e25dd24cbe0ed7 /zephyr | |
parent | ac98121c135d4c2c115fc2c781ad9d7924ddf175 (diff) | |
download | chrome-ec-493627b22c604a0b37f43ba027d1c480beb8d404.tar.gz |
zephyr: drop IS_ZEPHYR_VERSION usages from npcx espi driver
This code was added after v2.5 was already dropped from the tree.
These macros are not necessary.
BUG=b:197159539
BRANCH=none
TEST=zmake testall
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: Idbbf3d6431542a707f5abe954b56838a4b18403b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3104787
Commit-Queue: Yuval Peress <peress@chromium.org>
Reviewed-by: Yuval Peress <peress@chromium.org>
Diffstat (limited to 'zephyr')
-rw-r--r-- | zephyr/shim/chip/npcx/espi.c | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/zephyr/shim/chip/npcx/espi.c b/zephyr/shim/chip/npcx/espi.c index 7668359686..2115f388d6 100644 --- a/zephyr/shim/chip/npcx/espi.c +++ b/zephyr/shim/chip/npcx/espi.c @@ -6,73 +6,48 @@ #include <device.h> #include <sys/util.h> -#include "cros_version.h" #include "drivers/espi.h" #include "soc_espi.h" #include "zephyr_espi_shim.h" bool is_acpi_command(uint32_t data) { -#if IS_ZEPHYR_VERSION(2, 6) struct espi_evt_data_acpi *acpi = (struct espi_evt_data_acpi *)&data; return acpi->type; -#elif IS_ZEPHYR_VERSION(2, 5) - return (data >> NPCX_ACPI_TYPE_POS) & 0x01; -#endif } uint32_t get_acpi_value(uint32_t data) { -#if IS_ZEPHYR_VERSION(2, 6) struct espi_evt_data_acpi *acpi = (struct espi_evt_data_acpi *)&data; return acpi->data; -#elif IS_ZEPHYR_VERSION(2, 5) - return (data >> NPCX_ACPI_DATA_POS) & 0xff; -#endif } bool is_8042_ibf(uint32_t data) { -#if IS_ZEPHYR_VERSION(2, 6) struct espi_evt_data_kbc *kbc = (struct espi_evt_data_kbc *)&data; return kbc->evt & HOST_KBC_EVT_IBF; -#elif IS_ZEPHYR_VERSION(2, 5) - return (data >> NPCX_8042_EVT_POS) & NPCX_8042_EVT_IBF; -#endif } bool is_8042_obe(uint32_t data) { -#if IS_ZEPHYR_VERSION(2, 6) struct espi_evt_data_kbc *kbc = (struct espi_evt_data_kbc *)&data; return kbc->evt & HOST_KBC_EVT_OBE; -#elif IS_ZEPHYR_VERSION(2, 5) - return (data >> NPCX_8042_EVT_POS) & NPCX_8042_EVT_OBE; -#endif } uint32_t get_8042_type(uint32_t data) { -#if IS_ZEPHYR_VERSION(2, 6) struct espi_evt_data_kbc *kbc = (struct espi_evt_data_kbc *)&data; return kbc->type; -#elif IS_ZEPHYR_VERSION(2, 5) - return (data >> NPCX_8042_TYPE_POS) & 0xFF; -#endif } uint32_t get_8042_data(uint32_t data) { -#if IS_ZEPHYR_VERSION(2, 6) struct espi_evt_data_kbc *kbc = (struct espi_evt_data_kbc *)&data; return kbc->data; -#elif IS_ZEPHYR_VERSION(2, 5) - return (data >> NPCX_8042_DATA_POS) & 0xFF; -#endif } |