summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiana Z <dzigterman@chromium.org>2020-11-03 14:58:57 -0700
committerCommit Bot <commit-bot@chromium.org>2020-11-05 01:28:40 +0000
commite609f07eef8b851b19bf4b59b5263ac702d8b871 (patch)
tree2211fbef28040cfbc9ce9831b310524c1e06ec72
parent899412aaf662619fbf66bbdc0398c7d69aebc482 (diff)
downloadchrome-ec-e609f07eef8b851b19bf4b59b5263ac702d8b871.tar.gz
COIL: Rename CONFIG_I2C_PERIPHERAL
Rename CONFIG_I2C_PERIPHERAL and related comments. BRANCH=None BUG=None TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I3f148e976f3a4d6a1dc6c58686368c056290d5d4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2518660 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
-rw-r--r--board/max32660-eval/board.h2
-rw-r--r--board/samus_pd/board.h2
-rw-r--r--board/stm32l476g-eval/board.h2
-rw-r--r--chip/it83xx/build.mk2
-rw-r--r--chip/it83xx/intc.c10
-rw-r--r--chip/it83xx/intc.h2
-rw-r--r--chip/stm32/host_command_common.c4
-rw-r--r--common/build.mk2
-rw-r--r--core/nds32/ec.lds.S6
-rw-r--r--core/riscv-rv32i/ec.lds.S6
-rw-r--r--include/config.h4
11 files changed, 21 insertions, 21 deletions
diff --git a/board/max32660-eval/board.h b/board/max32660-eval/board.h
index c815b7bed2..bcca57f18a 100644
--- a/board/max32660-eval/board.h
+++ b/board/max32660-eval/board.h
@@ -24,7 +24,7 @@
#undef CONFIG_HOSTCMD_EVENTS
#define CONFIG_I2C
-#define CONFIG_I2C_SLAVE
+#define CONFIG_I2C_PERIPHERAL
#define CONFIG_HOSTCMD_I2C_ADDR_FLAGS (0x51) /* 7 bit right-aligned */
/* Slave I2C port configuration */
diff --git a/board/samus_pd/board.h b/board/samus_pd/board.h
index a4039b491c..3ac4d1978e 100644
--- a/board/samus_pd/board.h
+++ b/board/samus_pd/board.h
@@ -48,7 +48,7 @@
#define CONFIG_HW_CRC
#define CONFIG_I2C
#define CONFIG_I2C_CONTROLLER
-#define CONFIG_I2C_SLAVE
+#define CONFIG_I2C_PERIPHERAL
#undef CONFIG_LID_SWITCH
#define CONFIG_LOW_POWER_IDLE
#define CONFIG_LTO
diff --git a/board/stm32l476g-eval/board.h b/board/stm32l476g-eval/board.h
index 4b8033207b..7d7616822b 100644
--- a/board/stm32l476g-eval/board.h
+++ b/board/stm32l476g-eval/board.h
@@ -37,7 +37,7 @@
#ifdef CTS_MODULE_I2C
#define CONFIG_I2C
-#define CONFIG_I2C_SLAVE
+#define CONFIG_I2C_PERIPHERAL
#define CONFIG_HOSTCMD_I2C_SLAVE_ADDR 0x3c
#define I2C_PORT_EC STM32_I2C2_PORT
#endif
diff --git a/chip/it83xx/build.mk b/chip/it83xx/build.mk
index f52fc6b8fe..4feab7735c 100644
--- a/chip/it83xx/build.mk
+++ b/chip/it83xx/build.mk
@@ -37,4 +37,4 @@ ifndef CONFIG_KEYBOARD_NOT_RAW
chip-$(HAS_TASK_KEYSCAN)+=keyboard_raw.o
endif
chip-$(CONFIG_I2C_CONTROLLER)+=i2c.o
-chip-$(CONFIG_I2C_SLAVE)+=i2c_slave.o
+chip-$(CONFIG_I2C_PERIPHERAL)+=i2c_slave.o
diff --git a/chip/it83xx/intc.c b/chip/it83xx/intc.c
index ee9d9be5d1..8f96da17d0 100644
--- a/chip/it83xx/intc.c
+++ b/chip/it83xx/intc.c
@@ -224,9 +224,9 @@ void intc_cpu_int_group_6(void)
int intc_group_6 = intc_get_ec_int();
switch (intc_group_6) {
-#if defined(CONFIG_I2C_CONTROLLER) || defined(CONFIG_I2C_SLAVE)
+#if defined(CONFIG_I2C_CONTROLLER) || defined(CONFIG_I2C_PERIPHERAL)
case IT83XX_IRQ_SMB_A:
-#ifdef CONFIG_I2C_SLAVE
+#ifdef CONFIG_I2C_PERIPHERAL
if (IT83XX_SMB_SFFCTL & IT83XX_SMB_SAFE)
i2c_slv_interrupt(IT83XX_I2C_CH_A);
else
@@ -243,7 +243,7 @@ void intc_cpu_int_group_6(void)
break;
case IT83XX_IRQ_SMB_D:
-#ifdef CONFIG_I2C_SLAVE
+#ifdef CONFIG_I2C_PERIPHERAL
if (!(IT83XX_I2C_CTR(3) & IT83XX_I2C_MODE))
i2c_slv_interrupt(IT83XX_I2C_CH_D);
else
@@ -252,7 +252,7 @@ void intc_cpu_int_group_6(void)
break;
case IT83XX_IRQ_SMB_E:
-#ifdef CONFIG_I2C_SLAVE
+#ifdef CONFIG_I2C_PERIPHERAL
if (!(IT83XX_I2C_CTR(0) & IT83XX_I2C_MODE))
i2c_slv_interrupt(IT83XX_I2C_CH_E);
else
@@ -261,7 +261,7 @@ void intc_cpu_int_group_6(void)
break;
case IT83XX_IRQ_SMB_F:
-#ifdef CONFIG_I2C_SLAVE
+#ifdef CONFIG_I2C_PERIPHERAL
if (!(IT83XX_I2C_CTR(1) & IT83XX_I2C_MODE))
i2c_slv_interrupt(IT83XX_I2C_CH_F);
else
diff --git a/chip/it83xx/intc.h b/chip/it83xx/intc.h
index bd6d947453..97639c9a0e 100644
--- a/chip/it83xx/intc.h
+++ b/chip/it83xx/intc.h
@@ -31,7 +31,7 @@ void adc_interrupt(void);
void voltage_comparator_interrupt(void);
#endif
void i2c_interrupt(int port);
-#ifdef CONFIG_I2C_SLAVE
+#ifdef CONFIG_I2C_PERIPHERAL
void i2c_slv_interrupt(int port);
#endif
void clock_sleep_mode_wakeup_isr(void);
diff --git a/chip/stm32/host_command_common.c b/chip/stm32/host_command_common.c
index bb1c6b1830..b39a298c64 100644
--- a/chip/stm32/host_command_common.c
+++ b/chip/stm32/host_command_common.c
@@ -9,7 +9,7 @@
#include "spi.h"
#include "usart_host_command.h"
-#ifndef CONFIG_I2C_SLAVE
+#ifndef CONFIG_I2C_PERIPHERAL
/* Store current transport type */
static enum fp_transport_type curr_transport_type = FP_TRANSPORT_TYPE_UNKNOWN;
@@ -43,4 +43,4 @@ DECLARE_HOST_COMMAND(EC_CMD_GET_PROTOCOL_INFO,
host_command_protocol_info,
EC_VER_MASK(0));
-#endif /* CONFIG_I2C_SLAVE */
+#endif /* CONFIG_I2C_PERIPHERAL */
diff --git a/common/build.mk b/common/build.mk
index ffed2f8a4f..e255e44d72 100644
--- a/common/build.mk
+++ b/common/build.mk
@@ -86,7 +86,7 @@ common-$(CONFIG_HOSTCMD_RTC)+=rtc.o
common-$(CONFIG_I2C_DEBUG)+=i2c_trace.o
common-$(CONFIG_I2C_HID_TOUCHPAD)+=i2c_hid_touchpad.o
common-$(CONFIG_I2C_CONTROLLER)+=i2c_master.o
-common-$(CONFIG_I2C_SLAVE)+=i2c_slave.o
+common-$(CONFIG_I2C_PERIPHERAL)+=i2c_slave.o
common-$(CONFIG_I2C_BITBANG)+=i2c_bitbang.o
common-$(CONFIG_I2C_VIRTUAL_BATTERY)+=virtual_battery.o
common-$(CONFIG_INDUCTIVE_CHARGING)+=inductive_charging.o
diff --git a/core/nds32/ec.lds.S b/core/nds32/ec.lds.S
index 98edb36c3f..4565600b05 100644
--- a/core/nds32/ec.lds.S
+++ b/core/nds32/ec.lds.S
@@ -22,7 +22,7 @@ MEMORY
{
FLASH (rx) : ORIGIN = FW_OFF(SECTION), LENGTH = FW_SIZE(SECTION)
IRAM (rw) : ORIGIN = CONFIG_RAM_BASE, LENGTH = CONFIG_RAM_SIZE
-#if defined(CONFIG_HOSTCMD_X86) || defined(CONFIG_I2C_SLAVE)
+#if defined(CONFIG_HOSTCMD_X86) || defined(CONFIG_I2C_PERIPHERAL)
H2RAM (rw) : ORIGIN = CONFIG_H2RAM_BASE, LENGTH = CONFIG_H2RAM_SIZE
#endif
}
@@ -292,13 +292,13 @@ SECTIONS
__config_ec_writable_storage_size = CONFIG_EC_WRITABLE_STORAGE_SIZE;
#endif
-#if defined(CONFIG_HOSTCMD_X86) || defined(CONFIG_I2C_SLAVE)
+#if defined(CONFIG_HOSTCMD_X86) || defined(CONFIG_I2C_PERIPHERAL)
.h2ram (NOLOAD) : {
. += CONFIG_H2RAM_HOST_LPC_IO_BASE;
*(.h2ram.pool.hostcmd)
. = ALIGN(256);
*(.h2ram.pool.acpiec)
-#ifdef CONFIG_I2C_SLAVE
+#ifdef CONFIG_I2C_PERIPHERAL
. = ALIGN(256);
*(.h2ram.pool.i2cslv)
#endif
diff --git a/core/riscv-rv32i/ec.lds.S b/core/riscv-rv32i/ec.lds.S
index 15a26e5eff..1a979ddcaa 100644
--- a/core/riscv-rv32i/ec.lds.S
+++ b/core/riscv-rv32i/ec.lds.S
@@ -41,7 +41,7 @@ MEMORY
*/
ILM (rx) : ORIGIN = FW_OFF(SECTION), LENGTH = FW_SIZE(SECTION)
-#if defined(CONFIG_HOSTCMD_X86) || defined(CONFIG_I2C_SLAVE)
+#if defined(CONFIG_HOSTCMD_X86) || defined(CONFIG_I2C_PERIPHERAL)
H2RAM (rw) : ORIGIN = CONFIG_H2RAM_BASE, LENGTH = CONFIG_H2RAM_SIZE
#endif
#else
@@ -341,13 +341,13 @@ SECTIONS
#endif
#if defined(CHIP_FAMILY_IT8XXX2)
-#if defined(CONFIG_HOSTCMD_X86) || defined(CONFIG_I2C_SLAVE)
+#if defined(CONFIG_HOSTCMD_X86) || defined(CONFIG_I2C_PERIPHERAL)
.h2ram (NOLOAD) : {
. += CONFIG_H2RAM_HOST_LPC_IO_BASE;
*(.h2ram.pool.hostcmd)
. = ALIGN(256);
*(.h2ram.pool.acpiec)
-#ifdef CONFIG_I2C_SLAVE
+#ifdef CONFIG_I2C_PERIPHERAL
. = ALIGN(256);
*(.h2ram.pool.i2cslv)
#endif
diff --git a/include/config.h b/include/config.h
index 702e7ab603..10f8dee3f5 100644
--- a/include/config.h
+++ b/include/config.h
@@ -2327,8 +2327,8 @@
*/
#undef CONFIG_I2C_CONTROLLER
-/* EC uses an I2C slave interface */
-#undef CONFIG_I2C_SLAVE
+/* EC uses an I2C peripheral interface */
+#undef CONFIG_I2C_PERIPHERAL
/* Defines I2C operation retry count when slave nack'd(EC_ERROR_BUSY) */
#define CONFIG_I2C_NACK_RETRY_COUNT 0