arch/arm/mach-omap2/cm_common.c
Source file repositories/reference/linux-study-clean/arch/arm/mach-omap2/cm_common.c
File Facts
- System
- Linux kernel
- Corpus path
arch/arm/mach-omap2/cm_common.c- Extension
.c- Size
- 10704 bytes
- Lines
- 380
- Domain
- Architecture Layer
- Bucket
- arch/arm
- Inferred role
- Architecture Layer: implementation source
- Status
- source implementation candidate
Why This File Exists
CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/kernel.hlinux/init.hlinux/errno.hlinux/bug.hlinux/of.hlinux/of_address.hcm2xxx.hcm3xxx.hcm33xx.hcm44xx.hclock.h
Detected Declarations
function cm_split_idlest_regfunction omap_cm_wait_module_readyfunction omap_cm_wait_module_idlefunction byfunction byfunction omap_cm_xlate_clkctrlfunction cm_unregisterfunction cm_registerfunction omap2_cm_base_initfunction for_each_matching_node_and_matchfunction omap_cm_initfunction for_each_matching_node_and_match
Annotated Snippet
if (ret) {
of_node_put(np);
return ret;
}
if (data->index == TI_CLKM_CM)
mem = &cm_base;
if (data->index == TI_CLKM_CM2)
mem = &cm2_base;
data->mem = ioremap(res.start, resource_size(&res));
if (mem) {
mem->pa = res.start + data->offset;
mem->va = data->mem + data->offset;
mem->offset = data->offset;
}
data->np = np;
if (data->init && (data->flags & CM_SINGLE_INSTANCE ||
(cm_base.va && cm2_base.va)))
data->init(data);
}
return 0;
}
/**
* omap_cm_init - low level init for the CM drivers
*
* Initializes the low level clock infrastructure for CM drivers.
* Returns 0 in success, negative error value in failure.
*/
int __init omap_cm_init(void)
{
struct device_node *np;
const struct of_device_id *match;
const struct omap_prcm_init_data *data;
int ret;
for_each_matching_node_and_match(np, omap_cm_dt_match_table, &match) {
data = match->data;
if (data->flags & CM_NO_CLOCKS)
continue;
ret = omap2_clk_provider_init(np, data->index, NULL, data->mem);
if (ret) {
of_node_put(np);
return ret;
}
}
return 0;
}
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/init.h`, `linux/errno.h`, `linux/bug.h`, `linux/of.h`, `linux/of_address.h`, `cm2xxx.h`, `cm3xxx.h`.
- Detected declarations: `function cm_split_idlest_reg`, `function omap_cm_wait_module_ready`, `function omap_cm_wait_module_idle`, `function by`, `function by`, `function omap_cm_xlate_clkctrl`, `function cm_unregister`, `function cm_register`, `function omap2_cm_base_init`, `function for_each_matching_node_and_match`.
- Atlas domain: Architecture Layer / arch/arm.
- 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.