mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 22:23:14 -04:00
[SPARC64]: of_device layer IRQ resolution
Do IRQ determination generically by parsing the PROM properties, and using IRQ controller drivers for final resolution. One immediate positive effect is that all of the IRQ frobbing in the EBUS, ISA, and PCI controller layers has been eliminated. We just look up the of_device and use the properly computed value. The PCI controller irq_build() routines are gone and no longer used. Unfortunately sbus_build_irq() has to remain as there is a direct reference to this in the sunzilog driver. That can be killed off once the sparc32 side of this is written and the sunzilog driver is transformed into an "of" bus driver. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
c3a8b85f5a
commit
2b1e597871
13 changed files with 1105 additions and 1050 deletions
|
|
@ -22,7 +22,8 @@ struct of_device
|
|||
struct device_node *node;
|
||||
struct device dev;
|
||||
struct resource resource[PROMREG_MAX];
|
||||
unsigned int irq;
|
||||
unsigned int irqs[PROMINTR_MAX];
|
||||
int num_irqs;
|
||||
|
||||
void *sysdata;
|
||||
|
||||
|
|
@ -35,6 +36,8 @@ struct of_device
|
|||
extern void __iomem *of_ioremap(struct resource *res, unsigned long offset, unsigned long size, char *name);
|
||||
extern void of_iounmap(void __iomem *base, unsigned long size);
|
||||
|
||||
extern struct of_device *of_find_device_by_node(struct device_node *);
|
||||
|
||||
extern const struct of_device_id *of_match_device(
|
||||
const struct of_device_id *matches, const struct of_device *dev);
|
||||
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@
|
|||
#include <asm/page.h>
|
||||
#include <asm/oplib.h>
|
||||
#include <asm/prom.h>
|
||||
#include <asm/of_device.h>
|
||||
#include <asm/iommu.h>
|
||||
|
||||
/* The abstraction used here is that there are PCI controllers,
|
||||
|
|
@ -209,7 +210,6 @@ struct pci_controller_info {
|
|||
|
||||
/* Operations which are controller specific. */
|
||||
void (*scan_bus)(struct pci_controller_info *);
|
||||
unsigned int (*irq_build)(struct pci_pbm_info *, struct pci_dev *, unsigned int);
|
||||
void (*base_address_update)(struct pci_dev *, int);
|
||||
void (*resource_adjust)(struct pci_dev *, struct resource *, struct resource *);
|
||||
|
||||
|
|
@ -226,6 +226,7 @@ struct pci_controller_info {
|
|||
struct pcidev_cookie {
|
||||
struct pci_pbm_info *pbm;
|
||||
struct device_node *prom_node;
|
||||
struct of_device *op;
|
||||
struct linux_prom_pci_registers prom_regs[PROMREG_MAX];
|
||||
int num_prom_regs;
|
||||
struct linux_prom_pci_registers prom_assignments[PROMREG_MAX];
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ struct property {
|
|||
unsigned int unique_id;
|
||||
};
|
||||
|
||||
struct of_irq_controller;
|
||||
struct device_node {
|
||||
char *name;
|
||||
char *type;
|
||||
|
|
@ -53,6 +54,13 @@ struct device_node {
|
|||
unsigned long _flags;
|
||||
void *data;
|
||||
unsigned int unique_id;
|
||||
|
||||
struct of_irq_controller *irq_trans;
|
||||
};
|
||||
|
||||
struct of_irq_controller {
|
||||
unsigned int (*irq_build)(struct device_node *, unsigned int, void *);
|
||||
void *data;
|
||||
};
|
||||
|
||||
/* flag descriptions */
|
||||
|
|
|
|||
Loading…
Reference in a new issue