summaryrefslogtreecommitdiff
path: root/src/ec/google/chromeec/ec_lpc.c
diff options
context:
space:
mode:
authorMartin Roth <martinroth@google.com>2017-06-24 14:09:38 -0600
committerMartin Roth <martinroth@google.com>2017-06-28 17:49:22 +0000
commitf5c3518f0eaa3896efa684293aac69b4893ff7ae (patch)
tree02891cee1f52c105fe4100eecc3c47a696abb153 /src/ec/google/chromeec/ec_lpc.c
parentb3b114c28f6e7c11b327fce84d93141498d5f665 (diff)
downloadcoreboot-f5c3518f0eaa3896efa684293aac69b4893ff7ae.tar.xz
src/ec: add IS_ENABLED() around Kconfig symbol references
Change-Id: Ic2cdfa08cdae9f698eb2f8fa4c4ae061f1a7d903 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/20340 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Diffstat (limited to 'src/ec/google/chromeec/ec_lpc.c')
-rw-r--r--src/ec/google/chromeec/ec_lpc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ec/google/chromeec/ec_lpc.c b/src/ec/google/chromeec/ec_lpc.c
index 9ead8c8f63..42a18e4a0e 100644
--- a/src/ec/google/chromeec/ec_lpc.c
+++ b/src/ec/google/chromeec/ec_lpc.c
@@ -38,7 +38,7 @@ static void read_bytes(u16 port, unsigned int length, u8 *dest, u8 *csum)
{
int i;
-#if CONFIG_EC_GOOGLE_CHROMEEC_MEC
+#if IS_ENABLED(CONFIG_EC_GOOGLE_CHROMEEC_MEC)
/* Access desired range though EMI interface */
if (port >= MEC_EMI_RANGE_START && port <= MEC_EMI_RANGE_END) {
mec_io_bytes(0, port, length, dest, csum);
@@ -73,7 +73,7 @@ static void write_bytes(u16 port, unsigned int length, u8 *msg, u8 *csum)
{
int i;
-#if CONFIG_EC_GOOGLE_CHROMEEC_MEC
+#if IS_ENABLED(CONFIG_EC_GOOGLE_CHROMEEC_MEC)
/* Access desired range though EMI interface */
if (port >= MEC_EMI_RANGE_START && port <= MEC_EMI_RANGE_END) {
mec_io_bytes(1, port, length, msg, csum);
@@ -124,7 +124,7 @@ static int google_chromeec_wait_ready(u16 port)
EC_LPC_CMDR_BUSY, 0);
}
-#if CONFIG_EC_GOOGLE_CHROMEEC_ACPI_MEMMAP
+#if IS_ENABLED(CONFIG_EC_GOOGLE_CHROMEEC_ACPI_MEMMAP)
/* Read memmap data through ACPI port 66/62 */
static int read_memmap(u8 *data, u8 offset)
{
@@ -158,7 +158,7 @@ static int google_chromeec_command_version(void)
{
u8 id1, id2, flags;
-#if CONFIG_EC_GOOGLE_CHROMEEC_ACPI_MEMMAP
+#if IS_ENABLED(CONFIG_EC_GOOGLE_CHROMEEC_ACPI_MEMMAP)
if (read_memmap(&id1, EC_MEMMAP_ID) ||
read_memmap(&id2, EC_MEMMAP_ID + 1) ||
read_memmap(&flags, EC_MEMMAP_HOST_CMD_FLAGS)) {