arch/arm/mach-davinci/common.c
Source file repositories/reference/linux-study-clean/arch/arm/mach-davinci/common.c
File Facts
- System
- Linux kernel
- Corpus path
arch/arm/mach-davinci/common.c- Extension
.c- Size
- 2295 bytes
- Lines
- 101
- Domain
- Architecture Layer
- Bucket
- arch/arm
- Inferred role
- Architecture Layer: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/module.hlinux/io.hlinux/etherdevice.hlinux/davinci_emac.hlinux/dma-mapping.hlinux/platform_data/davinci-cpufreq.hasm/tlb.hasm/mach/map.hcommon.hcputype.h
Detected Declarations
function davinci_init_idfunction davinci_common_initfunction davinci_init_lateexport davinci_soc_info
Annotated Snippet
if ((dip->part_no == part_no) && (dip->variant == variant)) {
soc_info->cpu_id = dip->cpu_id;
pr_info("DaVinci %s variant 0x%x\n", dip->name,
dip->variant);
return 0;
}
pr_err("Unknown DaVinci JTAG ID 0x%x\n", soc_info->jtag_id);
return -EINVAL;
}
void __init davinci_common_init(const struct davinci_soc_info *soc_info)
{
int ret;
if (!soc_info) {
ret = -EINVAL;
goto err;
}
memcpy(&davinci_soc_info, soc_info, sizeof(struct davinci_soc_info));
if (davinci_soc_info.io_desc && (davinci_soc_info.io_desc_num > 0))
iotable_init(davinci_soc_info.io_desc,
davinci_soc_info.io_desc_num);
/*
* Normally devicemaps_init() would flush caches and tlb after
* mdesc->map_io(), but we must also do it here because of the CPU
* revision check below.
*/
local_flush_tlb_all();
flush_cache_all();
/*
* We want to check CPU revision early for cpu_is_xxxx() macros.
* IO space mapping must be initialized before we can do that.
*/
ret = davinci_init_id(&davinci_soc_info);
if (ret < 0)
goto err;
return;
err:
panic("davinci_common_init: SoC Initialization failed\n");
}
void __init davinci_init_late(void)
{
davinci_cpufreq_init();
}
Annotation
- Immediate include surface: `linux/module.h`, `linux/io.h`, `linux/etherdevice.h`, `linux/davinci_emac.h`, `linux/dma-mapping.h`, `linux/platform_data/davinci-cpufreq.h`, `asm/tlb.h`, `asm/mach/map.h`.
- Detected declarations: `function davinci_init_id`, `function davinci_common_init`, `function davinci_init_late`, `export davinci_soc_info`.
- Atlas domain: Architecture Layer / arch/arm.
- Implementation status: integration 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.