![]() |
coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <device/mmio.h>
#include <console/console.h>
#include <soc/addressmap.h>
#include <soc/usb.h>
#include <timer.h>
Go to the source code of this file.
Macros | |
#define | USBTAG "[SSUSB] " |
#define | u3p_msg(fmt, arg...) printk(BIOS_INFO, USBTAG fmt, ##arg) |
#define | u3p_err(fmt, arg...) printk(BIOS_ERR, USBTAG fmt, ##arg) |
Functions | |
static void | phy_index_power_on (int index) |
static void | u3phy_power_on (void) |
static int | check_ip_clk_status (void) |
static int | u3phy_ports_enable (void) |
static void | ssusb_soft_reset (void) |
__weak void | mtk_usb_prepare (void) |
__weak void | mtk_usb_adjust_phy_shift (void) |
void | setup_usb_host (void) |
Variables | |
static struct ssusb_ippc_regs * | ippc_regs = (void *)(SSUSB_IPPC_BASE) |
static struct ssusb_sif_port * | phy_ports = (void *)(SSUSB_SIF_BASE) |
|
static |
Definition at line 78 of file usb.c.
References CAP_U3_PORT_NUM, ssusb_ippc_regs::ip_pw_sts1, ssusb_ippc_regs::ip_pw_sts2, ssusb_ippc_regs::ip_xhci_cap, ippc_regs, read32(), stopwatch_expired(), stopwatch_init_usecs_expire(), STS1_REF_RST, STS1_SYS125_RST, STS1_SYSPLL_STABLE, STS1_U3_MAC_RST, STS2_U2_MAC_RST, and u3p_err.
Referenced by u3phy_ports_enable().
Definition at line 148 of file usb.c.
Referenced by setup_usb_host().
Definition at line 143 of file usb.c.
Referenced by setup_usb_host().
|
static |
Definition at line 16 of file usb.c.
References clrbits32, clrsetbits32, P2C_DTM0_PART_MASK, P2C_FORCE_SUSPENDM, P2C_FORCE_UART_EN, P2C_RG_AVALID, P2C_RG_DATAIN, P2C_RG_SESSEND, P2C_RG_UART_EN, P2C_RG_VBUSVALID, P2C_RG_XCVRSEL, P2C_U2_GPIO_CTR_MSK, P3A_RG_RX_DAC_MUX, P3A_RG_RX_DAC_MUX_VAL, P3A_RG_TX_EIDLE_CM, P3A_RG_TX_EIDLE_CM_VAL, P3A_RG_U3_VUSB10_ON, P3A_RG_XTAL_EXT_EN_U3, P3A_RG_XTAL_EXT_EN_U3_VAL, P3D_RG_CDR_BIR_LTD0, P3D_RG_CDR_BIR_LTD0_VAL, P3D_RG_CDR_BIR_LTD1, P3D_RG_CDR_BIR_LTD1_VAL, PA5_RG_U2_HS_100U_U3_EN, PA5_RG_U2_HSTX_SRCTRL, PA5_RG_U2_HSTX_SRCTRL_VAL, PA6_RG_U2_BC11_SW_EN, PA6_RG_U2_DISCTH, PA6_RG_U2_DISCTH_VAL, PA6_RG_U2_ISO_EN, PA6_RG_U2_OTG_VBUSCMP_EN, PA6_RG_U2_SQTH, PA6_RG_U2_SQTH_VAL, phy_ports, sif_u3phya::phya_reg0, sif_u3phya::phya_reg6, sif_u3phya::phya_reg9, sif_u3phyd::phyd_cdr1, sif_u3phya_da::reg0, setbits32, ssusb_sif_port::u2phy, sif_u2_phy_com::u2phyacr4, sif_u2_phy_com::u2phydtm0, sif_u2_phy_com::u2phydtm1, ssusb_sif_port::u3phya, ssusb_sif_port::u3phya_da, ssusb_sif_port::u3phyd, sif_u2_phy_com::usbphyacr5, and sif_u2_phy_com::usbphyacr6.
Referenced by u3phy_power_on().
Definition at line 153 of file usb.c.
References mtk_usb_adjust_phy_shift(), mtk_usb_prepare(), ssusb_soft_reset(), u3p_err, u3p_msg, u3phy_ports_enable(), and u3phy_power_on().
Referenced by configure_usb(), mainboard_init(), setup_usb(), and setup_usb_host0().
Definition at line 136 of file usb.c.
References clrbits32, CTRL0_IP_SW_RST, ssusb_ippc_regs::ip_pw_ctr0, ippc_regs, and setbits32.
Referenced by setup_usb_host().
|
static |
Definition at line 105 of file usb.c.
References CAP_U2_PORT_NUM, CAP_U3_PORT_NUM, check_ip_clk_status(), clrbits32, clrsetbits32, CTRL1_IP_HOST_PDN, CTRL_U2_PORT_DIS, CTRL_U2_PORT_HOST_SEL, CTRL_U2_PORT_PDN, CTRL_U3_PORT_DIS, CTRL_U3_PORT_HOST_SEL, CTRL_U3_PORT_PDN, ssusb_ippc_regs::ip_pw_ctr1, ssusb_ippc_regs::ip_xhci_cap, ippc_regs, read32(), ssusb_ippc_regs::u2_ctrl_p, ssusb_ippc_regs::u3_ctrl_p, u3p_msg, and value.
Referenced by setup_usb_host().
Definition at line 72 of file usb.c.
References phy_index_power_on(), and USB_PORT_NUMBER.
Referenced by setup_usb_host().
|
static |
Definition at line 13 of file usb.c.
Referenced by check_ip_clk_status(), ssusb_soft_reset(), and u3phy_ports_enable().
|
static |
Definition at line 14 of file usb.c.
Referenced by phy_index_power_on().