arch/mips/ralink/rt305x.c
Source file repositories/reference/linux-study-clean/arch/mips/ralink/rt305x.c
File Facts
- System
- Linux kernel
- Corpus path
arch/mips/ralink/rt305x.c- Extension
.c- Size
- 4951 bytes
- Lines
- 216
- Domain
- Architecture Layer
- Bucket
- arch/mips
- 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.
- 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/kernel.hlinux/init.hlinux/bug.hlinux/slab.hlinux/sys_soc.hasm/io.hasm/mipsregs.hasm/mach-ralink/ralink_regs.hasm/mach-ralink/rt305x.hcommon.h
Detected Declarations
function rt5350_get_mem_sizefunction rt305x_get_soc_name0function rt305x_get_soc_name1function rt3052_soc_validfunction rt3350_soc_validfunction rt3352_soc_validfunction rt5350_soc_validfunction rt305x_get_soc_idfunction rt305x_get_soc_verfunction rt305x_get_soc_revfunction rt305x_soc_dev_initfunction prom_soc_initmodule init rt305x_soc_dev_init
Annotated Snippet
device_initcall(rt305x_soc_dev_init);
void __init prom_soc_init(struct ralink_soc_info *soc_info)
{
const char *name = rt305x_get_soc_name(soc_info);
snprintf(soc_info->sys_type, RAMIPS_SYS_TYPE_LEN,
"Ralink %s id:%u rev:%u",
name,
rt305x_get_soc_ver(),
rt305x_get_soc_rev());
soc_info->mem_base = RT305X_SDRAM_BASE;
if (soc_is_rt5350()) {
soc_info->mem_size = rt5350_get_mem_size();
} else if (soc_is_rt305x() || soc_is_rt3350()) {
soc_info->mem_size_min = RT305X_MEM_SIZE_MIN;
soc_info->mem_size_max = RT305X_MEM_SIZE_MAX;
} else if (soc_is_rt3352()) {
soc_info->mem_size_min = RT3352_MEM_SIZE_MIN;
soc_info->mem_size_max = RT3352_MEM_SIZE_MAX;
}
soc_info_ptr = soc_info;
}
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/init.h`, `linux/bug.h`, `linux/slab.h`, `linux/sys_soc.h`, `asm/io.h`, `asm/mipsregs.h`, `asm/mach-ralink/ralink_regs.h`.
- Detected declarations: `function rt5350_get_mem_size`, `function rt305x_get_soc_name0`, `function rt305x_get_soc_name1`, `function rt3052_soc_valid`, `function rt3350_soc_valid`, `function rt3352_soc_valid`, `function rt5350_soc_valid`, `function rt305x_get_soc_id`, `function rt305x_get_soc_ver`, `function rt305x_get_soc_rev`.
- Atlas domain: Architecture Layer / arch/mips.
- 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.