arch/m68k/coldfire/amcore.c
Source file repositories/reference/linux-study-clean/arch/m68k/coldfire/amcore.c
File Facts
- System
- Linux kernel
- Corpus path
arch/m68k/coldfire/amcore.c- Extension
.c- Size
- 3319 bytes
- Lines
- 157
- Domain
- Architecture Layer
- Bucket
- arch/m68k
- 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/device.hlinux/platform_device.hlinux/dm9000.hlinux/irq.hlinux/interrupt.hlinux/mtd/mtd.hlinux/mtd/map.hlinux/mtd/partitions.hlinux/mtd/physmap.hlinux/i2c.hasm/coldfire.hasm/mcfsim.hasm/io.h
Detected Declarations
function dm9000_pre_initfunction init_amcore
Annotated Snippet
#include <linux/device.h>
#include <linux/platform_device.h>
#include <linux/dm9000.h>
#include <linux/irq.h>
#include <linux/interrupt.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/map.h>
#include <linux/mtd/partitions.h>
#include <linux/mtd/physmap.h>
#include <linux/i2c.h>
#include <asm/coldfire.h>
#include <asm/mcfsim.h>
#include <asm/io.h>
#if IS_ENABLED(CONFIG_DM9000)
#define DM9000_IRQ 25
#define DM9000_ADDR 0x30000000
/*
* DEVICES and related device RESOURCES
*/
static struct resource dm9000_resources[] = {
/* physical address of the address register (CMD [A2] to 0)*/
[0] = {
.start = DM9000_ADDR,
.end = DM9000_ADDR,
.flags = IORESOURCE_MEM,
},
/*
* physical address of the data register (CMD [A2] to 1),
* driver wants a range >=4 to assume a 32bit data bus
*/
[1] = {
.start = DM9000_ADDR + 4,
.end = DM9000_ADDR + 7,
.flags = IORESOURCE_MEM,
},
/* IRQ line the device's interrupt pin is connected to */
[2] = {
.start = DM9000_IRQ,
.end = DM9000_IRQ,
.flags = IORESOURCE_IRQ,
},
};
static struct dm9000_plat_data dm9000_platdata = {
.flags = DM9000_PLATF_32BITONLY,
};
static struct platform_device dm9000_device = {
.name = "dm9000",
.id = 0,
.num_resources = ARRAY_SIZE(dm9000_resources),
.resource = dm9000_resources,
.dev = {
.platform_data = &dm9000_platdata,
}
};
#endif
static void __init dm9000_pre_init(void)
{
/* Set the dm9000 interrupt to be auto-vectored */
mcf_autovector(DM9000_IRQ);
}
/*
* Partitioning of parallel NOR flash (39VF3201B)
*/
static struct mtd_partition amcore_partitions[] = {
{
.name = "U-Boot (128K)",
.size = 0x20000,
.offset = 0x0
},
{
.name = "Kernel+ROMfs (2994K)",
.size = 0x2E0000,
.offset = MTDPART_OFS_APPEND
},
{
.name = "Flash Free Space (1024K)",
.size = MTDPART_SIZ_FULL,
.offset = MTDPART_OFS_APPEND
}
};
static struct physmap_flash_data flash_data = {
Annotation
- Immediate include surface: `linux/device.h`, `linux/platform_device.h`, `linux/dm9000.h`, `linux/irq.h`, `linux/interrupt.h`, `linux/mtd/mtd.h`, `linux/mtd/map.h`, `linux/mtd/partitions.h`.
- Detected declarations: `function dm9000_pre_init`, `function init_amcore`.
- Atlas domain: Architecture Layer / arch/m68k.
- 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.