drivers/net/ethernet/intel/ice/ice_dpll.c
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/intel/ice/ice_dpll.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/intel/ice/ice_dpll.c- Extension
.c- Size
- 141330 bytes
- Lines
- 4976
- Domain
- Driver Families
- Bucket
- drivers/net
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
ice.hice_lib.hice_trace.hice_txclk.hlinux/dpll.hlinux/property.h
Detected Declarations
enum ice_dpll_pin_typefunction ice_dpll_is_sw_pinfunction ice_dpll_is_resetfunction ice_dpll_pin_freq_setfunction ice_dpll_frequency_setfunction ice_dpll_input_frequency_setfunction ice_dpll_output_frequency_setfunction ice_dpll_frequency_getfunction ice_dpll_input_frequency_getfunction ice_dpll_output_frequency_getfunction ice_dpll_sw_pin_frequency_setfunction ice_dpll_sw_pin_frequency_getfunction ice_dpll_pin_enablefunction ice_dpll_pin_disablefunction ice_dpll_pin_store_statefunction ice_dpll_rclk_update_e825cfunction ice_dpll_rclk_updatefunction fieldsfunction ice_dpll_pin_state_updatefunction ice_dpll_hw_input_prio_setfunction ice_dpll_lock_status_getfunction ice_dpll_mode_getfunction ice_dpll_phase_offset_monitor_setfunction ice_dpll_phase_offset_monitor_getfunction ice_dpll_pin_state_setfunction ice_dpll_output_state_setfunction ice_dpll_input_state_setfunction ice_dpll_pin_state_getfunction ice_dpll_output_state_getfunction ice_dpll_input_state_getfunction ice_dpll_sw_pin_notify_peerfunction ice_dpll_sma_direction_setfunction ice_dpll_ufl_pin_state_setfunction ice_dpll_sw_pin_state_getfunction ice_dpll_sma_pin_state_setfunction ice_dpll_input_prio_getfunction ice_dpll_input_prio_setfunction ice_dpll_sw_input_prio_getfunction ice_dpll_sw_input_prio_setfunction ice_dpll_input_directionfunction ice_dpll_output_directionfunction ice_dpll_pin_sma_direction_setfunction ice_dpll_pin_sw_direction_getfunction ice_dpll_pin_phase_adjust_getfunction ice_dpll_pin_phase_adjust_setfunction ice_dpll_input_phase_adjust_setfunction ice_dpll_output_phase_adjust_setfunction ice_dpll_sw_phase_adjust_get
Annotated Snippet
if (ICE_AQC_GET_CGU_IN_CFG_FLG2_INPUT_EN & pin->flags[0]) {
if (pin->pin) {
pin->state[pf->dplls.eec.dpll_idx] =
pin->pin == pf->dplls.eec.active_input ?
DPLL_PIN_STATE_CONNECTED :
DPLL_PIN_STATE_SELECTABLE;
pin->state[pf->dplls.pps.dpll_idx] =
pin->pin == pf->dplls.pps.active_input ?
DPLL_PIN_STATE_CONNECTED :
DPLL_PIN_STATE_SELECTABLE;
} else {
pin->state[pf->dplls.eec.dpll_idx] =
DPLL_PIN_STATE_SELECTABLE;
pin->state[pf->dplls.pps.dpll_idx] =
DPLL_PIN_STATE_SELECTABLE;
}
} else {
pin->state[pf->dplls.eec.dpll_idx] =
DPLL_PIN_STATE_DISCONNECTED;
pin->state[pf->dplls.pps.dpll_idx] =
DPLL_PIN_STATE_DISCONNECTED;
}
break;
case ICE_DPLL_PIN_TYPE_OUTPUT:
ret = ice_aq_get_output_pin_cfg(&pf->hw, pin->idx,
&pin->flags[0], &parent,
&pin->freq, NULL);
if (ret)
goto err;
parent &= ICE_AQC_GET_CGU_OUT_CFG_DPLL_SRC_SEL;
if (ICE_AQC_GET_CGU_OUT_CFG_OUT_EN & pin->flags[0]) {
pin->state[pf->dplls.eec.dpll_idx] =
parent == pf->dplls.eec.dpll_idx ?
DPLL_PIN_STATE_CONNECTED :
DPLL_PIN_STATE_DISCONNECTED;
pin->state[pf->dplls.pps.dpll_idx] =
parent == pf->dplls.pps.dpll_idx ?
DPLL_PIN_STATE_CONNECTED :
DPLL_PIN_STATE_DISCONNECTED;
} else {
pin->state[pf->dplls.eec.dpll_idx] =
DPLL_PIN_STATE_DISCONNECTED;
pin->state[pf->dplls.pps.dpll_idx] =
DPLL_PIN_STATE_DISCONNECTED;
}
break;
case ICE_DPLL_PIN_TYPE_RCLK_INPUT:
if (pf->hw.mac_type == ICE_MAC_GENERIC_3K_E825) {
ret = ice_dpll_rclk_update_e825c(pf, pin);
if (ret)
goto err;
} else {
ret = ice_dpll_rclk_update(pf, pin, port_num);
if (ret)
goto err;
}
break;
case ICE_DPLL_PIN_TYPE_SOFTWARE:
ret = ice_dpll_sw_pins_update(pf);
if (ret)
goto err;
break;
default:
return -EINVAL;
}
return 0;
err:
if (extack)
NL_SET_ERR_MSG_FMT(extack,
"err:%d %s failed to update %s pin:%u",
ret,
libie_aq_str(pf->hw.adminq.sq_last_status),
pin_type_name[pin_type], pin->idx);
else
dev_err_ratelimited(ice_pf_to_dev(pf),
"err:%d %s failed to update %s pin:%u\n",
ret,
libie_aq_str(pf->hw.adminq.sq_last_status),
pin_type_name[pin_type], pin->idx);
return ret;
}
/**
* ice_dpll_hw_input_prio_set - set input priority value in hardware
* @pf: board private structure
* @dpll: ice dpll pointer
* @pin: ice pin pointer
* @prio: priority value being set on a dpll
Annotation
- Immediate include surface: `ice.h`, `ice_lib.h`, `ice_trace.h`, `ice_txclk.h`, `linux/dpll.h`, `linux/property.h`.
- Detected declarations: `enum ice_dpll_pin_type`, `function ice_dpll_is_sw_pin`, `function ice_dpll_is_reset`, `function ice_dpll_pin_freq_set`, `function ice_dpll_frequency_set`, `function ice_dpll_input_frequency_set`, `function ice_dpll_output_frequency_set`, `function ice_dpll_frequency_get`, `function ice_dpll_input_frequency_get`, `function ice_dpll_output_frequency_get`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.