Bin Meng | afbf140 | 2015-04-24 18:10:06 +0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2015, Bin Meng <bmeng.cn@gmail.com> |
| 3 | * |
| 4 | * SPDX-License-Identifier: GPL-2.0+ |
| 5 | */ |
| 6 | |
| 7 | #ifndef _ARCH_IRQ_H_ |
| 8 | #define _ARCH_IRQ_H_ |
| 9 | |
| 10 | enum pci_int_pin { |
| 11 | INTX, |
| 12 | INTA, |
| 13 | INTB, |
| 14 | INTC, |
| 15 | INTD |
| 16 | }; |
| 17 | |
| 18 | enum pirq_pin { |
| 19 | PIRQA, |
| 20 | PIRQB, |
| 21 | PIRQC, |
| 22 | PIRQD, |
| 23 | PIRQE, |
| 24 | PIRQF, |
| 25 | PIRQG, |
| 26 | PIRQH |
| 27 | }; |
| 28 | |
| 29 | /* PIRQ link number and value conversion */ |
| 30 | #define LINK_V2N(link) (link - 0x60) |
| 31 | #define LINK_N2V(link) (link + 0x60) |
| 32 | |
| 33 | #define PIRQ_BITMAP 0xdee0 |
| 34 | |
| 35 | struct irq_info; |
| 36 | |
| 37 | /** |
| 38 | * board_fill_irq_info() - Board-specific irq_info fill routine |
| 39 | * |
| 40 | * This fills the irq_info table for any board-specific add-in cards. |
| 41 | * |
| 42 | * @slot: pointer to the struct irq_info that is to be filled in |
| 43 | * @return: number of entries were written to the struct irq_info |
| 44 | */ |
| 45 | int board_fill_irq_info(struct irq_info *slot); |
| 46 | |
| 47 | /** |
| 48 | * pirq_init() - Initialize platform PIRQ routing |
| 49 | * |
| 50 | * This initializes the PIRQ routing on the platform and configures all PCI |
| 51 | * devices' interrupt line register to a working IRQ number on the 8259 PIC. |
| 52 | */ |
| 53 | void pirq_init(void); |
| 54 | |
| 55 | #endif /* _ARCH_IRQ_H_ */ |