diff options
author | Bin Meng <bmeng.cn@gmail.com> | 2016-02-01 01:40:51 -0800 |
---|---|---|
committer | Bin Meng <bmeng.cn@gmail.com> | 2016-02-05 12:47:22 +0800 |
commit | b46c2088da17b8f9210bf0860af88ec533435af9 (patch) | |
tree | c2e9ffbc748c23bcf12c9d1029b31d6b8e173b5f /arch/x86/include | |
parent | 819133d9f591bfc187218342702b2ff69eecca25 (diff) | |
download | u-boot-imx-b46c2088da17b8f9210bf0860af88ec533435af9.zip u-boot-imx-b46c2088da17b8f9210bf0860af88ec533435af9.tar.gz u-boot-imx-b46c2088da17b8f9210bf0860af88ec533435af9.tar.bz2 |
x86: irq: Move irq_router to a per driver priv
At present irq_router is declared as a static struct irq_router in
arch/x86/cpu/irq.c. Since it's a driver control block, it makes sense
to move it to a per driver priv. Adjust existing APIs to accept an
additional parameter of irq_router's udevice.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/x86/include')
-rw-r--r-- | arch/x86/include/asm/pirq_routing.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/arch/x86/include/asm/pirq_routing.h b/arch/x86/include/asm/pirq_routing.h index ddc08e1..0afcb46 100644 --- a/arch/x86/include/asm/pirq_routing.h +++ b/arch/x86/include/asm/pirq_routing.h @@ -72,12 +72,13 @@ static inline int get_irq_slot_count(struct irq_routing_table *rt) * Note: this function should be provided by the platform codes, as the * implementation of interrupt router may be different. * + * @dev: irq router's udevice * @link: link number which represents a PIRQ * @irq: the 8259 IRQ number * @return: true if the irq is already routed to 8259 for a given link, * false elsewise */ -bool pirq_check_irq_routed(int link, u8 irq); +bool pirq_check_irq_routed(struct udevice *dev, int link, u8 irq); /** * pirq_translate_link() - Translate a link value @@ -89,10 +90,11 @@ bool pirq_check_irq_routed(int link, u8 irq); * Note: this function should be provided by the platform codes, as the * implementation of interrupt router may be different. * + * @dev: irq router's udevice * @link: platform-specific link value * @return: link number which represents a PIRQ */ -int pirq_translate_link(int link); +int pirq_translate_link(struct udevice *dev, int link); /** * pirq_assign_irq() - Assign an IRQ to a PIRQ link @@ -103,10 +105,11 @@ int pirq_translate_link(int link); * Note: this function should be provided by the platform codes, as the * implementation of interrupt router may be different. * + * @dev: irq router's udevice * @link: link number which represents a PIRQ * @irq: IRQ to which the PIRQ is routed */ -void pirq_assign_irq(int link, u8 irq); +void pirq_assign_irq(struct udevice *dev, int link, u8 irq); /** * pirq_route_irqs() - Route PIRQs to 8259 PIC @@ -117,10 +120,11 @@ void pirq_assign_irq(int link, u8 irq); * The configuration source is taken from a struct irq_info table, the format * of which is defined in PIRQ routing table spec and PCI BIOS spec. * + * @dev: irq router's udevice * @irq: pointer to the base address of the struct irq_info * @num: number of entries in the struct irq_info */ -void pirq_route_irqs(struct irq_info *irq, int num); +void pirq_route_irqs(struct udevice *dev, struct irq_info *irq, int num); /** * copy_pirq_routing_table() - Copy a PIRQ routing table |