arch/m68k/amiga/platform.c
Source file repositories/reference/linux-study-clean/arch/m68k/amiga/platform.c
File Facts
- System
- Linux kernel
- Corpus path
arch/m68k/amiga/platform.c- Extension
.c- Size
- 5672 bytes
- Lines
- 256
- Domain
- Architecture Layer
- Bucket
- arch/m68k
- 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/err.hlinux/init.hlinux/platform_device.hlinux/zorro.hasm/amigahw.hasm/amigayle.hasm/byteorder.h
Detected Declarations
function amiga_init_busfunction z_dev_presentfunction z_dev_presentfunction amiga_init_devicesmodule init amiga_init_bus
Annotated Snippet
subsys_initcall(amiga_init_bus);
static int __init z_dev_present(zorro_id id)
{
unsigned int i;
for (i = 0; i < zorro_num_autocon; i++) {
const struct ExpansionRom *rom = &zorro_autocon_init[i].rom;
if (be16_to_cpu(rom->er_Manufacturer) == ZORRO_MANUF(id) &&
rom->er_Product == ZORRO_PROD(id))
return 1;
}
return 0;
}
#else /* !CONFIG_ZORRO */
static inline int z_dev_present(zorro_id id) { return 0; }
#endif /* !CONFIG_ZORRO */
static const struct resource a3000_scsi_resource __initconst = {
.start = 0xdd0000,
.end = 0xdd00ff,
.flags = IORESOURCE_MEM,
};
static const struct resource a4000t_scsi_resource __initconst = {
.start = 0xdd0000,
.end = 0xdd0fff,
.flags = IORESOURCE_MEM,
};
static const struct resource a1200_ide_resource __initconst = {
.start = 0xda0000,
.end = 0xda1fff,
.flags = IORESOURCE_MEM,
};
static const struct gayle_ide_platform_data a1200_ide_pdata __initconst = {
.base = 0xda0000,
.irqport = 0xda9000,
.explicit_ack = 1,
};
static const struct resource a4000_ide_resource __initconst = {
.start = 0xdd2000,
.end = 0xdd3fff,
.flags = IORESOURCE_MEM,
};
static const struct gayle_ide_platform_data a4000_ide_pdata __initconst = {
.base = 0xdd2020,
.irqport = 0xdd3020,
.explicit_ack = 0,
};
static const struct resource amiga_rtc_resource __initconst = {
.start = 0x00dc0000,
.end = 0x00dcffff,
.flags = IORESOURCE_MEM,
};
static int __init amiga_init_devices(void)
{
struct platform_device *pdev;
int error;
if (!MACH_IS_AMIGA)
return -ENODEV;
/* video hardware */
if (AMIGAHW_PRESENT(AMI_VIDEO)) {
pdev = platform_device_register_simple("amiga-video", -1, NULL,
0);
if (IS_ERR(pdev))
return PTR_ERR(pdev);
}
/* sound hardware */
if (AMIGAHW_PRESENT(AMI_AUDIO)) {
Annotation
- Immediate include surface: `linux/err.h`, `linux/init.h`, `linux/platform_device.h`, `linux/zorro.h`, `asm/amigahw.h`, `asm/amigayle.h`, `asm/byteorder.h`.
- Detected declarations: `function amiga_init_bus`, `function z_dev_present`, `function z_dev_present`, `function amiga_init_devices`, `module init amiga_init_bus`.
- Atlas domain: Architecture Layer / arch/m68k.
- 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.