summaryrefslogtreecommitdiff
path: root/baseboard/dragonegg
diff options
context:
space:
mode:
Diffstat (limited to 'baseboard/dragonegg')
-rw-r--r--baseboard/dragonegg/baseboard.c10
-rw-r--r--baseboard/dragonegg/baseboard.h2
-rw-r--r--baseboard/dragonegg/usb_pd_policy.c4
3 files changed, 8 insertions, 8 deletions
diff --git a/baseboard/dragonegg/baseboard.c b/baseboard/dragonegg/baseboard.c
index 36f054c376..7414421c15 100644
--- a/baseboard/dragonegg/baseboard.c
+++ b/baseboard/dragonegg/baseboard.c
@@ -137,7 +137,7 @@ void board_hibernate(void)
}
/******************************************************************************/
/* USB-C TPCP 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] = {
[USB_PD_PORT_ITE_0] = {
.bus_type = EC_BUS_TYPE_EMBEDDED,
/* TCPC is embedded within EC so no i2c config needed */
@@ -168,7 +168,7 @@ const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_COUNT] = {
/******************************************************************************/
/* USB-C PPC Configuration */
-struct ppc_config_t ppc_chips[CONFIG_USB_PD_PORT_COUNT] = {
+struct ppc_config_t ppc_chips[CONFIG_USB_PD_PORT_MAX_COUNT] = {
[USB_PD_PORT_ITE_0] = {
.i2c_port = I2C_PORT_USBC0,
.i2c_addr_flags = SN5S330_ADDR0_FLAGS,
@@ -189,7 +189,7 @@ struct ppc_config_t ppc_chips[CONFIG_USB_PD_PORT_COUNT] = {
};
unsigned int ppc_cnt = ARRAY_SIZE(ppc_chips);
-struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_COUNT] = {
+struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_MAX_COUNT] = {
[USB_PD_PORT_ITE_0] = {
.driver = &virtual_usb_mux_driver,
.hpd_update = &virtual_hpd_update,
@@ -209,7 +209,7 @@ struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_COUNT] = {
/******************************************************************************/
/* BC 1.2 chip Configuration */
-const struct max14637_config_t max14637_config[CONFIG_USB_PD_PORT_COUNT] = {
+const struct max14637_config_t max14637_config[CONFIG_USB_PD_PORT_MAX_COUNT] = {
{
.chip_enable_pin = GPIO_USB_C0_BC12_VBUS_ON_ODL,
.chg_det_pin = GPIO_USB_C0_BC12_CHG_MAX,
@@ -284,7 +284,7 @@ void board_pd_vconn_ctrl(int port, enum usbpd_cc_pin cc_pin, int enabled)
int board_set_active_charge_port(int port)
{
int is_valid_port = (port >= 0 &&
- port < CONFIG_USB_PD_PORT_COUNT);
+ port < CONFIG_USB_PD_PORT_MAX_COUNT);
int i;
if (!is_valid_port && port != CHARGE_PORT_NONE)
diff --git a/baseboard/dragonegg/baseboard.h b/baseboard/dragonegg/baseboard.h
index 9046d4e5c3..e34f5d11c3 100644
--- a/baseboard/dragonegg/baseboard.h
+++ b/baseboard/dragonegg/baseboard.h
@@ -86,7 +86,7 @@
* on the MLB for now. In addition, this config option will likely move to
* board.h as it likely board dependent and not same across all follower boards.
*/
-#define CONFIG_USB_PD_PORT_COUNT 3
+#define CONFIG_USB_PD_PORT_MAX_COUNT 3
#define CONFIG_USB_PD_MAX_SINGLE_SOURCE_CURRENT TYPEC_RP_3A0
#define CONFIG_USB_PD_DUAL_ROLE
#define CONFIG_USB_PD_LOGGING
diff --git a/baseboard/dragonegg/usb_pd_policy.c b/baseboard/dragonegg/usb_pd_policy.c
index 37a9b51dc9..cf9d3c4885 100644
--- a/baseboard/dragonegg/usb_pd_policy.c
+++ b/baseboard/dragonegg/usb_pd_policy.c
@@ -277,8 +277,8 @@ int pd_custom_vdm(int port, int cnt, uint32_t *payload,
}
#ifdef CONFIG_USB_PD_ALT_MODE_DFP
-static int dp_flags[CONFIG_USB_PD_PORT_COUNT];
-static uint32_t dp_status[CONFIG_USB_PD_PORT_COUNT];
+static int dp_flags[CONFIG_USB_PD_PORT_MAX_COUNT];
+static uint32_t dp_status[CONFIG_USB_PD_PORT_MAX_COUNT];
static void svdm_safe_dp_mode(int port)
{