diff options
Diffstat (limited to 'arch/powerpc/include/asm/msi_bitmap.h')
| -rw-r--r-- | arch/powerpc/include/asm/msi_bitmap.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/msi_bitmap.h b/arch/powerpc/include/asm/msi_bitmap.h new file mode 100644 index 000000000000..97ac3f46ae0d --- /dev/null +++ b/arch/powerpc/include/asm/msi_bitmap.h | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | #ifndef _POWERPC_SYSDEV_MSI_BITMAP_H | ||
| 2 | #define _POWERPC_SYSDEV_MSI_BITMAP_H | ||
| 3 | |||
| 4 | /* | ||
| 5 | * Copyright 2008, Michael Ellerman, IBM Corporation. | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or | ||
| 8 | * modify it under the terms of the GNU General Public License | ||
| 9 | * as published by the Free Software Foundation; version 2 of the | ||
| 10 | * License. | ||
| 11 | * | ||
| 12 | */ | ||
| 13 | |||
| 14 | #include <linux/of.h> | ||
| 15 | #include <asm/irq.h> | ||
| 16 | |||
| 17 | struct msi_bitmap { | ||
| 18 | struct device_node *of_node; | ||
| 19 | unsigned long *bitmap; | ||
| 20 | spinlock_t lock; | ||
| 21 | unsigned int irq_count; | ||
| 22 | }; | ||
| 23 | |||
| 24 | int msi_bitmap_alloc_hwirqs(struct msi_bitmap *bmp, int num); | ||
| 25 | void msi_bitmap_free_hwirqs(struct msi_bitmap *bmp, unsigned int offset, | ||
| 26 | unsigned int num); | ||
| 27 | void msi_bitmap_reserve_hwirq(struct msi_bitmap *bmp, unsigned int hwirq); | ||
| 28 | |||
| 29 | int msi_bitmap_reserve_dt_hwirqs(struct msi_bitmap *bmp); | ||
| 30 | |||
| 31 | int msi_bitmap_alloc(struct msi_bitmap *bmp, unsigned int irq_count, | ||
| 32 | struct device_node *of_node); | ||
| 33 | void msi_bitmap_free(struct msi_bitmap *bmp); | ||
| 34 | |||
| 35 | #endif /* _POWERPC_SYSDEV_MSI_BITMAP_H */ | ||
