Commit c0dcdeea authored by Damien Le Moal's avatar Damien Le Moal Committed by Lorenzo Pieralisi

PCI: uniphier: Use INTX instead of legacy

In the Designware uniphier controller driver, including the endpoint
driver, change all names using "legacy" to use "intx", to match the
term used in the PCI specifications.

Link: https://lore.kernel.org/r/20231122060406.14695-14-dlemoal@kernel.orgSigned-off-by: default avatarDamien Le Moal <dlemoal@kernel.org>
Signed-off-by: default avatarLorenzo Pieralisi <lpieralisi@kernel.org>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
parent 3ba180c4
...@@ -212,7 +212,7 @@ static void uniphier_pcie_ep_init(struct dw_pcie_ep *ep) ...@@ -212,7 +212,7 @@ static void uniphier_pcie_ep_init(struct dw_pcie_ep *ep)
dw_pcie_ep_reset_bar(pci, bar); dw_pcie_ep_reset_bar(pci, bar);
} }
static int uniphier_pcie_ep_raise_legacy_irq(struct dw_pcie_ep *ep) static int uniphier_pcie_ep_raise_intx_irq(struct dw_pcie_ep *ep)
{ {
struct dw_pcie *pci = to_dw_pcie_from_ep(ep); struct dw_pcie *pci = to_dw_pcie_from_ep(ep);
struct uniphier_pcie_ep_priv *priv = to_uniphier_pcie(pci); struct uniphier_pcie_ep_priv *priv = to_uniphier_pcie(pci);
...@@ -262,7 +262,7 @@ static int uniphier_pcie_ep_raise_irq(struct dw_pcie_ep *ep, u8 func_no, ...@@ -262,7 +262,7 @@ static int uniphier_pcie_ep_raise_irq(struct dw_pcie_ep *ep, u8 func_no,
switch (type) { switch (type) {
case PCI_IRQ_INTX: case PCI_IRQ_INTX:
return uniphier_pcie_ep_raise_legacy_irq(ep); return uniphier_pcie_ep_raise_intx_irq(ep);
case PCI_IRQ_MSI: case PCI_IRQ_MSI:
return uniphier_pcie_ep_raise_msi_irq(ep, func_no, return uniphier_pcie_ep_raise_msi_irq(ep, func_no,
interrupt_num); interrupt_num);
......
...@@ -67,7 +67,7 @@ struct uniphier_pcie { ...@@ -67,7 +67,7 @@ struct uniphier_pcie {
struct clk *clk; struct clk *clk;
struct reset_control *rst; struct reset_control *rst;
struct phy *phy; struct phy *phy;
struct irq_domain *legacy_irq_domain; struct irq_domain *intx_irq_domain;
}; };
#define to_uniphier_pcie(x) dev_get_drvdata((x)->dev) #define to_uniphier_pcie(x) dev_get_drvdata((x)->dev)
...@@ -253,12 +253,12 @@ static void uniphier_pcie_irq_handler(struct irq_desc *desc) ...@@ -253,12 +253,12 @@ static void uniphier_pcie_irq_handler(struct irq_desc *desc)
reg = FIELD_GET(PCL_RCV_INTX_ALL_STATUS, val); reg = FIELD_GET(PCL_RCV_INTX_ALL_STATUS, val);
for_each_set_bit(bit, &reg, PCI_NUM_INTX) for_each_set_bit(bit, &reg, PCI_NUM_INTX)
generic_handle_domain_irq(pcie->legacy_irq_domain, bit); generic_handle_domain_irq(pcie->intx_irq_domain, bit);
chained_irq_exit(chip, desc); chained_irq_exit(chip, desc);
} }
static int uniphier_pcie_config_legacy_irq(struct dw_pcie_rp *pp) static int uniphier_pcie_config_intx_irq(struct dw_pcie_rp *pp)
{ {
struct dw_pcie *pci = to_dw_pcie_from_pp(pp); struct dw_pcie *pci = to_dw_pcie_from_pp(pp);
struct uniphier_pcie *pcie = to_uniphier_pcie(pci); struct uniphier_pcie *pcie = to_uniphier_pcie(pci);
...@@ -279,9 +279,9 @@ static int uniphier_pcie_config_legacy_irq(struct dw_pcie_rp *pp) ...@@ -279,9 +279,9 @@ static int uniphier_pcie_config_legacy_irq(struct dw_pcie_rp *pp)
goto out_put_node; goto out_put_node;
} }
pcie->legacy_irq_domain = irq_domain_add_linear(np_intc, PCI_NUM_INTX, pcie->intx_irq_domain = irq_domain_add_linear(np_intc, PCI_NUM_INTX,
&uniphier_intx_domain_ops, pp); &uniphier_intx_domain_ops, pp);
if (!pcie->legacy_irq_domain) { if (!pcie->intx_irq_domain) {
dev_err(pci->dev, "Failed to get INTx domain\n"); dev_err(pci->dev, "Failed to get INTx domain\n");
ret = -ENODEV; ret = -ENODEV;
goto out_put_node; goto out_put_node;
...@@ -301,7 +301,7 @@ static int uniphier_pcie_host_init(struct dw_pcie_rp *pp) ...@@ -301,7 +301,7 @@ static int uniphier_pcie_host_init(struct dw_pcie_rp *pp)
struct uniphier_pcie *pcie = to_uniphier_pcie(pci); struct uniphier_pcie *pcie = to_uniphier_pcie(pci);
int ret; int ret;
ret = uniphier_pcie_config_legacy_irq(pp); ret = uniphier_pcie_config_intx_irq(pp);
if (ret) if (ret)
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment