drivers/mmc/host/sdhci-of-arasan.c
Source file repositories/reference/linux-study-clean/drivers/mmc/host/sdhci-of-arasan.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/mmc/host/sdhci-of-arasan.c- Extension
.c- Size
- 60132 bytes
- Lines
- 2058
- Domain
- Driver Families
- Bucket
- drivers/mmc
- 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.
- 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
linux/clk-provider.hlinux/mfd/syscon.hlinux/module.hlinux/of.hlinux/platform_device.hlinux/phy/phy.hlinux/regmap.hlinux/reset.hlinux/firmware/xlnx-zynqmp.hcqhci.hsdhci-cqhci.hsdhci-pltfm.h
Detected Declarations
struct sdhci_arasan_soc_ctl_fieldstruct sdhci_arasan_soc_ctl_mapstruct sdhci_arasan_clk_opsstruct sdhci_arasan_clk_datastruct sdhci_arasan_datastruct sdhci_arasan_of_datafunction sdhci_arasan_phy_set_delaychainfunction sdhci_arasan_phy_set_dllfunction sdhci_arasan_phy_dll_set_freqfunction availablefunction sdhci_arasan_set_clockfunction sdhci_set_clockfunction sdhci_arasan_hs400_enhanced_strobefunction sdhci_arasan_resetfunction sdhci_arasan_hw_resetfunction sdhci_arasan_voltage_switchfunction sdhci_arasan_set_power_and_bus_voltagefunction sdhci_arasan_cqhci_irqfunction sdhci_arasan_dumpregsfunction sdhci_arasan_cqe_enablefunction sdhci_arasan_suspendfunction sdhci_arasan_resumefunction sdhci_arasan_sdcardclk_recalc_ratefunction sdhci_arasan_sampleclk_recalc_ratefunction sdhci_zynqmp_sdcardclk_set_phasefunction sdhci_zynqmp_sampleclk_set_phasefunction sdhci_versal_sdcardclk_set_phasefunction sdhci_versal_sampleclk_set_phasefunction sdhci_versal_net_emmc_sdcardclk_set_phasefunction sdhci_versal_net_emmc_sampleclk_set_phasefunction arasan_zynqmp_dll_resetfunction arasan_zynqmp_execute_tuningfunction sdhci_arasan_update_clockmultiplierfunction sdhci_arasan_update_baseclkfreqfunction sdhci_arasan_set_clk_delaysfunction arasan_dt_parse_clk_phasesfunction sdhci_arasan_register_sdcardclkfunction sdhci_arasan_register_sampleclkfunction sdhci_arasan_unregister_sdclkfunction sdhci_arasan_update_support64bfunction laterfunction sdhci_zynqmp_set_dynamic_configfunction sdhci_arasan_add_hostfunction sdhci_arasan_probefunction sdhci_arasan_remove
Annotated Snippet
struct sdhci_arasan_soc_ctl_field {
u32 reg;
u16 width;
s16 shift;
};
/**
* struct sdhci_arasan_soc_ctl_map - Map in syscon to corecfg registers
*
* @baseclkfreq: Where to find corecfg_baseclkfreq
* @clockmultiplier: Where to find corecfg_clockmultiplier
* @support64b: Where to find SUPPORT64B bit
* @hiword_update: If true, use HIWORD_UPDATE to access the syscon
*
* It's up to the licensee of the Arsan IP block to make these available
* somewhere if needed. Presumably these will be scattered somewhere that's
* accessible via the syscon API.
*/
struct sdhci_arasan_soc_ctl_map {
struct sdhci_arasan_soc_ctl_field baseclkfreq;
struct sdhci_arasan_soc_ctl_field clockmultiplier;
struct sdhci_arasan_soc_ctl_field support64b;
bool hiword_update;
};
/**
* struct sdhci_arasan_clk_ops - Clock Operations for Arasan SD controller
*
* @sdcardclk_ops: The output clock related operations
* @sampleclk_ops: The sample clock related operations
*/
struct sdhci_arasan_clk_ops {
const struct clk_ops *sdcardclk_ops;
const struct clk_ops *sampleclk_ops;
};
/**
* struct sdhci_arasan_clk_data - Arasan Controller Clock Data.
*
* @sdcardclk_hw: Struct for the clock we might provide to a PHY.
* @sdcardclk: Pointer to normal 'struct clock' for sdcardclk_hw.
* @sampleclk_hw: Struct for the clock we might provide to a PHY.
* @sampleclk: Pointer to normal 'struct clock' for sampleclk_hw.
* @phase_map: Struct for mmc_clk_phase_map provided.
* @set_clk_delays: Function pointer for setting Clock Delays
* @clk_of_data: Platform specific runtime clock data storage pointer
*/
struct sdhci_arasan_clk_data {
struct clk_hw sdcardclk_hw;
struct clk *sdcardclk;
struct clk_hw sampleclk_hw;
struct clk *sampleclk;
struct mmc_clk_phase_map phase_map;
void (*set_clk_delays)(struct sdhci_host *host);
void *clk_of_data;
};
/**
* struct sdhci_arasan_data - Arasan Controller Data
*
* @host: Pointer to the main SDHCI host structure.
* @clk_ahb: Pointer to the AHB clock
* @phy: Pointer to the generic phy
* @is_phy_on: True if the PHY is on; false if not.
* @internal_phy_reg: True if the PHY is within the Host controller.
* @has_cqe: True if controller has command queuing engine.
* @clk_data: Struct for the Arasan Controller Clock Data.
* @clk_ops: Struct for the Arasan Controller Clock Operations.
* @soc_ctl_base: Pointer to regmap for syscon for soc_ctl registers.
* @soc_ctl_map: Map to get offsets into soc_ctl registers.
* @quirks: Arasan deviations from spec.
*/
struct sdhci_arasan_data {
struct sdhci_host *host;
struct clk *clk_ahb;
struct phy *phy;
bool is_phy_on;
bool internal_phy_reg;
bool has_cqe;
struct sdhci_arasan_clk_data clk_data;
const struct sdhci_arasan_clk_ops *clk_ops;
struct regmap *soc_ctl_base;
const struct sdhci_arasan_soc_ctl_map *soc_ctl_map;
unsigned int quirks;
/* Controller does not have CD wired and will not function normally without */
#define SDHCI_ARASAN_QUIRK_FORCE_CDTEST BIT(0)
/* Controller immediately reports SDHCI_CLOCK_INT_STABLE after enabling the
Annotation
- Immediate include surface: `linux/clk-provider.h`, `linux/mfd/syscon.h`, `linux/module.h`, `linux/of.h`, `linux/platform_device.h`, `linux/phy/phy.h`, `linux/regmap.h`, `linux/reset.h`.
- Detected declarations: `struct sdhci_arasan_soc_ctl_field`, `struct sdhci_arasan_soc_ctl_map`, `struct sdhci_arasan_clk_ops`, `struct sdhci_arasan_clk_data`, `struct sdhci_arasan_data`, `struct sdhci_arasan_of_data`, `function sdhci_arasan_phy_set_delaychain`, `function sdhci_arasan_phy_set_dll`, `function sdhci_arasan_phy_dll_set_freq`, `function available`.
- Atlas domain: Driver Families / drivers/mmc.
- 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.