drivers/clk/meson/meson8b.c
Source file repositories/reference/linux-study-clean/drivers/clk/meson/meson8b.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/clk/meson/meson8b.c- Extension
.c- Size
- 108947 bytes
- Lines
- 3721
- 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.
- 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.hlinux/clk-provider.hlinux/init.hlinux/mfd/syscon.hlinux/of_address.hlinux/reset-controller.hlinux/slab.hlinux/regmap.hclk-regmap.hmeson-clkc-utils.hclk-pll.hclk-mpll.hdt-bindings/clock/meson8b-clkc.hdt-bindings/reset/amlogic,meson8b-clkc-reset.h
Detected Declarations
struct meson8b_clk_resetstruct meson8b_nb_datafunction treesfunction meson8b_clk_reset_updatefunction meson8b_clk_reset_assertfunction meson8b_clk_reset_deassertfunction meson8b_cpu_clk_notifier_cbfunction meson8b_clkc_init_commonfunction meson8_clkc_initfunction meson8b_clkc_initfunction meson8m2_clkc_init
Annotated Snippet
struct meson8b_clk_reset {
struct reset_controller_dev reset;
struct regmap *regmap;
};
static const struct pll_params_table sys_pll_params_table[] = {
PLL_PARAMS(50, 1),
PLL_PARAMS(51, 1),
PLL_PARAMS(52, 1),
PLL_PARAMS(53, 1),
PLL_PARAMS(54, 1),
PLL_PARAMS(55, 1),
PLL_PARAMS(56, 1),
PLL_PARAMS(57, 1),
PLL_PARAMS(58, 1),
PLL_PARAMS(59, 1),
PLL_PARAMS(60, 1),
PLL_PARAMS(61, 1),
PLL_PARAMS(62, 1),
PLL_PARAMS(63, 1),
PLL_PARAMS(64, 1),
PLL_PARAMS(65, 1),
PLL_PARAMS(66, 1),
PLL_PARAMS(67, 1),
PLL_PARAMS(68, 1),
PLL_PARAMS(84, 1),
{ /* sentinel */ },
};
static struct clk_regmap meson8b_fixed_pll_dco = {
.data = &(struct meson_clk_pll_data){
.en = {
.reg_off = HHI_MPLL_CNTL,
.shift = 30,
.width = 1,
},
.m = {
.reg_off = HHI_MPLL_CNTL,
.shift = 0,
.width = 9,
},
.n = {
.reg_off = HHI_MPLL_CNTL,
.shift = 9,
.width = 5,
},
.frac = {
.reg_off = HHI_MPLL_CNTL2,
.shift = 0,
.width = 12,
},
.l = {
.reg_off = HHI_MPLL_CNTL,
.shift = 31,
.width = 1,
},
.rst = {
.reg_off = HHI_MPLL_CNTL,
.shift = 29,
.width = 1,
},
},
.hw.init = &(struct clk_init_data){
.name = "fixed_pll_dco",
.ops = &meson_clk_pll_ro_ops,
.parent_data = &(const struct clk_parent_data) {
.fw_name = "xtal",
.name = "xtal",
.index = -1,
},
.num_parents = 1,
},
};
static struct clk_regmap meson8b_fixed_pll = {
.data = &(struct clk_regmap_div_data){
.offset = HHI_MPLL_CNTL,
.shift = 16,
.width = 2,
.flags = CLK_DIVIDER_POWER_OF_TWO,
},
.hw.init = &(struct clk_init_data){
.name = "fixed_pll",
.ops = &clk_regmap_divider_ro_ops,
.parent_hws = (const struct clk_hw *[]) {
&meson8b_fixed_pll_dco.hw
},
.num_parents = 1,
/*
* This clock won't ever change at runtime so
Annotation
- Immediate include surface: `linux/clk.h`, `linux/clk-provider.h`, `linux/init.h`, `linux/mfd/syscon.h`, `linux/of_address.h`, `linux/reset-controller.h`, `linux/slab.h`, `linux/regmap.h`.
- Detected declarations: `struct meson8b_clk_reset`, `struct meson8b_nb_data`, `function trees`, `function meson8b_clk_reset_update`, `function meson8b_clk_reset_assert`, `function meson8b_clk_reset_deassert`, `function meson8b_cpu_clk_notifier_cb`, `function meson8b_clkc_init_common`, `function meson8_clkc_init`, `function meson8b_clkc_init`.
- 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.