summaryrefslogtreecommitdiff
path: root/fuzz
diff options
context:
space:
mode:
authorKarthikeyan Ramasubramanian <kramasub@google.com>2019-10-02 14:27:47 -0600
committerCommit Bot <commit-bot@chromium.org>2019-11-01 18:43:42 +0000
commit9577704f30c7e824c0590264df22d95a2c706575 (patch)
tree566b5beeeae8b343803718101ba0b00c940506cb /fuzz
parente8121e83e478fef2d5a29304be900311f3f020c4 (diff)
downloadchrome-ec-9577704f30c7e824c0590264df22d95a2c706575.tar.gz
Rename CONFIG_USB_PD_PORT_COUNT as CONFIG_USB_PD_PORT_MAX_COUNT
Certain SKUs of certain boards have lesser number of USB PD ports than defined by CONFIG_USB_PD_PORT_COUNT. Hence rename CONFIG_USB_PD_PORT_COUNT as CONFIG_USB_PD_PORT_MAX_COUNT. BUG=b:140816510, b:143196487 BRANCH=octopus TEST=make -j buildall; Boot to ChromeOS Change-Id: I7c33b27150730a1a3b5813b7b4a72fd24ab73c6a Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1879337 Tested-by: Karthikeyan Ramasubramanian <kramasub@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org> Commit-Queue: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'fuzz')
-rw-r--r--fuzz/fuzz_config.h4
-rw-r--r--fuzz/usb_pd_fuzz.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/fuzz/fuzz_config.h b/fuzz/fuzz_config.h
index f4c325bd99..ba4d9c8458 100644
--- a/fuzz/fuzz_config.h
+++ b/fuzz/fuzz_config.h
@@ -109,14 +109,14 @@ enum nvmem_users {
#ifdef TEST_USB_PD_FUZZ
#define CONFIG_USB_POWER_DELIVERY
#define CONFIG_USB_PD_DUAL_ROLE
-#define CONFIG_USB_PD_PORT_COUNT 2
+#define CONFIG_USB_PD_PORT_MAX_COUNT 2
#define CONFIG_SHA256
#define CONFIG_SW_CRC
#endif /* TEST_USB_PD_FUZZ */
#ifdef TEST_USB_TCPM_V2_FUZZ
#define CONFIG_USB_PD_DUAL_ROLE
-#define CONFIG_USB_PD_PORT_COUNT 2
+#define CONFIG_USB_PD_PORT_MAX_COUNT 2
#define CONFIG_USB_PD_TCPC_LOW_POWER
#define CONFIG_USB_PD_TRY_SRC
#define CONFIG_USB_PID 0x5555
diff --git a/fuzz/usb_pd_fuzz.c b/fuzz/usb_pd_fuzz.c
index 3c97d7b0bb..ba74148229 100644
--- a/fuzz/usb_pd_fuzz.c
+++ b/fuzz/usb_pd_fuzz.c
@@ -58,7 +58,7 @@ struct tcpc_state {
struct message message;
};
-static struct tcpc_state mock_tcpc_state[CONFIG_USB_PD_PORT_COUNT];
+static struct tcpc_state mock_tcpc_state[CONFIG_USB_PD_PORT_MAX_COUNT];
static int mock_tcpm_get_cc(int port, enum tcpc_cc_voltage_status *cc1,
enum tcpc_cc_voltage_status *cc2)
@@ -133,7 +133,7 @@ static const struct tcpm_drv mock_tcpm_drv = {
};
/* TCPC mux configuration */
-const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_COUNT] = {
+const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_MAX_COUNT] = {
{
.drv = &mock_tcpm_drv,
},