summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/typec/mux/intel_pmc_mux.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/usb/typec/mux/intel_pmc_mux.c b/drivers/usb/typec/mux/intel_pmc_mux.c
index 307830b374ec..109c1a796e84 100644
--- a/drivers/usb/typec/mux/intel_pmc_mux.c
+++ b/drivers/usb/typec/mux/intel_pmc_mux.c
@@ -148,8 +148,13 @@ struct pmc_usb {
static void update_port_status(struct pmc_usb_port *port)
{
+ u8 port_num;
+
+ /* SoC expects the USB Type-C port numbers to start with 0 */
+ port_num = port->usb3_port - 1;
+
port->iom_status = readl(port->pmc->iom_base + IOM_PORT_STATUS_OFFSET +
- port->usb3_port * sizeof(u32));
+ port_num * sizeof(u32));
}
static int sbu_orientation(struct pmc_usb_port *port)