arch/arm/mach-highbank/highbank.c
Source file repositories/reference/linux-study-clean/arch/arm/mach-highbank/highbank.c
File Facts
- System
- Linux kernel
- Corpus path
arch/arm/mach-highbank/highbank.c- Extension
.c- Size
- 3945 bytes
- Lines
- 176
- 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/clk.hlinux/clkdev.hlinux/clocksource.hlinux/dma-map-ops.hlinux/input.hlinux/io.hlinux/irqchip.hlinux/pl320-ipc.hlinux/of.hlinux/of_irq.hlinux/of_address.hlinux/reboot.hlinux/amba/bus.hlinux/platform_device.hlinux/psci.hasm/hardware/cache-l2x0.hasm/mach/arch.hasm/mach/map.hcore.hsysregs.h
Detected Declarations
function highbank_scu_map_iofunction highbank_l2c310_write_secfunction highbank_init_irqfunction highbank_power_offfunction highbank_platform_notifierfunction hb_keys_notifierfunction highbank_init
Annotated Snippet
else if (of_device_is_compatible(dev->of_node, "calxeda,hb-xgmac")) {
res = platform_get_resource(to_platform_device(dev),
IORESOURCE_MEM, 0);
if (res) {
if (res->start == 0xfff50000)
reg = 0;
else if (res->start == 0xfff51000)
reg = 4;
}
}
if (reg < 0)
return NOTIFY_DONE;
if (of_property_read_bool(dev->of_node, "dma-coherent")) {
val = readl(sregs_base + reg);
writel(val | 0xff01, sregs_base + reg);
dev_set_dma_coherent(dev);
}
return NOTIFY_OK;
}
static struct notifier_block highbank_amba_nb = {
.notifier_call = highbank_platform_notifier,
};
static struct notifier_block highbank_platform_nb = {
.notifier_call = highbank_platform_notifier,
};
static struct platform_device highbank_cpuidle_device = {
.name = "cpuidle-calxeda",
};
static int hb_keys_notifier(struct notifier_block *nb, unsigned long event, void *data)
{
u32 key = *(u32 *)data;
if (event != 0x1000)
return 0;
if (key == KEY_POWER)
orderly_poweroff(false);
else if (key == 0xffff)
ctrl_alt_del();
return 0;
}
static struct notifier_block hb_keys_nb = {
.notifier_call = hb_keys_notifier,
};
static void __init highbank_init(void)
{
struct device_node *np;
/* Map system registers */
np = of_find_compatible_node(NULL, NULL, "calxeda,hb-sregs");
sregs_base = of_iomap(np, 0);
WARN_ON(!sregs_base);
register_platform_power_off(highbank_power_off);
highbank_pm_init();
bus_register_notifier(&platform_bus_type, &highbank_platform_nb);
bus_register_notifier(&amba_bustype, &highbank_amba_nb);
pl320_ipc_register_notifier(&hb_keys_nb);
if (psci_ops.cpu_suspend)
platform_device_register(&highbank_cpuidle_device);
}
static const char *const highbank_match[] __initconst = {
"calxeda,highbank",
"calxeda,ecx-2000",
NULL,
};
DT_MACHINE_START(HIGHBANK, "Highbank")
#if defined(CONFIG_ZONE_DMA) && defined(CONFIG_ARM_LPAE)
.dma_zone_size = (4ULL * SZ_1G),
#endif
.l2c_aux_val = 0,
.l2c_aux_mask = ~0,
.l2c_write_sec = highbank_l2c310_write_sec,
.init_irq = highbank_init_irq,
.init_machine = highbank_init,
.dt_compat = highbank_match,
Annotation
- Immediate include surface: `linux/clk.h`, `linux/clkdev.h`, `linux/clocksource.h`, `linux/dma-map-ops.h`, `linux/input.h`, `linux/io.h`, `linux/irqchip.h`, `linux/pl320-ipc.h`.
- Detected declarations: `function highbank_scu_map_io`, `function highbank_l2c310_write_sec`, `function highbank_init_irq`, `function highbank_power_off`, `function highbank_platform_notifier`, `function hb_keys_notifier`, `function highbank_init`.
- 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.