linux-stable/drivers/staging/board/board.h
Geert Uytterhoeven 72ee8626ee staging: board: Add support for translating hwirq to virq numbers
As of commit 9a1091ef00 ("irqchip: gic: Support hierarchy irq
domain."), GIC IRQ numbers are virtual, breaking hardcoded hardware IRQ
numbers in platform device resources.

Add support for translating hardware IRQ numbers to virtual IRQ numbers,
and fixing up platform device resources with hardcoded IRQ numbers.

Add a copyright header, including the original author.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-17 21:42:51 -07:00

25 lines
618 B
C

#ifndef __BOARD_H__
#define __BOARD_H__
#include <linux/init.h>
#include <linux/of.h>
struct resource;
bool board_staging_dt_node_available(const struct resource *resource,
unsigned int num_resources);
int board_staging_gic_setup_xlate(const char *gic_match, unsigned int base);
void board_staging_gic_fixup_resources(struct resource *res, unsigned int nres);
#define board_staging(str, fn) \
static int __init runtime_board_check(void) \
{ \
if (of_machine_is_compatible(str)) \
fn(); \
\
return 0; \
} \
\
device_initcall(runtime_board_check)
#endif /* __BOARD_H__ */