arch/arm/mach-sa1100/collie.c
Source file repositories/reference/linux-study-clean/arch/arm/mach-sa1100/collie.c
File Facts
- System
- Linux kernel
- Corpus path
arch/arm/mach-sa1100/collie.c- Extension
.c- Size
- 10249 bytes
- Lines
- 430
- Domain
- Architecture Layer
- Bucket
- arch/arm
- 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/init.hlinux/kernel.hlinux/tty.hlinux/delay.hlinux/platform_data/sa11x0-serial.hlinux/platform_device.hlinux/mfd/ucb1x00.hlinux/mtd/mtd.hlinux/mtd/partitions.hlinux/timer.hlinux/gpio_keys.hlinux/input.hlinux/gpio.hlinux/gpio/machine.hlinux/power/gpio-charger.hvideo/sa1100fb.hmach/hardware.hasm/mach-types.hasm/page.hasm/setup.hmach/collie.hasm/mach/arch.hasm/mach/flash.hasm/mach/map.hasm/hardware/scoop.hasm/mach/sharpsl_param.hasm/hardware/locomo.hlinux/platform_data/mfd-mcp-sa11x0.hmach/irqs.hgeneric.h
Detected Declarations
function collie_uart_set_mctrlfunction collie_uart_get_mctrlfunction collie_uart_probefunction collie_uart_initfunction collie_flash_initfunction collie_set_vppfunction collie_flash_exitfunction collie_initfunction collie_map_iomodule init collie_uart_init
Annotated Snippet
device_initcall(collie_uart_init);
#endif
static struct resource locomo_resources[] = {
[0] = DEFINE_RES_MEM(0x40000000, SZ_8K),
[1] = DEFINE_RES_IRQ(IRQ_GPIO25),
};
static struct locomo_platform_data locomo_info = {
.irq_base = IRQ_BOARD_START,
};
struct platform_device collie_locomo_device = {
.name = "locomo",
.id = 0,
.dev = {
.platform_data = &locomo_info,
},
.num_resources = ARRAY_SIZE(locomo_resources),
.resource = locomo_resources,
};
static struct gpio_keys_button collie_gpio_keys[] = {
{
.type = EV_PWR,
.code = KEY_RESERVED,
.gpio = COLLIE_GPIO_ON_KEY,
.desc = "On key",
.wakeup = 1,
.active_low = 1,
},
{
.type = EV_PWR,
.code = KEY_WAKEUP,
.gpio = COLLIE_GPIO_WAKEUP,
.desc = "Sync",
.wakeup = 1,
.active_low = 1,
},
};
static struct gpio_keys_platform_data collie_gpio_keys_data = {
.buttons = collie_gpio_keys,
.nbuttons = ARRAY_SIZE(collie_gpio_keys),
};
static struct platform_device collie_gpio_keys_device = {
.name = "gpio-keys",
.id = -1,
.dev = {
.platform_data = &collie_gpio_keys_data,
},
};
static struct platform_device *devices[] __initdata = {
&collie_locomo_device,
&colliescoop_device,
&collie_power_device,
&collie_gpio_keys_device,
};
static struct mtd_partition collie_partitions[] = {
{
.name = "bootloader",
.offset = 0,
.size = 0x000C0000,
.mask_flags = MTD_WRITEABLE
}, {
.name = "kernel",
.offset = MTDPART_OFS_APPEND,
.size = 0x00100000,
}, {
.name = "rootfs",
.offset = MTDPART_OFS_APPEND,
.size = 0x00e20000,
}, {
.name = "bootblock",
.offset = MTDPART_OFS_APPEND,
.size = 0x00020000,
.mask_flags = MTD_WRITEABLE
}
};
static int collie_flash_init(void)
{
int rc = gpio_request(COLLIE_GPIO_VPEN, "flash Vpp enable");
if (rc)
return rc;
Annotation
- Immediate include surface: `linux/init.h`, `linux/kernel.h`, `linux/tty.h`, `linux/delay.h`, `linux/platform_data/sa11x0-serial.h`, `linux/platform_device.h`, `linux/mfd/ucb1x00.h`, `linux/mtd/mtd.h`.
- Detected declarations: `function collie_uart_set_mctrl`, `function collie_uart_get_mctrl`, `function collie_uart_probe`, `function collie_uart_init`, `function collie_flash_init`, `function collie_set_vpp`, `function collie_flash_exit`, `function collie_init`, `function collie_map_io`, `module init collie_uart_init`.
- Atlas domain: Architecture Layer / arch/arm.
- 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.