drivers/clk/clk-milbeaut.c
Source file repositories/reference/linux-study-clean/drivers/clk/clk-milbeaut.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/clk/clk-milbeaut.c- Extension
.c- Size
- 17409 bytes
- Lines
- 658
- 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.
- 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
linux/clk-provider.hlinux/err.hlinux/io.hlinux/iopoll.hlinux/of_address.hlinux/platform_device.hlinux/slab.hlinux/spinlock.h
Detected Declarations
struct m10v_clk_div_factorsstruct m10v_clk_div_fixed_datastruct m10v_clk_mux_factorsstruct m10v_clk_dividerfunction m10v_mux_get_parentfunction m10v_mux_set_parentfunction m10v_clk_divider_recalc_ratefunction m10v_clk_divider_determine_ratefunction m10v_clk_divider_set_ratefunction m10v_reg_div_prefunction m10v_reg_fixed_prefunction m10v_reg_mux_prefunction m10v_clk_probefunction m10v_cc_init
Annotated Snippet
struct m10v_clk_div_factors {
const char *name;
const char *parent_name;
u32 offset;
u8 shift;
u8 width;
const struct clk_div_table *table;
unsigned long div_flags;
int onecell_idx;
};
struct m10v_clk_div_fixed_data {
const char *name;
const char *parent_name;
u8 div;
u8 mult;
int onecell_idx;
};
struct m10v_clk_mux_factors {
const char *name;
const char * const *parent_names;
u8 num_parents;
u32 offset;
u8 shift;
u8 mask;
u32 *table;
unsigned long mux_flags;
int onecell_idx;
};
static const struct clk_div_table emmcclk_table[] = {
{ .val = 0, .div = 8 },
{ .val = 1, .div = 9 },
{ .val = 2, .div = 10 },
{ .val = 3, .div = 15 },
{ .div = 0 },
};
static const struct clk_div_table mclk400_table[] = {
{ .val = 1, .div = 2 },
{ .val = 3, .div = 4 },
{ .div = 0 },
};
static const struct clk_div_table mclk200_table[] = {
{ .val = 3, .div = 4 },
{ .val = 7, .div = 8 },
{ .div = 0 },
};
static const struct clk_div_table aclk400_table[] = {
{ .val = 1, .div = 2 },
{ .val = 3, .div = 4 },
{ .div = 0 },
};
static const struct clk_div_table aclk300_table[] = {
{ .val = 0, .div = 2 },
{ .val = 1, .div = 3 },
{ .div = 0 },
};
static const struct clk_div_table aclk_table[] = {
{ .val = 3, .div = 4 },
{ .val = 7, .div = 8 },
{ .div = 0 },
};
static const struct clk_div_table aclkexs_table[] = {
{ .val = 3, .div = 4 },
{ .val = 4, .div = 5 },
{ .val = 5, .div = 6 },
{ .val = 7, .div = 8 },
{ .div = 0 },
};
static const struct clk_div_table hclk_table[] = {
{ .val = 7, .div = 8 },
{ .val = 15, .div = 16 },
{ .div = 0 },
};
static const struct clk_div_table hclkbmh_table[] = {
{ .val = 3, .div = 4 },
{ .val = 7, .div = 8 },
{ .div = 0 },
};
static const struct clk_div_table pclk_table[] = {
Annotation
- Immediate include surface: `linux/clk-provider.h`, `linux/err.h`, `linux/io.h`, `linux/iopoll.h`, `linux/of_address.h`, `linux/platform_device.h`, `linux/slab.h`, `linux/spinlock.h`.
- Detected declarations: `struct m10v_clk_div_factors`, `struct m10v_clk_div_fixed_data`, `struct m10v_clk_mux_factors`, `struct m10v_clk_divider`, `function m10v_mux_get_parent`, `function m10v_mux_set_parent`, `function m10v_clk_divider_recalc_rate`, `function m10v_clk_divider_determine_rate`, `function m10v_clk_divider_set_rate`, `function m10v_reg_div_pre`.
- Atlas domain: Driver Families / drivers/clk.
- 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.