drivers/clk/pxa/clk-pxa27x.c
Source file repositories/reference/linux-study-clean/drivers/clk/pxa/clk-pxa27x.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/clk/pxa/clk-pxa27x.c- Extension
.c- Size
- 13527 bytes
- Lines
- 485
- Domain
- Driver Families
- Bucket
- drivers/clk
- 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/clk-provider.hlinux/io.hlinux/clk.hlinux/clkdev.hlinux/of.hlinux/soc/pxa/smemc.hlinux/clk/pxa.hdt-bindings/clock/pxa-clock.hclk-pxa.hclk-pxa2xx.h
Detected Declarations
struct dummy_clkfunction mdrefr_drifunction pxa27x_get_clk_frequency_khzfunction pxa27x_is_ppll_disabledfunction clk_pxa27x_cpll_get_ratefunction clk_pxa27x_cpll_determine_ratefunction clk_pxa27x_cpll_set_ratefunction clk_pxa27x_lcd_base_get_ratefunction clk_pxa27x_lcd_base_get_parentfunction pxa27x_register_pllsfunction clk_pxa27x_core_get_parentfunction clk_pxa27x_core_set_parentfunction clk_pxa27x_core_determine_ratefunction clk_pxa27x_run_get_ratefunction pxa27x_register_corefunction clk_pxa27x_system_bus_get_ratefunction clk_pxa27x_system_bus_get_parentfunction clk_pxa27x_memory_get_ratefunction clk_pxa27x_memory_get_parentfunction pxa27x_dummy_clocks_initfunction pxa27x_base_clocks_initfunction pxa27x_clocks_initfunction pxa27x_dt_clocks_init
Annotated Snippet
struct dummy_clk {
const char *con_id;
const char *dev_id;
const char *parent;
};
static struct dummy_clk dummy_clks[] __initdata = {
DUMMY_CLK(NULL, "pxa27x-gpio", "osc_32_768khz"),
DUMMY_CLK(NULL, "pxa-rtc", "osc_32_768khz"),
DUMMY_CLK(NULL, "sa1100-rtc", "osc_32_768khz"),
DUMMY_CLK("UARTCLK", "pxa2xx-ir", "STUART"),
};
static void __init pxa27x_dummy_clocks_init(void)
{
struct clk *clk;
struct dummy_clk *d;
const char *name;
int i;
for (i = 0; i < ARRAY_SIZE(dummy_clks); i++) {
d = &dummy_clks[i];
name = d->dev_id ? d->dev_id : d->con_id;
clk = clk_register_fixed_factor(NULL, name, d->parent, 0, 1, 1);
clk_register_clkdev(clk, d->con_id, d->dev_id);
}
}
static void __init pxa27x_base_clocks_init(void)
{
pxa27x_register_plls();
pxa27x_register_core();
clkdev_pxa_register(CLK_NONE, "system_bus", NULL,
clk_register_clk_pxa27x_system_bus());
clkdev_pxa_register(CLK_NONE, "memory", NULL,
clk_register_clk_pxa27x_memory());
clk_register_clk_pxa27x_lcd_base();
}
int __init pxa27x_clocks_init(void __iomem *regs)
{
clk_regs = regs;
pxa27x_base_clocks_init();
pxa27x_dummy_clocks_init();
return clk_pxa_cken_init(pxa27x_clocks, ARRAY_SIZE(pxa27x_clocks), regs);
}
static void __init pxa27x_dt_clocks_init(struct device_node *np)
{
pxa27x_clocks_init(ioremap(0x41300000ul, 0x10));
clk_pxa_dt_common_init(np);
}
CLK_OF_DECLARE(pxa_clks, "marvell,pxa270-clocks", pxa27x_dt_clocks_init);
Annotation
- Immediate include surface: `linux/clk-provider.h`, `linux/io.h`, `linux/clk.h`, `linux/clkdev.h`, `linux/of.h`, `linux/soc/pxa/smemc.h`, `linux/clk/pxa.h`, `dt-bindings/clock/pxa-clock.h`.
- Detected declarations: `struct dummy_clk`, `function mdrefr_dri`, `function pxa27x_get_clk_frequency_khz`, `function pxa27x_is_ppll_disabled`, `function clk_pxa27x_cpll_get_rate`, `function clk_pxa27x_cpll_determine_rate`, `function clk_pxa27x_cpll_set_rate`, `function clk_pxa27x_lcd_base_get_rate`, `function clk_pxa27x_lcd_base_get_parent`, `function pxa27x_register_plls`.
- Atlas domain: Driver Families / drivers/clk.
- 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.