drivers/irqchip/irq-sa11x0.c
Source file repositories/reference/linux-study-clean/drivers/irqchip/irq-sa11x0.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/irqchip/irq-sa11x0.c- Extension
.c- Size
- 3926 bytes
- Lines
- 175
- Domain
- Driver Families
- Bucket
- drivers/irqchip
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- 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/module.hlinux/interrupt.hlinux/io.hlinux/irq.hlinux/irqdomain.hlinux/syscore_ops.hlinux/irqchip/irq-sa11x0.hsoc/sa1100/pwer.hasm/exception.h
Detected Declarations
function sa1100_mask_irqfunction sa1100_unmask_irqfunction sa1100_set_wakefunction sa1100_normal_irqdomain_mapfunction sa1100irq_suspendfunction sa1100irq_resumefunction sa1100irq_init_devicefsfunction sa1100_handle_irqfunction sa11x0_init_irq_nodtmodule init sa1100irq_init_devicefs
Annotated Snippet
device_initcall(sa1100irq_init_devicefs);
static void __exception_irq_entry sa1100_handle_irq(struct pt_regs *regs)
{
uint32_t icip, icmr, mask;
do {
icip = readl_relaxed(iobase + ICIP);
icmr = readl_relaxed(iobase + ICMR);
mask = icip & icmr;
if (mask == 0)
break;
generic_handle_domain_irq(sa1100_normal_irqdomain,
ffs(mask) - 1);
} while (1);
}
void __init sa11x0_init_irq_nodt(int irq_start, resource_size_t io_start)
{
iobase = ioremap(io_start, SZ_64K);
if (WARN_ON(!iobase))
return;
/* disable all IRQs */
writel_relaxed(0, iobase + ICMR);
/* all IRQs are IRQ, not FIQ */
writel_relaxed(0, iobase + ICLR);
/*
* Whatever the doc says, this has to be set for the wait-on-irq
* instruction to work... on a SA1100 rev 9 at least.
*/
writel_relaxed(1, iobase + ICCR);
sa1100_normal_irqdomain = irq_domain_create_simple(NULL,
32, irq_start,
&sa1100_normal_irqdomain_ops, NULL);
set_handle_irq(sa1100_handle_irq);
}
Annotation
- Immediate include surface: `linux/init.h`, `linux/module.h`, `linux/interrupt.h`, `linux/io.h`, `linux/irq.h`, `linux/irqdomain.h`, `linux/syscore_ops.h`, `linux/irqchip/irq-sa11x0.h`.
- Detected declarations: `function sa1100_mask_irq`, `function sa1100_unmask_irq`, `function sa1100_set_wake`, `function sa1100_normal_irqdomain_map`, `function sa1100irq_suspend`, `function sa1100irq_resume`, `function sa1100irq_init_devicefs`, `function sa1100_handle_irq`, `function sa11x0_init_irq_nodt`, `module init sa1100irq_init_devicefs`.
- Atlas domain: Driver Families / drivers/irqchip.
- 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.