arch/arm/mach-exynos/exynos.c
Source file repositories/reference/linux-study-clean/arch/arm/mach-exynos/exynos.c
File Facts
- System
- Linux kernel
- Corpus path
arch/arm/mach-exynos/exynos.c- Extension
.c- Size
- 6003 bytes
- Lines
- 224
- 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/init.hlinux/io.hlinux/of.hlinux/of_address.hlinux/of_fdt.hlinux/platform_device.hlinux/irqchip.hlinux/soc/samsung/exynos-regs-pmu.hasm/cacheflush.hasm/hardware/cache-l2x0.hasm/mach/arch.hasm/mach/map.hcommon.h
Detected Declarations
function exynos_revfunction exynos_sysram_initfunction for_each_compatible_node_scopedfunction exynos_fdt_map_chipidfunction exynos_init_iofunction exynos_set_delayed_reset_assertionfunction exynos_map_pmufunction exynos_init_irqfunction exynos_dt_machine_initfunction exynos_dt_fixup
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0
//
// Samsung Exynos Flattened Device Tree enabled machine
//
// Copyright (c) 2010-2014 Samsung Electronics Co., Ltd.
// http://www.samsung.com
#include <linux/init.h>
#include <linux/io.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/of_fdt.h>
#include <linux/platform_device.h>
#include <linux/irqchip.h>
#include <linux/soc/samsung/exynos-regs-pmu.h>
#include <asm/cacheflush.h>
#include <asm/hardware/cache-l2x0.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
#include "common.h"
#define S3C_ADDR_BASE 0xF6000000
#define S3C_ADDR(x) ((void __iomem __force *)S3C_ADDR_BASE + (x))
#define S5P_VA_CHIPID S3C_ADDR(0x02000000)
static struct platform_device exynos_cpuidle = {
.name = "exynos_cpuidle",
#ifdef CONFIG_ARM_EXYNOS_CPUIDLE
.dev.platform_data = exynos_enter_aftr,
#endif
.id = -1,
};
void __iomem *sysram_base_addr __ro_after_init;
phys_addr_t sysram_base_phys __ro_after_init;
void __iomem *sysram_ns_base_addr __ro_after_init;
unsigned long exynos_cpu_id;
static unsigned int exynos_cpu_rev;
unsigned int exynos_rev(void)
{
return exynos_cpu_rev;
}
void __init exynos_sysram_init(void)
{
for_each_compatible_node_scoped(node, NULL, "samsung,exynos4210-sysram") {
struct resource res;
if (!of_device_is_available(node))
continue;
of_address_to_resource(node, 0, &res);
sysram_base_addr = ioremap(res.start, resource_size(&res));
sysram_base_phys = res.start;
break;
}
for_each_compatible_node_scoped(node, NULL, "samsung,exynos4210-sysram-ns") {
if (!of_device_is_available(node))
continue;
sysram_ns_base_addr = of_iomap(node, 0);
break;
}
}
static int __init exynos_fdt_map_chipid(unsigned long node, const char *uname,
int depth, void *data)
{
struct map_desc iodesc;
const __be32 *reg;
int len;
if (!of_flat_dt_is_compatible(node, "samsung,exynos4210-chipid"))
return 0;
reg = of_get_flat_dt_prop(node, "reg", &len);
if (reg == NULL || len != (sizeof(unsigned long) * 2))
return 0;
iodesc.pfn = __phys_to_pfn(be32_to_cpu(reg[0]));
iodesc.length = be32_to_cpu(reg[1]) - 1;
iodesc.virtual = (unsigned long)S5P_VA_CHIPID;
iodesc.type = MT_DEVICE;
iotable_init(&iodesc, 1);
return 1;
}
Annotation
- Immediate include surface: `linux/init.h`, `linux/io.h`, `linux/of.h`, `linux/of_address.h`, `linux/of_fdt.h`, `linux/platform_device.h`, `linux/irqchip.h`, `linux/soc/samsung/exynos-regs-pmu.h`.
- Detected declarations: `function exynos_rev`, `function exynos_sysram_init`, `function for_each_compatible_node_scoped`, `function exynos_fdt_map_chipid`, `function exynos_init_io`, `function exynos_set_delayed_reset_assertion`, `function exynos_map_pmu`, `function exynos_init_irq`, `function exynos_dt_machine_init`, `function exynos_dt_fixup`.
- 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.