Skip to content

Commit 570e857

Browse files
damien-lemoalLorenzo Pieralisi
authored andcommitted
PCI: cadence: Use INTX instead of legacy
In the Cadence endpoint controller driver, rename the function cdns_pcie_ep_send_legacy_irq() to cdns_pcie_ep_send_intx_irq() to match the macro PCI_IRQ_INTX name. Related comments and messages mentioning "legacy" are also changed to refer to "intx". Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Damien Le Moal <[email protected]> Signed-off-by: Lorenzo Pieralisi <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]>
1 parent c5d973a commit 570e857

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

drivers/pci/controller/cadence/pcie-cadence-ep.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -360,8 +360,8 @@ static void cdns_pcie_ep_assert_intx(struct cdns_pcie_ep *ep, u8 fn, u8 intx,
360360
writel(0, ep->irq_cpu_addr + offset);
361361
}
362362

363-
static int cdns_pcie_ep_send_legacy_irq(struct cdns_pcie_ep *ep, u8 fn, u8 vfn,
364-
u8 intx)
363+
static int cdns_pcie_ep_send_intx_irq(struct cdns_pcie_ep *ep, u8 fn, u8 vfn,
364+
u8 intx)
365365
{
366366
u16 cmd;
367367

@@ -371,7 +371,7 @@ static int cdns_pcie_ep_send_legacy_irq(struct cdns_pcie_ep *ep, u8 fn, u8 vfn,
371371

372372
cdns_pcie_ep_assert_intx(ep, fn, intx, true);
373373
/*
374-
* The mdelay() value was taken from dra7xx_pcie_raise_legacy_irq()
374+
* The mdelay() value was taken from dra7xx_pcie_raise_intx_irq()
375375
*/
376376
mdelay(1);
377377
cdns_pcie_ep_assert_intx(ep, fn, intx, false);
@@ -541,10 +541,10 @@ static int cdns_pcie_ep_raise_irq(struct pci_epc *epc, u8 fn, u8 vfn,
541541
switch (type) {
542542
case PCI_IRQ_INTX:
543543
if (vfn > 0) {
544-
dev_err(dev, "Cannot raise legacy interrupts for VF\n");
544+
dev_err(dev, "Cannot raise INTX interrupts for VF\n");
545545
return -EINVAL;
546546
}
547-
return cdns_pcie_ep_send_legacy_irq(ep, fn, vfn, 0);
547+
return cdns_pcie_ep_send_intx_irq(ep, fn, vfn, 0);
548548

549549
case PCI_IRQ_MSI:
550550
return cdns_pcie_ep_send_msi_irq(ep, fn, vfn, interrupt_num);

drivers/pci/controller/cadence/pcie-cadence.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -347,16 +347,16 @@ struct cdns_pcie_epf {
347347
* @max_regions: maximum number of regions supported by hardware
348348
* @ob_region_map: bitmask of mapped outbound regions
349349
* @ob_addr: base addresses in the AXI bus where the outbound regions start
350-
* @irq_phys_addr: base address on the AXI bus where the MSI/legacy IRQ
350+
* @irq_phys_addr: base address on the AXI bus where the MSI/INTX IRQ
351351
* dedicated outbound regions is mapped.
352352
* @irq_cpu_addr: base address in the CPU space where a write access triggers
353-
* the sending of a memory write (MSI) / normal message (legacy
353+
* the sending of a memory write (MSI) / normal message (INTX
354354
* IRQ) TLP through the PCIe bus.
355-
* @irq_pci_addr: used to save the current mapping of the MSI/legacy IRQ
355+
* @irq_pci_addr: used to save the current mapping of the MSI/INTX IRQ
356356
* dedicated outbound region.
357357
* @irq_pci_fn: the latest PCI function that has updated the mapping of
358-
* the MSI/legacy IRQ dedicated outbound region.
359-
* @irq_pending: bitmask of asserted legacy IRQs.
358+
* the MSI/INTX IRQ dedicated outbound region.
359+
* @irq_pending: bitmask of asserted INTX IRQs.
360360
* @lock: spin lock to disable interrupts while modifying PCIe controller
361361
* registers fields (RMW) accessible by both remote RC and EP to
362362
* minimize time between read and write
@@ -374,7 +374,7 @@ struct cdns_pcie_ep {
374374
u64 irq_pci_addr;
375375
u8 irq_pci_fn;
376376
u8 irq_pending;
377-
/* protect writing to PCI_STATUS while raising legacy interrupts */
377+
/* protect writing to PCI_STATUS while raising INTX interrupts */
378378
spinlock_t lock;
379379
struct cdns_pcie_epf *epf;
380380
unsigned int quirk_detect_quiet_flag:1;

0 commit comments

Comments
 (0)