diff options
Diffstat (limited to 'src/soc/mediatek/common/usb.c')
-rw-r--r-- | src/soc/mediatek/common/usb.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/soc/mediatek/common/usb.c b/src/soc/mediatek/common/usb.c index b9fe83529d..cc2503b4e5 100644 --- a/src/soc/mediatek/common/usb.c +++ b/src/soc/mediatek/common/usb.c @@ -13,6 +13,12 @@ static struct ssusb_ippc_regs *ippc_regs = (void *)(SSUSB_IPPC_BASE); static struct ssusb_sif_port *phy_ports = (void *)(SSUSB_SIF_BASE); +void update_usb_base_regs(uintptr_t ippc_base, uintptr_t sif_base) +{ + ippc_regs = (void *)ippc_base; + phy_ports = (void *)sif_base; +} + static void phy_index_power_on(int index) { struct ssusb_sif_port *phy = phy_ports + index; @@ -150,7 +156,7 @@ __weak void mtk_usb_adjust_phy_shift(void) /* do nothing */ } -void setup_usb_host(void) +void setup_usb_host_controller(void) { u3p_msg("Setting up USB HOST controller...\n"); @@ -164,3 +170,9 @@ void setup_usb_host(void) mtk_usb_adjust_phy_shift(); u3p_msg("phy power-on done.\n"); } + +void setup_usb_host(void) +{ + update_usb_base_regs(SSUSB_IPPC_BASE, SSUSB_SIF_BASE); + setup_usb_host_controller(); +} |