summaryrefslogtreecommitdiff
path: root/board/nautilus/board.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/nautilus/board.c')
-rw-r--r--board/nautilus/board.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/board/nautilus/board.c b/board/nautilus/board.c
index c9897212f8..3f01a70f6c 100644
--- a/board/nautilus/board.c
+++ b/board/nautilus/board.c
@@ -166,12 +166,14 @@ const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_MAX_COUNT] = {
},
};
-struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_MAX_COUNT] = {
+const struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_MAX_COUNT] = {
{
+ .usb_port = 0,
.driver = &tcpci_tcpm_usb_mux_driver,
.hpd_update = &ps8xxx_tcpc_update_hpd_status,
},
{
+ .usb_port = 1,
.driver = &tcpci_tcpm_usb_mux_driver,
.hpd_update = &ps8xxx_tcpc_update_hpd_status,
}
@@ -216,8 +218,6 @@ void board_reset_pd_mcu(void)
void board_tcpc_init(void)
{
- int port;
-
/* Only reset TCPC if not sysjump */
if (!system_jumped_to_this_image()) {
board_reset_pd_mcu();
@@ -231,11 +231,8 @@ void board_tcpc_init(void)
* Initialize HPD to low; after sysjump SOC needs to see
* HPD pulse to enable video path
*/
- for (port = 0; port < CONFIG_USB_PD_PORT_MAX_COUNT; port++) {
- const struct usb_mux *mux = &usb_muxes[port];
-
- mux->hpd_update(port, 0, 0);
- }
+ for (int port = 0; port < CONFIG_USB_PD_PORT_MAX_COUNT; ++port)
+ usb_mux_hpd_update(port, 0, 0);
}
DECLARE_HOOK(HOOK_INIT, board_tcpc_init, HOOK_PRIO_INIT_I2C+1);