Paul Burton
0d58e6c1b1
PCI: Add pci_irqd_intx_xlate()
...
Legacy PCI INTx interrupts are represented in the PCI_INTERRUPT_PIN
register using the range 1-4, which matches our enum pci_interrupt_pin.
This is however not ideal for an IRQ domain, where with 4 interrupts we
would ideally have a domain of size 4 & hwirq numbers in the range 0-3.
Different PCI host controller drivers have handled this in different ways.
Of those under drivers/pci/ which register an INTx IRQ domain, we have:
- pcie-altera uses the range 1-4 in device trees and an IRQ domain of
size 5 to cover that range, with entry 0 wasted.
- pcie-xilinx & pcie-xilinx-nwl use the range 1-4 in device trees but
register an IRQ domain of size 4, which doesn't cover the hwirq=4/INTD
case leading to that interrupt being broken.
- pci-ftpci100 & pci-aardvark use the range 0-3 in both device trees & as
hwirq numbering in the driver & IRQ domain.
In order to introduce some level of consistency in at least the hwirq
numbering used by the drivers & IRQ domains, this patch introduces a new
pci_irqd_intx_xlate() helper function which drivers using the 1-4 range in
device trees can assign as the xlate callback for their INTx IRQ domain.
This translates the 1-4 range into a 0-3 range, allowing us to use an IRQ
domain of size 4 & avoid a wasted entry. Further patches will make use of
this in drivers to allow them to use an IRQ domain of size 4 for legacy
INTx interrupts without breaking INTD.
Signed-off-by: Paul Burton <paul.burton@imgtec.com >
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com >
2017-08-16 11:38:32 -05:00
..
2017-07-09 18:48:37 -07:00
2017-07-17 14:54:58 +02:00
2017-07-07 17:25:19 +02:00
2017-07-07 12:40:27 -07:00
2017-07-12 10:04:56 -07:00
2017-07-03 20:55:59 -07:00
2017-07-13 15:58:02 -04:00
2017-07-11 09:55:47 -07:00
2017-07-17 21:21:24 -04:00
2017-07-03 03:42:10 -07:00
2017-06-20 10:30:49 +02:00
2017-07-13 12:07:44 -07:00
2017-06-19 19:38:24 +02:00
2017-06-19 19:09:19 +02:00
2017-07-27 13:43:22 +01:00
2017-06-29 14:30:49 +02:00
2017-07-17 15:05:52 +02:00
2017-07-03 01:43:45 -07:00
2017-07-19 08:55:18 -07:00
2017-06-29 17:34:57 +02:00
2017-07-06 11:38:59 -07:00
2017-07-13 13:56:24 -07:00
2017-07-22 08:55:16 -07:00
2017-07-10 15:23:45 -07:00
2017-07-04 22:35:16 +01:00
2017-07-12 16:26:05 -07:00
2017-06-30 12:00:51 -07:00
2017-07-03 17:00:59 -06:00
2017-07-10 16:32:34 -07:00
2017-06-27 12:05:27 -06:00
2017-06-20 15:42:32 -04:00
2017-07-03 13:08:04 -07:00
2017-06-27 12:13:45 -06:00
2017-07-06 16:24:33 -07:00
2017-07-01 16:15:13 -07:00
2017-07-20 15:20:27 -07:00
2017-07-17 13:37:56 -07:00
2017-07-03 02:22:52 -07:00
2017-07-10 10:51:53 -07:00
2017-07-10 16:32:34 -07:00
2017-07-10 16:32:34 -07:00
2017-07-03 16:56:28 -06:00
2017-06-30 12:00:51 -07:00
2017-06-28 14:45:21 -04:00
2017-07-14 12:37:41 -07:00
2017-07-03 16:14:51 -07:00
2017-07-06 20:57:13 -07:00
2017-07-06 16:24:29 -07:00
2017-07-19 08:55:18 -07:00
2017-07-19 08:55:18 -07:00
2017-06-22 15:43:47 +01:00
2017-07-14 13:12:32 -07:00
2017-07-03 18:08:06 -07:00
2017-07-12 16:26:00 -07:00
2017-07-19 08:55:18 -07:00
2017-07-26 15:55:44 -04:00
2017-07-19 08:55:18 -07:00
2017-07-07 09:44:06 -07:00
2017-07-07 09:49:24 +10:00
2017-06-19 11:03:51 -04:00
2017-07-14 16:09:55 -03:00
2017-07-20 16:09:10 +02:00
2017-07-06 07:02:24 -04:00
2017-06-20 12:18:27 +02:00
2017-07-12 16:26:01 -07:00
2017-07-10 16:32:35 -07:00
2017-07-06 16:24:30 -07:00
2017-07-03 18:44:02 -04:00
2017-06-30 12:00:51 -07:00
2017-07-19 08:55:18 -07:00
2017-07-09 09:31:22 -07:00
2017-06-23 19:59:08 -04:00
2017-07-07 20:09:10 -04:00
2017-07-20 09:27:29 -04:00
2017-07-12 13:32:46 +02:00
2017-07-12 16:26:03 -07:00
2017-06-30 13:49:53 -07:00
2017-07-10 11:11:25 +02:00
2017-06-30 04:14:14 -04:00
2017-07-10 16:32:31 -07:00
2017-07-15 12:00:42 -07:00
2017-07-08 21:51:43 +02:00
2017-06-30 09:47:24 +03:00
2017-07-01 07:39:08 -07:00
2017-06-21 14:37:12 -04:00
2017-06-20 07:25:17 -03:00
2017-07-01 07:39:08 -07:00
2017-07-05 09:54:15 +02:00
2017-07-10 16:32:34 -07:00
2017-07-09 10:24:46 -07:00
2017-07-10 10:51:53 -07:00
2017-06-30 12:00:51 -07:00
2017-07-19 08:55:18 -07:00
2017-07-27 15:40:02 +02:00
2017-07-04 12:46:16 +02:00
2017-06-22 18:29:34 +02:00
2017-07-17 09:22:34 -07:00
2017-07-12 16:25:59 -07:00
2017-07-12 16:26:00 -07:00
2017-06-30 12:00:51 -07:00
2017-07-03 21:13:25 -07:00
2017-07-10 16:32:31 -07:00
2017-07-06 16:24:34 -07:00
2017-06-30 12:00:51 -07:00
2017-07-19 08:55:18 -07:00
2017-07-08 11:05:34 +02:00
2017-06-26 10:39:40 +02:00
2017-07-26 18:57:44 +02:00
2017-06-20 12:18:27 +02:00
2017-07-03 16:54:58 -07:00
2017-07-10 16:32:33 -07:00
2017-07-19 15:33:50 -07:00
2017-07-19 08:55:18 -07:00
2017-06-22 10:29:53 -04:00
2017-07-06 16:24:35 -07:00
2017-07-06 16:24:35 -07:00
2017-07-06 16:24:35 -07:00
2017-07-06 16:24:34 -07:00
2017-07-12 16:26:04 -07:00
2017-06-30 12:00:51 -07:00
2017-07-07 18:39:15 -07:00
2017-06-20 15:42:32 -04:00
2017-07-10 16:32:33 -07:00
2017-07-19 08:55:18 -07:00
2017-07-02 15:37:23 -07:00
2017-06-30 12:00:51 -07:00
2017-06-30 12:00:51 -07:00
2017-06-29 13:50:38 -07:00
2017-06-19 22:06:28 -04:00
2017-07-08 11:23:29 +01:00
2017-07-17 17:01:10 +02:00
2017-07-01 07:39:08 -07:00
2017-07-13 16:00:15 -04:00
2017-07-13 16:00:12 -04:00
2017-07-21 11:51:19 -04:00
2017-07-13 17:12:07 -04:00
2017-07-13 16:00:15 -04:00
2017-07-12 16:26:02 -07:00
2017-07-06 16:24:32 -07:00
2017-07-06 16:24:35 -07:00
2017-07-06 11:30:07 -04:00
2017-07-25 18:05:25 +02:00
2017-07-25 17:58:32 +02:00
2017-07-10 14:27:39 +02:00
2017-06-22 11:14:48 -05:00
2017-07-10 15:23:45 -07:00
2017-06-19 22:06:28 -04:00
2017-07-10 16:32:31 -07:00
2017-07-06 16:24:31 -07:00
2017-07-07 19:38:17 -07:00
2017-06-30 12:00:51 -07:00
2017-07-07 13:41:28 -05:00
2017-08-15 15:53:50 -05:00
2017-08-16 11:38:32 -05:00
2017-06-20 15:42:32 -04:00
2017-07-05 12:31:59 -07:00
2017-07-03 02:01:15 -07:00
2017-06-30 12:00:51 -07:00
2017-07-03 08:31:43 +02:00
2017-06-24 01:41:55 +02:00
2017-06-28 01:52:52 +02:00
2017-06-28 01:52:52 +02:00
2017-06-20 12:18:27 +02:00
2017-06-25 21:58:46 -04:00
2017-06-30 12:00:51 -07:00
2017-06-28 22:49:11 +10:00
2017-06-22 02:55:34 +02:00
2017-07-03 15:12:52 -07:00
2017-06-22 11:46:48 -04:00
2017-07-15 12:44:02 -07:00
2017-06-29 10:48:57 +01:00
2017-07-02 11:24:36 +02:00
2017-07-03 16:20:28 +01:00
2017-07-12 23:11:23 +02:00
2017-07-19 08:55:18 -07:00
2017-07-01 09:08:42 -07:00
2017-06-23 11:55:57 +10:00
2017-07-19 08:55:18 -07:00
2017-07-06 16:24:30 -07:00
2017-06-30 12:00:51 -07:00
2017-07-06 20:57:13 -07:00
2017-07-05 12:31:59 -07:00
2017-07-12 16:26:03 -07:00
2017-07-06 16:24:30 -07:00
2017-07-15 12:00:42 -07:00
2017-07-06 16:24:31 -07:00
2017-07-10 16:32:33 -07:00
2017-07-10 16:32:30 -07:00
2017-07-19 08:55:18 -07:00
2017-07-03 16:56:25 -06:00
2017-06-29 22:21:21 -04:00
2017-07-06 20:57:13 -07:00
2017-06-20 22:13:59 -07:00
2017-07-20 09:27:29 -04:00
2017-06-30 12:00:51 -07:00
2017-07-19 08:55:18 -07:00
2017-07-08 10:15:02 -07:00
2017-07-10 07:40:49 -04:00
2017-06-30 12:00:51 -07:00
2017-06-30 12:00:51 -07:00
2017-07-24 17:50:37 +02:00
2017-06-22 16:15:45 -07:00
2017-07-13 12:23:54 -07:00
2017-07-06 16:24:35 -07:00
2017-07-06 16:24:35 -07:00
2017-07-05 09:54:14 +02:00
2017-06-20 12:19:14 +02:00
2017-07-25 11:17:02 +02:00