now I am wondering:Good point! we even can remote map_irq patch, directly call
- if we don't have to disable the interrupt line (once it is enabled),
why can't we enable all of these interrupts at initialization time
(instead of doing it on-demand)?
of_irq_parse_and_map_pci as other drivers do.
[...]- if the interrupts do have to be disabled again (that is what I
assumed so far) then where is this supposed to happen? (my solution
for this was to implement a simple interrupt controller within the
PCIe driver which only supports enable/disable. disclaimer: I didn't
ask the PCI or interrupt maintainers for feedback on this yet)
[...]
We can implement one interrupt controller, but personally, it has too
much overhead. If we follow this way, almost all modules of all old
lantiq SoCs can implement one interrupt controller. Maybe you can check
with PCI maintainer for their comments.
dw_pcie_setup_rc () cannot be called here because, it is not doing PCI_CLASS_BRIDGE_PCI set alone, it is configuring many other things.I will task Dilip to check if we can use dwc one.This is needed. In the old driver, we fixed this by fixup. The originalthat would be a good comment to add if you really need it
comment as follows,
/*
ÂÂ * The root complex has a hardwired class of PCI_CLASS_NETWORK_OTHER or
ÂÂ * PCI_CLASS_BRIDGE_HOST, when it is operating as a root complex this
ÂÂ * needs to be switched to * PCI_CLASS_BRIDGE_PCI
ÂÂ */
can you please look at dw_pcie_setup_rc (from pcie-designware-host.c), it does:
ÂÂ /* Enable write permission for the DBI read-only register */
ÂÂ dw_pcie_dbi_ro_wr_en(pci);
ÂÂ /* Program correct class for RC */
ÂÂ dw_pcie_wr_own_conf(pp, PCI_CLASS_DEVICE, 2, PCI_CLASS_BRIDGE_PCI);
ÂÂ /* Better disable write permission right after the update */
ÂÂ dw_pcie_dbi_ro_wr_dis(pci);
so my understanding is that there is a functional requirement to set
the class to PCI_CLASS_BRIDGE_PCI
however, that requirement is already covered by pcie-designware-host.c