drivers/media/pci/intel/ipu6/ipu6-isys-dwc-phy.c
Source file repositories/reference/linux-study-clean/drivers/media/pci/intel/ipu6/ipu6-isys-dwc-phy.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/pci/intel/ipu6/ipu6-isys-dwc-phy.c- Extension
.c- Size
- 15311 bytes
- Lines
- 549
- Domain
- Driver Families
- Bucket
- drivers/media
- 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/bitfield.hlinux/bits.hlinux/delay.hlinux/device.hlinux/iopoll.hlinux/math64.hipu6-bus.hipu6-isys.hipu6-platform-isys-csi2-reg.h
Detected Declarations
struct dwc_dphy_freq_rangeenum phy_fsm_statefunction dwc_dphy_writefunction dwc_dphy_readfunction dwc_dphy_write_maskfunction dwc_dphy_read_maskfunction dwc_dphy_ifc_readfunction dwc_dphy_ifc_writefunction dwc_dphy_ifc_write_maskfunction dwc_dphy_ifc_read_maskfunction dwc_dphy_pwr_upfunction get_hsfreq_by_mbpsfunction ipu6_isys_dwc_phy_configfunction ipu6_isys_dwc_phy_aggr_setupfunction ipu6_isys_dwc_phy_powerup_ackfunction ipu6_isys_dwc_phy_resetfunction ipu6_isys_dwc_phy_set_power
Annotated Snippet
struct dwc_dphy_freq_range {
u8 hsfreq;
u16 min;
u16 max;
u16 default_mbps;
u16 osc_freq_target;
};
#define DPHY_FREQ_RANGE_NUM (63)
#define DPHY_FREQ_RANGE_INVALID_INDEX (0xff)
static const struct dwc_dphy_freq_range freqranges[DPHY_FREQ_RANGE_NUM] = {
{0x00, 80, 97, 80, 335},
{0x10, 80, 107, 90, 335},
{0x20, 84, 118, 100, 335},
{0x30, 93, 128, 110, 335},
{0x01, 103, 139, 120, 335},
{0x11, 112, 149, 130, 335},
{0x21, 122, 160, 140, 335},
{0x31, 131, 170, 150, 335},
{0x02, 141, 181, 160, 335},
{0x12, 150, 191, 170, 335},
{0x22, 160, 202, 180, 335},
{0x32, 169, 212, 190, 335},
{0x03, 183, 228, 205, 335},
{0x13, 198, 244, 220, 335},
{0x23, 212, 259, 235, 335},
{0x33, 226, 275, 250, 335},
{0x04, 250, 301, 275, 335},
{0x14, 274, 328, 300, 335},
{0x25, 297, 354, 325, 335},
{0x35, 321, 380, 350, 335},
{0x05, 369, 433, 400, 335},
{0x16, 416, 485, 450, 335},
{0x26, 464, 538, 500, 335},
{0x37, 511, 590, 550, 335},
{0x07, 559, 643, 600, 335},
{0x18, 606, 695, 650, 335},
{0x28, 654, 748, 700, 335},
{0x39, 701, 800, 750, 335},
{0x09, 749, 853, 800, 335},
{0x19, 796, 905, 850, 335},
{0x29, 844, 958, 900, 335},
{0x3a, 891, 1010, 950, 335},
{0x0a, 939, 1063, 1000, 335},
{0x1a, 986, 1115, 1050, 335},
{0x2a, 1034, 1168, 1100, 335},
{0x3b, 1081, 1220, 1150, 335},
{0x0b, 1129, 1273, 1200, 335},
{0x1b, 1176, 1325, 1250, 335},
{0x2b, 1224, 1378, 1300, 335},
{0x3c, 1271, 1430, 1350, 335},
{0x0c, 1319, 1483, 1400, 335},
{0x1c, 1366, 1535, 1450, 335},
{0x2c, 1414, 1588, 1500, 335},
{0x3d, 1461, 1640, 1550, 208},
{0x0d, 1509, 1693, 1600, 214},
{0x1d, 1556, 1745, 1650, 221},
{0x2e, 1604, 1798, 1700, 228},
{0x3e, 1651, 1850, 1750, 234},
{0x0e, 1699, 1903, 1800, 241},
{0x1e, 1746, 1955, 1850, 248},
{0x2f, 1794, 2008, 1900, 255},
{0x3f, 1841, 2060, 1950, 261},
{0x0f, 1889, 2113, 2000, 268},
{0x40, 1936, 2165, 2050, 275},
{0x41, 1984, 2218, 2100, 281},
{0x42, 2031, 2270, 2150, 288},
{0x43, 2079, 2323, 2200, 294},
{0x44, 2126, 2375, 2250, 302},
{0x45, 2174, 2428, 2300, 308},
{0x46, 2221, 2480, 2350, 315},
{0x47, 2269, 2500, 2400, 321},
{0x48, 2316, 2500, 2450, 328},
{0x49, 2364, 2500, 2500, 335}
};
static u16 get_hsfreq_by_mbps(u32 mbps)
{
u16 best = DPHY_FREQ_RANGE_INVALID_INDEX;
unsigned int i;
for (i = 0; i < DPHY_FREQ_RANGE_NUM; i++) {
if (mbps > freqranges[i].max)
continue;
if (mbps < freqranges[i].min)
break;
if (best == DPHY_FREQ_RANGE_INVALID_INDEX ||
freqranges[i].osc_freq_target >
Annotation
- Immediate include surface: `linux/bitfield.h`, `linux/bits.h`, `linux/delay.h`, `linux/device.h`, `linux/iopoll.h`, `linux/math64.h`, `ipu6-bus.h`, `ipu6-isys.h`.
- Detected declarations: `struct dwc_dphy_freq_range`, `enum phy_fsm_state`, `function dwc_dphy_write`, `function dwc_dphy_read`, `function dwc_dphy_write_mask`, `function dwc_dphy_read_mask`, `function dwc_dphy_ifc_read`, `function dwc_dphy_ifc_write`, `function dwc_dphy_ifc_write_mask`, `function dwc_dphy_ifc_read_mask`.
- Atlas domain: Driver Families / drivers/media.
- 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.