include/linux/rtsx_pci.h
Source file repositories/reference/linux-study-clean/include/linux/rtsx_pci.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/rtsx_pci.h- Extension
.h- Size
- 40978 bytes
- Lines
- 1363
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/sched.hlinux/pci.hlinux/rtsx_common.h
Detected Declarations
struct rtsx_pcrstruct pcr_handlestruct pcr_opsstruct rtsx_cr_optionstruct rtsx_hw_paramstruct rtsx_pcrenum PDEV_STATenum ASPM_MODEfunction rtsx_pci_write_be32function rtsx_pci_update_phy
Annotated Snippet
struct pcr_handle {
struct rtsx_pcr *pcr;
};
struct pcr_ops {
int (*write_phy)(struct rtsx_pcr *pcr, u8 addr, u16 val);
int (*read_phy)(struct rtsx_pcr *pcr, u8 addr, u16 *val);
int (*extra_init_hw)(struct rtsx_pcr *pcr);
int (*optimize_phy)(struct rtsx_pcr *pcr);
int (*turn_on_led)(struct rtsx_pcr *pcr);
int (*turn_off_led)(struct rtsx_pcr *pcr);
int (*enable_auto_blink)(struct rtsx_pcr *pcr);
int (*disable_auto_blink)(struct rtsx_pcr *pcr);
int (*card_power_on)(struct rtsx_pcr *pcr, int card);
int (*card_power_off)(struct rtsx_pcr *pcr, int card);
int (*switch_output_voltage)(struct rtsx_pcr *pcr,
u8 voltage);
unsigned int (*cd_deglitch)(struct rtsx_pcr *pcr);
int (*conv_clk_and_div_n)(int clk, int dir);
void (*fetch_vendor_settings)(struct rtsx_pcr *pcr);
void (*force_power_down)(struct rtsx_pcr *pcr, u8 pm_state, bool runtime);
void (*stop_cmd)(struct rtsx_pcr *pcr);
void (*set_aspm)(struct rtsx_pcr *pcr, bool enable);
void (*set_l1off_cfg_sub_d0)(struct rtsx_pcr *pcr, int active);
void (*enable_ocp)(struct rtsx_pcr *pcr);
void (*disable_ocp)(struct rtsx_pcr *pcr);
void (*init_ocp)(struct rtsx_pcr *pcr);
void (*process_ocp)(struct rtsx_pcr *pcr);
int (*get_ocpstat)(struct rtsx_pcr *pcr, u8 *val);
void (*clear_ocpstat)(struct rtsx_pcr *pcr);
};
enum PDEV_STAT {PDEV_STAT_IDLE, PDEV_STAT_RUN};
enum ASPM_MODE {ASPM_MODE_CFG, ASPM_MODE_REG};
#define ASPM_L1_1_EN BIT(0)
#define ASPM_L1_2_EN BIT(1)
#define PM_L1_1_EN BIT(2)
#define PM_L1_2_EN BIT(3)
#define LTR_L1SS_PWR_GATE_EN BIT(4)
#define L1_SNOOZE_TEST_EN BIT(5)
#define LTR_L1SS_PWR_GATE_CHECK_CARD_EN BIT(6)
/*
* struct rtsx_cr_option - card reader option
* @dev_flags: device flags
* @force_clkreq_0: force clock request
* @ltr_en: enable ltr mode flag
* @ltr_enabled: ltr mode in configure space flag
* @ltr_active: ltr mode status
* @ltr_active_latency: ltr mode active latency
* @ltr_idle_latency: ltr mode idle latency
* @ltr_l1off_latency: ltr mode l1off latency
* @l1_snooze_delay: l1 snooze delay
* @ltr_l1off_sspwrgate: ltr l1off sspwrgate
* @ltr_l1off_snooze_sspwrgate: ltr l1off snooze sspwrgate
* @ocp_en: enable ocp flag
* @sd_400mA_ocp_thd: 400mA ocp thd
* @sd_800mA_ocp_thd: 800mA ocp thd
*/
struct rtsx_cr_option {
u32 dev_flags;
bool force_clkreq_0;
bool ltr_en;
bool ltr_enabled;
bool ltr_active;
u32 ltr_active_latency;
u32 ltr_idle_latency;
u32 ltr_l1off_latency;
u32 l1_snooze_delay;
u8 ltr_l1off_sspwrgate;
u8 ltr_l1off_snooze_sspwrgate;
bool ocp_en;
u8 sd_400mA_ocp_thd;
u8 sd_800mA_ocp_thd;
u8 sd_cd_reverse_en;
u8 sd_wp_reverse_en;
};
/*
* struct rtsx_hw_param - card reader hardware param
* @interrupt_en: indicate which interrutp enable
* @ocp_glitch: ocp glitch time
*/
struct rtsx_hw_param {
u32 interrupt_en;
u8 ocp_glitch;
};
Annotation
- Immediate include surface: `linux/sched.h`, `linux/pci.h`, `linux/rtsx_common.h`.
- Detected declarations: `struct rtsx_pcr`, `struct pcr_handle`, `struct pcr_ops`, `struct rtsx_cr_option`, `struct rtsx_hw_param`, `struct rtsx_pcr`, `enum PDEV_STAT`, `enum ASPM_MODE`, `function rtsx_pci_write_be32`, `function rtsx_pci_update_phy`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: source implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.