diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 15:20:36 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 15:20:36 -0700 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/asm-frv/irq-routing.h | |
download | lwn-1da177e4c3f41524e886b7f1b8a0c1fc7321cac2.tar.gz lwn-1da177e4c3f41524e886b7f1b8a0c1fc7321cac2.zip |
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Diffstat (limited to 'include/asm-frv/irq-routing.h')
-rw-r--r-- | include/asm-frv/irq-routing.h | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/include/asm-frv/irq-routing.h b/include/asm-frv/irq-routing.h new file mode 100644 index 000000000000..686fb2b39d6a --- /dev/null +++ b/include/asm-frv/irq-routing.h @@ -0,0 +1,70 @@ +/* irq-routing.h: multiplexed IRQ routing + * + * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved. + * Written by David Howells (dhowells@redhat.com) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + */ + +#ifndef _ASM_IRQ_ROUTING_H +#define _ASM_IRQ_ROUTING_H + +#ifndef __ASSEMBLY__ + +#include <linux/spinlock.h> +#include <asm/irq.h> + +struct irq_source; +struct irq_level; + +/* + * IRQ action distribution sets + */ +struct irq_group { + int first_irq; /* first IRQ distributed here */ + void (*control)(struct irq_group *group, int index, int on); + + struct irqaction *actions[NR_IRQ_ACTIONS_PER_GROUP]; /* IRQ action chains */ + struct irq_source *sources[NR_IRQ_ACTIONS_PER_GROUP]; /* IRQ sources */ + int disable_cnt[NR_IRQ_ACTIONS_PER_GROUP]; /* disable counts */ +}; + +/* + * IRQ source manager + */ +struct irq_source { + struct irq_source *next; + struct irq_level *level; + const char *muxname; + volatile void __iomem *muxdata; + unsigned long irqmask; + + void (*doirq)(struct irq_source *source); +}; + +/* + * IRQ level management (per CPU IRQ priority / entry vector) + */ +struct irq_level { + int usage; + int disable_count; + unsigned long flags; /* current SA_INTERRUPT and SA_SHIRQ settings */ + spinlock_t lock; + struct irq_source *sources; +}; + +extern struct irq_level frv_irq_levels[16]; +extern struct irq_group *irq_groups[NR_IRQ_GROUPS]; + +extern void frv_irq_route(struct irq_source *source, int irqlevel); +extern void frv_irq_route_external(struct irq_source *source, int irq); +extern void frv_irq_set_group(struct irq_group *group); +extern void distribute_irqs(struct irq_group *group, unsigned long irqmask); +extern void route_cpu_irqs(void); + +#endif /* !__ASSEMBLY__ */ + +#endif /* _ASM_IRQ_ROUTING_H */ |