arch/mips/alchemy/devboards/db1000.c
Source file repositories/reference/linux-study-clean/arch/mips/alchemy/devboards/db1000.c
File Facts
- System
- Linux kernel
- Corpus path
arch/mips/alchemy/devboards/db1000.c- Extension
.c- Size
- 14154 bytes
- Lines
- 565
- Domain
- Architecture Layer
- Bucket
- arch/mips
- 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/clk.hlinux/dma-mapping.hlinux/gpio.hlinux/gpio/machine.hlinux/gpio/property.hlinux/init.hlinux/interrupt.hlinux/leds.hlinux/mmc/host.hlinux/platform_device.hlinux/property.hlinux/pm.hlinux/spi/spi.hasm/mach-au1x00/au1000.hasm/mach-au1x00/gpio-au1000.hasm/mach-au1x00/au1000_dma.hasm/mach-au1x00/au1100_mmc.hasm/mach-db1x00/bcsr.hasm/reboot.hprom.hdb1xxx.hplatform.h
Detected Declarations
function db1000_board_setupfunction db1500_map_pci_irqfunction db1500_pci_setupfunction db1100_mmc_cdfunction db1100_mmc_cd_setupfunction db1100_mmc1_cd_setupfunction db1100_mmc_card_readonlyfunction db1100_mmc_card_insertedfunction db1100_mmc_set_powerfunction db1100_mmcled_setfunction db1100_mmc1_card_readonlyfunction db1100_mmc1_card_insertedfunction db1100_mmc1_set_powerfunction db1100_mmc1led_setfunction db1000_dev_setup
Annotated Snippet
switch (pin) {
case 1: return AU1500_PCI_INTA;
case 2: return AU1500_PCI_INTB;
case 3: return AU1500_PCI_INTC;
case 4: return AU1500_PCI_INTD;
}
}
return -1;
}
static u64 au1xxx_all_dmamask = DMA_BIT_MASK(32);
static struct resource alchemy_pci_host_res[] = {
[0] = {
.start = AU1500_PCI_PHYS_ADDR,
.end = AU1500_PCI_PHYS_ADDR + 0xfff,
.flags = IORESOURCE_MEM,
},
};
static struct alchemy_pci_platdata db1500_pci_pd = {
.board_map_irq = db1500_map_pci_irq,
};
static struct platform_device db1500_pci_host_dev = {
.dev.platform_data = &db1500_pci_pd,
.name = "alchemy-pci",
.id = 0,
.num_resources = ARRAY_SIZE(alchemy_pci_host_res),
.resource = alchemy_pci_host_res,
};
int __init db1500_pci_setup(void)
{
return platform_device_register(&db1500_pci_host_dev);
}
static struct resource au1100_lcd_resources[] = {
[0] = {
.start = AU1100_LCD_PHYS_ADDR,
.end = AU1100_LCD_PHYS_ADDR + 0x800 - 1,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = AU1100_LCD_INT,
.end = AU1100_LCD_INT,
.flags = IORESOURCE_IRQ,
}
};
static struct platform_device au1100_lcd_device = {
.name = "au1100-lcd",
.id = 0,
.dev = {
.dma_mask = &au1xxx_all_dmamask,
.coherent_dma_mask = DMA_BIT_MASK(32),
},
.num_resources = ARRAY_SIZE(au1100_lcd_resources),
.resource = au1100_lcd_resources,
};
static struct resource alchemy_ac97c_res[] = {
[0] = {
.start = AU1000_AC97_PHYS_ADDR,
.end = AU1000_AC97_PHYS_ADDR + 0xfff,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = DMA_ID_AC97C_TX,
.end = DMA_ID_AC97C_TX,
.flags = IORESOURCE_DMA,
},
[2] = {
.start = DMA_ID_AC97C_RX,
.end = DMA_ID_AC97C_RX,
.flags = IORESOURCE_DMA,
},
};
static struct platform_device alchemy_ac97c_dev = {
.name = "alchemy-ac97c",
.id = -1,
.resource = alchemy_ac97c_res,
.num_resources = ARRAY_SIZE(alchemy_ac97c_res),
};
static struct platform_device alchemy_ac97c_dma_dev = {
.name = "alchemy-pcm-dma",
.id = 0,
};
Annotation
- Immediate include surface: `linux/clk.h`, `linux/dma-mapping.h`, `linux/gpio.h`, `linux/gpio/machine.h`, `linux/gpio/property.h`, `linux/init.h`, `linux/interrupt.h`, `linux/leds.h`.
- Detected declarations: `function db1000_board_setup`, `function db1500_map_pci_irq`, `function db1500_pci_setup`, `function db1100_mmc_cd`, `function db1100_mmc_cd_setup`, `function db1100_mmc1_cd_setup`, `function db1100_mmc_card_readonly`, `function db1100_mmc_card_inserted`, `function db1100_mmc_set_power`, `function db1100_mmcled_set`.
- Atlas domain: Architecture Layer / arch/mips.
- Implementation status: source implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.