arch/powerpc/sysdev/of_rtc.c
Source file repositories/reference/linux-study-clean/arch/powerpc/sysdev/of_rtc.c
File Facts
- System
- Linux kernel
- Corpus path
arch/powerpc/sysdev/of_rtc.c- Extension
.c- Size
- 1395 bytes
- Lines
- 60
- Domain
- Architecture Layer
- Bucket
- arch/powerpc
- 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.
- 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/of.hlinux/of_address.hlinux/platform_device.hlinux/slab.hasm/prom.h
Detected Declarations
function of_instantiate_rtcfunction for_each_compatible_node
Annotated Snippet
if (!res) {
printk(KERN_ERR "OF RTC: Out of memory "
"allocating resource structure for %pOF\n",
node);
continue;
}
err = of_address_to_resource(node, 0, res);
if (err) {
printk(KERN_ERR "OF RTC: Error "
"translating resources for %pOF\n",
node);
continue;
}
printk(KERN_INFO "OF_RTC: %pOF is a %s @ 0x%llx-0x%llx\n",
node, plat_name,
(unsigned long long)res->start,
(unsigned long long)res->end);
platform_device_register_simple(plat_name, -1, res, 1);
}
}
}
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/init.h`, `linux/of.h`, `linux/of_address.h`, `linux/platform_device.h`, `linux/slab.h`, `asm/prom.h`.
- Detected declarations: `function of_instantiate_rtc`, `function for_each_compatible_node`.
- Atlas domain: Architecture Layer / arch/powerpc.
- 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.