drivers/phy/broadcom/phy-brcm-usb-init.c
Source file repositories/reference/linux-study-clean/drivers/phy/broadcom/phy-brcm-usb-init.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/phy/broadcom/phy-brcm-usb-init.c- Extension
.c- Size
- 35992 bytes
- Lines
- 1087
- Domain
- Driver Families
- Bucket
- drivers/phy
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/delay.hlinux/io.hlinux/soc/brcmstb/brcmstb.hphy-brcm-usb-init.h
Detected Declarations
struct id_to_typeenum brcm_family_typefunction usb_ctrl_unset_familyfunction usb_ctrl_set_familyfunction brcmusb_usb_mdio_readfunction brcmusb_usb_mdio_writefunction brcmusb_usb_phy_ldo_fixfunction brcmusb_usb2_eye_fixfunction brcmusb_usb3_pll_fixfunction brcmusb_usb3_enable_pipe_resetfunction brcmusb_usb3_enable_sigdetfunction brcmusb_usb3_enable_skip_alignfunction brcmusb_usb3_unfreeze_aeqfunction brcmusb_usb3_pll_54mhzfunction brcmusb_usb3_ssc_enablefunction brcmusb_usb3_phy_workaroundsfunction brcmusb_memc_fixfunction brcmusb_usb3_otp_fixfunction brcmusb_xhci_soft_resetfunction get_family_typefunction usb_init_ippfunction usb_wake_enablefunction usb_init_commonfunction usb_init_eohcifunction usb_init_xhcifunction usb_uninit_commonfunction usb_uninit_eohcifunction usb_get_dual_selectfunction usb_set_dual_selectfunction brcm_usb_dvr_init_4908function brcm_usb_dvr_init_7445
Annotated Snippet
struct id_to_type {
u32 id;
int type;
};
static const struct id_to_type id_to_type_table[] = {
{ 0x33900000, BRCM_FAMILY_3390A0 },
{ 0x72500010, BRCM_FAMILY_7250B0 },
{ 0x72600000, BRCM_FAMILY_7260A0 },
{ 0x72550000, BRCM_FAMILY_7260A0 },
{ 0x72680000, BRCM_FAMILY_7271A0 },
{ 0x72710000, BRCM_FAMILY_7271A0 },
{ 0x73640000, BRCM_FAMILY_7364A0 },
{ 0x73660020, BRCM_FAMILY_7366C0 },
{ 0x07437100, BRCM_FAMILY_74371A0 },
{ 0x74390010, BRCM_FAMILY_7439B0 },
{ 0x74450030, BRCM_FAMILY_7445D0 },
{ 0x72780000, BRCM_FAMILY_7278A0 },
{ 0, BRCM_FAMILY_7271A0 }, /* default */
};
static const u32
usb_reg_bits_map_table[BRCM_FAMILY_COUNT][USB_CTRL_SELECTOR_COUNT] = {
/* 3390B0 */
[BRCM_FAMILY_3390A0] = {
[USB_CTRL_SETUP_SCB1_EN_SELECTOR] =
USB_CTRL_SETUP_SCB1_EN_MASK,
[USB_CTRL_SETUP_SCB2_EN_SELECTOR] =
USB_CTRL_SETUP_SCB2_EN_MASK,
[USB_CTRL_SETUP_SS_EHCI64BIT_EN_SELECTOR] =
USB_CTRL_SETUP_SS_EHCI64BIT_EN_MASK,
[USB_CTRL_SETUP_STRAP_IPP_SEL_SELECTOR] =
USB_CTRL_SETUP_STRAP_IPP_SEL_MASK,
[USB_CTRL_SETUP_OC3_DISABLE_PORT0_SELECTOR] =
USB_CTRL_SETUP_OC3_DISABLE_PORT0_MASK,
[USB_CTRL_SETUP_OC3_DISABLE_PORT1_SELECTOR] =
USB_CTRL_SETUP_OC3_DISABLE_PORT1_MASK,
[USB_CTRL_SETUP_OC3_DISABLE_SELECTOR] =
USB_CTRL_SETUP_OC3_DISABLE_MASK,
[USB_CTRL_USB_PM_XHC_SOFT_RESETB_SELECTOR] =
USB_CTRL_USB_PM_XHC_SOFT_RESETB_MASK,
[USB_CTRL_USB_PM_USB_PWRDN_SELECTOR] =
USB_CTRL_USB_PM_USB_PWRDN_MASK,
[USB_CTRL_USB_DEVICE_CTL1_PORT_MODE_SELECTOR] =
USB_CTRL_USB_DEVICE_CTL1_PORT_MODE_MASK,
[USB_CTRL_USB_PM_USB20_HC_RESETB_SELECTOR] =
USB_CTRL_USB_PM_USB20_HC_RESETB_VAR_MASK,
[USB_CTRL_SETUP_ENDIAN_SELECTOR] = ENDIAN_SETTINGS,
},
/* 4908 */
[BRCM_FAMILY_4908] = {
[USB_CTRL_USB_PM_XHC_SOFT_RESETB_SELECTOR] =
USB_CTRL_USB_PM_XHC_SOFT_RESETB_MASK,
[USB_CTRL_USB_PM_USB_PWRDN_SELECTOR] =
USB_CTRL_USB_PM_USB_PWRDN_MASK,
},
/* 7250b0 */
[BRCM_FAMILY_7250B0] = {
[USB_CTRL_SETUP_SCB1_EN_SELECTOR] =
USB_CTRL_SETUP_SCB1_EN_MASK,
[USB_CTRL_SETUP_SCB2_EN_SELECTOR] =
USB_CTRL_SETUP_SCB2_EN_MASK,
[USB_CTRL_SETUP_SS_EHCI64BIT_EN_SELECTOR] =
USB_CTRL_SETUP_SS_EHCI64BIT_EN_MASK,
[USB_CTRL_SETUP_OC3_DISABLE_PORT0_SELECTOR] =
USB_CTRL_SETUP_OC3_DISABLE_PORT0_MASK,
[USB_CTRL_SETUP_OC3_DISABLE_PORT1_SELECTOR] =
USB_CTRL_SETUP_OC3_DISABLE_PORT1_MASK,
[USB_CTRL_SETUP_OC3_DISABLE_SELECTOR] =
USB_CTRL_SETUP_OC3_DISABLE_MASK,
[USB_CTRL_PLL_CTL_PLL_IDDQ_PWRDN_SELECTOR] =
USB_CTRL_PLL_CTL_PLL_IDDQ_PWRDN_MASK,
[USB_CTRL_USB_PM_XHC_SOFT_RESETB_SELECTOR] =
USB_CTRL_USB_PM_XHC_SOFT_RESETB_VAR_MASK,
[USB_CTRL_USB_PM_USB20_HC_RESETB_SELECTOR] =
USB_CTRL_USB_PM_USB20_HC_RESETB_MASK,
[USB_CTRL_SETUP_ENDIAN_SELECTOR] = ENDIAN_SETTINGS,
},
/* 7271a0 */
[BRCM_FAMILY_7271A0] = {
[USB_CTRL_SETUP_SS_EHCI64BIT_EN_SELECTOR] =
USB_CTRL_SETUP_SS_EHCI64BIT_EN_MASK,
[USB_CTRL_SETUP_STRAP_IPP_SEL_SELECTOR] =
USB_CTRL_SETUP_STRAP_IPP_SEL_MASK,
[USB_CTRL_SETUP_OC3_DISABLE_PORT0_SELECTOR] =
USB_CTRL_SETUP_OC3_DISABLE_PORT0_MASK,
[USB_CTRL_SETUP_OC3_DISABLE_PORT1_SELECTOR] =
USB_CTRL_SETUP_OC3_DISABLE_PORT1_MASK,
[USB_CTRL_SETUP_OC3_DISABLE_SELECTOR] =
USB_CTRL_SETUP_OC3_DISABLE_MASK,
Annotation
- Immediate include surface: `linux/delay.h`, `linux/io.h`, `linux/soc/brcmstb/brcmstb.h`, `phy-brcm-usb-init.h`.
- Detected declarations: `struct id_to_type`, `enum brcm_family_type`, `function usb_ctrl_unset_family`, `function usb_ctrl_set_family`, `function brcmusb_usb_mdio_read`, `function brcmusb_usb_mdio_write`, `function brcmusb_usb_phy_ldo_fix`, `function brcmusb_usb2_eye_fix`, `function brcmusb_usb3_pll_fix`, `function brcmusb_usb3_enable_pipe_reset`.
- Atlas domain: Driver Families / drivers/phy.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.