- 23 11月, 2022 6 次提交
-
-
由 Serge Semin 提交于
Baikal-T1 SoC is equipped with DWC PCIe v4.60a host controller. It can be trained to work up to Gen.3 speed over up to x4 lanes. The host controller is attached to the DW PCIe 3.0 PCS via the PIPE-4 interface, which in its turn is connected to the DWC 10G PHY. The whole system is supposed to be fed up with four clock sources: DBI peripheral clock, AXI application clocks and external PHY/core reference clock generating the 100MHz signal. In addition to that the platform provide a way to reset each part of the controller: sticky/non-sticky bits, host controller core, PIPE interface, PCS/PHY and Hot/Power reset signal. The driver also provides a way to handle the GPIO-based PERST# signal. Note due to the Baikal-T1 MMIO peculiarity we have to implement the DBI interface accessors which make sure the IO operations are dword-aligned. Link: https://lore.kernel.org/r/20221113191301.5526-21-Sergey.Semin@baikalelectronics.ruSigned-off-by: NSerge Semin <Sergey.Semin@baikalelectronics.ru> Signed-off-by: NLorenzo Pieralisi <lpieralisi@kernel.org>
-
由 Serge Semin 提交于
Currently almost each platform driver uses its own resets and clocks naming in order to get the corresponding descriptors. It makes the code harder to maintain and comprehend especially seeing the DWC PCIe core main resets and clocks signals set hasn't changed much for about at least one major IP-core release. So in order to organize things around these signals we suggest to create a generic interface for them in accordance with the naming introduced in the DWC PCIe IP-core reference manual: Application clocks: - "dbi" - data bus interface clock (on some DWC PCIe platforms it's referred as "pclk", "pcie", "sys", "ahb", "cfg", "iface", "gio", "reg", "pcie_apb_sys"); - "mstr" - AXI-bus master interface clock (some DWC PCIe glue drivers refer to this clock as "port", "bus", "pcie_bus", "bus_master/master_bus/axi_m", "pcie_aclk"); - "slv" - AXI-bus slave interface clock (also called as "port", "bus", "pcie_bus", "bus_slave/slave_bus/axi_s", "pcie_aclk", "pcie_inbound_axi"). Core clocks: - "pipe" - core-PCS PIPE interface clock coming from external PHY (it's normally named by the platform drivers as just "pipe"); - "core" - primary clock of the controller (none of the platform drivers declare such a clock but in accordance with the ref. manual the devices may have it separately specified); - "aux" - auxiliary PMC domain clock (it is named by some platforms as "pcie_aux" and just "aux"); - "ref" - Generic reference clock (it is a generic clock source, which can be used as a signal source for multiple interfaces, some platforms call it as "ref", "general", "pcie_phy", "pcie_phy_ref"). Application resets: - "dbi" - Data-bus interface reset (it's CSR interface clock and is normally called as "apb" though technically it's not APB but DWC PCIe-specific interface); - "mstr" - AXI-bus master reset (some platforms call it as "port", "apps", "bus", "axi_m"); - "slv" - ABI-bus slave reset (some platforms call it as "port", "apps", "bus", "axi_s"). Core resets: - "non-sticky" - non-sticky CSR flags reset; - "sticky" - sticky CSR flags reset; - "pipe" - PIPE-interface (Core-PCS) logic reset (some platforms call it just "pipe"); - "core" - controller primary reset (resets everything except PMC module, some platforms refer to this signal as "soft", "pci"); - "phy" - PCS/PHY block reset (strictly speaking it is normally connected to the input of an external block, but the reference manual says it must be available for the PMC working correctly, some existing platforms call it "pciephy", "phy", "link"); - "hot" - PMC hot reset signal (also called as "sleep"); - "pwr" - cold reset signal (can be referred as "pwr", "turnoff"). Bus reset: - "perst" - PCIe standard signal used to reset the PCIe peripheral devices. As you can see each platform uses it's own naming for basically the same set of the signals. In the framework of this commit we suggest to add a set of the clocks and reset signals resources, corresponding names and identifiers for each denoted entity. At current stage the platforms will be able to use the provided infrastructure to automatically request all these resources and manipulate with them in the Host/EP init callbacks. Alas it isn't that easy to create a common cold/hot reset procedure due to too many platform-specifics in the procedure, like the external flags exposure and the delays requirement. Link: https://lore.kernel.org/r/20221113191301.5526-20-Sergey.Semin@baikalelectronics.ruSigned-off-by: NSerge Semin <Sergey.Semin@baikalelectronics.ru> Signed-off-by: NLorenzo Pieralisi <lpieralisi@kernel.org> -
由 Serge Semin 提交于
Since the iATU CSR region is now retrieved in the DW PCIe resources getter there is no much benefits in the iATU detection procedures splitting up. Therefore let's join the iATU unroll/viewport detection procedure with the rest of the iATU parameters detection code. The resultant method will be as coherent as before, while the redundant functions will be eliminated thus producing more readable code. Link: https://lore.kernel.org/r/20221113191301.5526-19-Sergey.Semin@baikalelectronics.ruSigned-off-by: NSerge Semin <Sergey.Semin@baikalelectronics.ru> Signed-off-by: NLorenzo Pieralisi <lpieralisi@kernel.org> Reviewed-by: NRob Herring <robh@kernel.org> Reviewed-by: NManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
-
由 Serge Semin 提交于
Currently the DW PCIe Root Port and Endpoint CSR spaces are retrieved in the separate parts of the DW PCIe core driver. It doesn't really make sense since the both controller types have identical set of the core CSR regions: DBI, DBI CS2 and iATU/eDMA. Thus we can simplify the DW PCIe Host and EP initialization methods by moving the platform-specific registers space getting and mapping into a common method. It gets to be even more justified seeing the CSRs base address pointers are preserved in the common DW PCIe descriptor. Note all the OF-based common DW PCIe settings initialization will be moved to the new method too in order to have a single function for all the generic platform properties handling in single place. A nice side-effect of this change is that the pcie-designware-host.c and pcie-designware-ep.c drivers are cleaned up from all the direct dw_pcie storage modification, which makes the DW PCIe core, Root Port and Endpoint modules more coherent. Link: https://lore.kernel.org/r/20221113191301.5526-18-Sergey.Semin@baikalelectronics.ruSigned-off-by: NSerge Semin <Sergey.Semin@baikalelectronics.ru> Signed-off-by: NLorenzo Pieralisi <lpieralisi@kernel.org> Reviewed-by: NRob Herring <robh@kernel.org>
-
由 Serge Semin 提交于
Since in addition to the already available iATU unrolled mapping we are about to add a few more DW PCIe platform-specific capabilities (CDM-check and generic clocks/resets resources) let's add a generic interface to set and get the flags indicating their availability. The new interface shall improve maintainability of the platform-specific code. Link: https://lore.kernel.org/r/20221113191301.5526-17-Sergey.Semin@baikalelectronics.ruSigned-off-by: NSerge Semin <Sergey.Semin@baikalelectronics.ru> Signed-off-by: NLorenzo Pieralisi <lpieralisi@kernel.org> Reviewed-by: NRob Herring <robh@kernel.org> Reviewed-by: NManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
-
由 Serge Semin 提交于
In accordance with the generic PCIe Root Port DT-bindings the "dma-ranges" property has the same format as the "ranges" property. The only difference is in their semantics. The "dma-ranges" property describes the PCIe-to-CPU memory mapping in opposite to the CPU-to-PCIe mapping of the "ranges" property. Even though the DW PCIe controllers are normally equipped with the internal Address Translation Unit which inbound and outbound tables can be used to implement both properties semantics, it was surprising for me to discover that the host-related part of the DW PCIe driver currently supports the "ranges" property only while the "dma-ranges" windows are just ignored. Having the "dma-ranges" supported in the driver would be very handy for the platforms, that don't tolerate the 1:1 CPU-PCIe memory mapping and require a customized PCIe memory layout. So let's fix that by introducing the "dma-ranges" property support. First of all we suggest to rename the dw_pcie_prog_inbound_atu() method to dw_pcie_prog_ep_inbound_atu() and create a new version of the dw_pcie_prog_inbound_atu() function. Thus we'll have two methods for the RC and EP controllers respectively in the same way as it has been developed for the outbound ATU setup methods. Secondly aside with the memory window index and type the new dw_pcie_prog_inbound_atu() function will accept CPU address, PCIe address and size as its arguments. These parameters define the PCIe and CPU memory ranges which will be used to setup the respective inbound ATU mapping. The passed parameters need to be verified against the ATU ranges constraints in the same way as it is done for the outbound ranges. Finally the DMA-ranges detected for the PCIe controller need to be converted to the inbound ATU entries during the host controller initialization procedure. It will be done in the framework of the dw_pcie_iatu_setup() method. Note before setting the inbound ranges up we need to disable all the inbound ATU entries in order to prevent unexpected PCIe TLPs translations defined by some third party software like bootloaders. Link: https://lore.kernel.org/r/20221113191301.5526-16-Sergey.Semin@baikalelectronics.ruSigned-off-by: NSerge Semin <Sergey.Semin@baikalelectronics.ru> Signed-off-by: NLorenzo Pieralisi <lpieralisi@kernel.org> Reviewed-by: NRob Herring <robh@kernel.org> Reviewed-by: NManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
-
- 17 11月, 2022 1 次提交
-
-
由 Thomas Gleixner 提交于
What a zoo: PCI_MSI select GENERIC_MSI_IRQ PCI_MSI_IRQ_DOMAIN def_bool y depends on PCI_MSI select GENERIC_MSI_IRQ_DOMAIN Ergo PCI_MSI enables PCI_MSI_IRQ_DOMAIN which in turn selects GENERIC_MSI_IRQ_DOMAIN. So all the dependencies on PCI_MSI_IRQ_DOMAIN are just an indirection to PCI_MSI. Match the reality and just admit that PCI_MSI requires GENERIC_MSI_IRQ_DOMAIN. Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Reviewed-by: NJason Gunthorpe <jgg@nvidia.com> Acked-by: NBjorn Helgaas <bhelgaas@google.com> Link: https://lore.kernel.org/r/20221111122014.467556921@linutronix.de
-
- 14 11月, 2022 1 次提交
-
-
由 Dmitry Torokhov 提交于
This patch switches the driver away from legacy gpio/of_gpio API to gpiod API, and removes use of of_get_named_gpio_flags() which I want to make private to gpiolib. Link: https://lore.kernel.org/r/20220906204301.3736813-1-dmitry.torokhov@gmail.comSigned-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: NLorenzo Pieralisi <lpieralisi@kernel.org> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 11 11月, 2022 3 次提交
-
-
由 Sascha Hauer 提交于
When the PHY is the reference clock provider then it must be initialized and powered on before the reset on the client is deasserted, otherwise the link will never come up. The order was changed in cf236e0c. Restore the correct order to make the driver work again on boards where the PHY provides the reference clock. This also changes the order for boards where the Soc is the PHY reference clock divider, but this shouldn't do any harm. Link: https://lore.kernel.org/r/20221101095714.440001-1-s.hauer@pengutronix.de Fixes: cf236e0c ("PCI: imx6: Do not hide PHY driver callbacks and refine the error handling") Tested-by: NRichard Zhu <hongxing.zhu@nxp.com> Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de> Signed-off-by: NLorenzo Pieralisi <lpieralisi@kernel.org>
-
由 Johan Hovold 提交于
On Qualcomm platforms like SC8280XP and SA8540P, interconnect bandwidth must be requested before enabling interconnect clocks. Add basic support for managing an optional "pcie-mem" interconnect path by setting a low constraint before enabling clocks and updating it after the link is up. Note that it is not possible for a controller driver to set anything but a maximum peak bandwidth as expected average bandwidth will vary with use case and actual use (and power policy?). This very much remains an unresolved problem with the interconnect framework. Also note that no constraint is set for the SC8280XP/SA8540P "cpu-pcie" path for now as it is not clear what an appropriate constraint would be (and the system does not crash when left unspecified). Link: https://lore.kernel.org/r/20221102090705.23634-3-johan+linaro@kernel.org Fixes: 70574511 ("PCI: qcom: Add support for SC8280XP") Signed-off-by: NJohan Hovold <johan+linaro@kernel.org> Signed-off-by: NLorenzo Pieralisi <lpieralisi@kernel.org> Reviewed-by: NBrian Masney <bmasney@redhat.com> Reviewed-by: NManivannan Sadhasivam <mani@kernel.org> Acked-by: NGeorgi Djakov <djakov@kernel.org>
-
由 Bjorn Helgaas 提交于
Many host controller drivers #include <linux/of_irq.h> even though they don't need it. Remove the unnecessary #includes. Link: https://lore.kernel.org/r/20221031153954.1163623-6-helgaas@kernel.orgSigned-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NRoy Zang <roy.zang@nxp.com>
-
- 10 11月, 2022 2 次提交
-
-
由 Vidya Sagar 提交于
Some of the platforms (like Tegra194 and Tegra234) have open slots and not having an endpoint connected to the slot is not an error. So, changing the macro from dev_err to dev_info to log the event. Link: https://lore.kernel.org/r/20220913101237.4337-1-vidyas@nvidia.comTested-by: NJon Hunter <jonathanh@nvidia.com> Signed-off-by: NVidya Sagar <vidyas@nvidia.com> Signed-off-by: NLorenzo Pieralisi <lpieralisi@kernel.org> Acked-by: NJon Hunter <jonathanh@nvidia.com> Acked-by: NManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
-
由 Manivannan Sadhasivam 提交于
Fix the error message to mention "assert" instead of "deassert". Link: https://lore.kernel.org/r/20221109094039.25753-1-manivannan.sadhasivam@linaro.orgSigned-off-by: NManivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: NLorenzo Pieralisi <lpieralisi@kernel.org> Reviewed-by: NVinod Koul <vkoul@kernel.org>
-
- 27 10月, 2022 2 次提交
-
-
由 Vidya Sagar 提交于
Dual mode DesignWare PCIe IP has PTM capability enabled (if supported) even in the EP mode. The PCIe compliance for the EP mode expects PTM capabilities (ROOT_CAPABLE, RES_CAPABLE, CLK_GRAN) be disabled. Hence disable PTM for the EP mode. Link: https://lore.kernel.org/r/20220919143340.4527-3-vidyas@nvidia.comSigned-off-by: NVidya Sagar <vidyas@nvidia.com> Signed-off-by: NLorenzo Pieralisi <lpieralisi@kernel.org> Acked-by: NJingoo Han <jingoohan1@gmail.com>
-
由 Vidya Sagar 提交于
commit aeaa0bfe ("PCI: dwc: Move N_FTS setup to common setup") incorrectly uses pci->link_gen in deriving the index to the n_fts[] array also introducing the issue of accessing beyond the boundaries of array for greater than Gen-2 speeds. This change fixes that issue. Link: https://lore.kernel.org/r/20220926111923.22487-1-vidyas@nvidia.com Fixes: aeaa0bfe ("PCI: dwc: Move N_FTS setup to common setup") Signed-off-by: NVidya Sagar <vidyas@nvidia.com> Signed-off-by: NLorenzo Pieralisi <lpieralisi@kernel.org> Reviewed-by: NRob Herring <robh@kernel.org> Acked-by: NJingoo Han <jingoohan1@gmail.com>
-
- 06 10月, 2022 4 次提交
-
-
由 Yang Yingliang 提交于
If platform_get_resource_byname() fails, 'mmio_res' will be set to NULL pointer, which causes a NULL pointer dereference when it is used in qcom_pcie_perst_deassert(). Check the return value to prevent it. Link: https://lore.kernel.org/r/20220429080740.1294797-1-yangyingliang@huawei.com Fixes: f55fee56 ("PCI: qcom-ep: Add Qualcomm PCIe Endpoint controller driver") Signed-off-by: NYang Yingliang <yangyingliang@huawei.com> Signed-off-by: NLorenzo Pieralisi <lpieralisi@kernel.org> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Reviewed-by: NAndrew Halaney <ahalaney@redhat.com>
-
由 Manivannan Sadhasivam 提交于
Add support for SM8450 SoC to the Qualcomm PCIe Endpoint Controller driver. The driver uses the same config as the existing SDX55 chipset, so additional settings are not required. Link: https://lore.kernel.org/r/20220914075350.7992-13-manivannan.sadhasivam@linaro.orgSigned-off-by: NManivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: NLorenzo Pieralisi <lpieralisi@kernel.org> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Manivannan Sadhasivam 提交于
PERST separation is an optional debug feature used to collect the crash dump from the PCIe endpoint devices by the PCIe host when the endpoint crashes. This feature keeps the PCIe link up by separating the PCIe IP block from the SoC reset logic. Make the property optional in the driver. Link: https://lore.kernel.org/r/20220914075350.7992-10-manivannan.sadhasivam@linaro.orgSigned-off-by: NManivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: NLorenzo Pieralisi <lpieralisi@kernel.org> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Manivannan Sadhasivam 提交于
The Master AXI clock can be disabled when it is not used i.e., when there is no traffic on the PCIe bus. This helps to save power during idle state. [bhelgaas: tidy and wrap comment] Link: https://lore.kernel.org/r/20220914075350.7992-8-manivannan.sadhasivam@linaro.orgSigned-off-by: NManivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: NLorenzo Pieralisi <lpieralisi@kernel.org> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
- 05 10月, 2022 3 次提交
-
-
由 Manivannan Sadhasivam 提交于
During L1SS, gate the Master clock supplied to the MHI bus to save power. Link: https://lore.kernel.org/r/20220914075350.7992-7-manivannan.sadhasivam@linaro.orgSigned-off-by: NManivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: NLorenzo Pieralisi <lpieralisi@kernel.org>
-
由 Manivannan Sadhasivam 提交于
Qualcomm PCIe controllers have debug registers in the MMIO region that count PCIe link transitions. Expose them over debugfs to userspace to help debug the low power issues. Link: https://lore.kernel.org/r/20220914075350.7992-6-manivannan.sadhasivam@linaro.orgSigned-off-by: NManivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: NLorenzo Pieralisi <lpieralisi@kernel.org>
-
由 Manivannan Sadhasivam 提交于
Disable the Global and PERST IRQs during driver remove to avoid getting spurious IRQs after resource deallocation. Link: https://lore.kernel.org/r/20220914075350.7992-5-manivannan.sadhasivam@linaro.orgSigned-off-by: NManivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: NLorenzo Pieralisi <lpieralisi@kernel.org>
-
- 03 10月, 2022 6 次提交
-
-
由 Manivannan Sadhasivam 提交于
In the qcom_pcie_ep_get_resources() function, dev pointer is already cached in a local variable. So let's make use of it instead of getting the dev pointer again from pdev struct. Link: https://lore.kernel.org/r/20220914075350.7992-4-manivannan.sadhasivam@linaro.orgSigned-off-by: NManivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: NLorenzo Pieralisi <lpieralisi@kernel.org>
-
由 Manivannan Sadhasivam 提交于
Generally, device drivers should just rely on the platform data like devicetree to supply the clocks required for the functioning of the peripheral. There is no need to hardcode the clk info in the driver. So get rid of the static clk info and obtain the platform supplied clks. The total number of clocks supplied is obtained using the devm_clk_bulk_get_all() API and used for the rest of the clk_bulk_ APIs. Link: https://lore.kernel.org/r/20220914075350.7992-3-manivannan.sadhasivam@linaro.orgSigned-off-by: NManivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: NLorenzo Pieralisi <lpieralisi@kernel.org>
-
由 Manivannan Sadhasivam 提交于
Add kernel-doc for qcom_pcie_ep structure. Link: https://lore.kernel.org/r/20220914075350.7992-2-manivannan.sadhasivam@linaro.orgSigned-off-by: NManivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: NLorenzo Pieralisi <lpieralisi@kernel.org>
-
由 Richard Zhu 提交于
Refer to phy_core driver, phy_init() must be called before phy_power_on(). Fix the wrong order of phy_init() and phy_power_on() here. Link: https://lore.kernel.org/r/1662344583-18874-1-git-send-email-hongxing.zhu@nxp.com Fixes: 1aa97b00 ("phy: freescale: pcie: Initialize the imx8 pcie standalone phy driver") Tested-by: NAlexander Stein <alexander.stein@ew.tq-group.com> Signed-off-by: NRichard Zhu <hongxing.zhu@nxp.com> Signed-off-by: NLorenzo Pieralisi <lpieralisi@kernel.org> Acked-by: NVinod Koul <vkoul@kernel.org> Acked-by: NLorenzo Pieralisi <lpieralisi@kernel.org>
-
由 Richard Zhu 提交于
Add i.MX8MP PCIe support. To avoid codes duplication when find the syscon regmap, add the iomux gpr syscon compatible into drvdata. Link: https://lore.kernel.org/r/1662109086-15881-8-git-send-email-hongxing.zhu@nxp.comTested-by: NMarek Vasut <marex@denx.de> Tested-by: NRichard Leitner <richard.leitner@skidata.com> Tested-by: NAlexander Stein <alexander.stein@ew.tq-group.com> Signed-off-by: NRichard Zhu <hongxing.zhu@nxp.com> Signed-off-by: NLorenzo Pieralisi <lpieralisi@kernel.org> Reviewed-by: NLucas Stach <l.stach@pengutronix.de>
-
由 Andy Shevchenko 提交于
As a preparation to unexport of_gpio_named_count(), convert the driver to use gpiod_count() instead. Link: https://lore.kernel.org/r/20220830183310.48541-1-andriy.shevchenko@linux.intel.comSigned-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NLorenzo Pieralisi <lpieralisi@kernel.org> Acked-by: NRob Herring <robh@kernel.org>
-
- 29 9月, 2022 2 次提交
-
-
由 Johan Hovold 提交于
Use a more descriptive name for the reset host-init error label for consistency. Link: https://lore.kernel.org/r/20220928155421.21660-3-johan+linaro@kernel.orgSigned-off-by: NJohan Hovold <johan+linaro@kernel.org> Signed-off-by: NLorenzo Pieralisi <lpieralisi@kernel.org>
-
由 Johan Hovold 提交于
Drop the unused and confusingly named post_deinit callback that was added for the now removed pipe clock handling. If ever needed we can add back a callback named pre_deinit (or perhaps rather pre_phy_power_off) instead. Link: https://lore.kernel.org/r/20220928155421.21660-2-johan+linaro@kernel.orgSigned-off-by: NJohan Hovold <johan+linaro@kernel.org> Signed-off-by: NLorenzo Pieralisi <lpieralisi@kernel.org>
-
- 30 8月, 2022 1 次提交
-
-
由 Dmitry Baryshkov 提交于
Add MODULE_DEVICE_TABLE to enable module autoloading for respective device. Link: https://lore.kernel.org/r/20220430084740.3769925-1-dmitry.baryshkov@linaro.org Fixes: f55fee56 ("PCI: qcom-ep: Add Qualcomm PCIe Endpoint controller driver") Signed-off-by: NDmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: NLorenzo Pieralisi <lpieralisi@kernel.org>
-
- 29 8月, 2022 1 次提交
-
-
由 Will McVicker 提交于
Re-work the msi_msg DMA allocation logic to use dmam_alloc_coherent() which uses the coherent DMA mask to try to return an allocation within the DMA mask limits. With that, we now can drop the msi_page parameter in struct dw_pcie_rp. This allows kernel configurations that disable ZONE_DMA32 to continue supporting a 32-bit DMA mask. Without this patch, the PCIe host device will fail to probe when ZONE_DMA32 is disabled. Link: https://lore.kernel.org/r/20220825235404.4132818-2-willmcvicker@google.com Fixes: 35797e67 ("PCI: dwc: Fix MSI msi_msg DMA mapping") Reported-by: NIsaac J. Manjarres <isaacmanjarres@google.com> Signed-off-by: NWill McVicker <willmcvicker@google.com> Signed-off-by: NLorenzo Pieralisi <lpieralisi@kernel.org> Reviewed-by: NRob Herring <robh@kernel.org> Acked-by: NJingoo Han <jingoohan1@gmail.com>
-
- 23 8月, 2022 5 次提交
-
-
由 Johan Hovold 提交于
Sort the device-id table entries alphabetically by compatible string to make it easier to find entries and add new ones. Link: https://lore.kernel.org/r/20220714071348.6792-9-johan+linaro@kernel.orgSigned-off-by: NJohan Hovold <johan+linaro@kernel.org> Signed-off-by: NLorenzo Pieralisi <lpieralisi@kernel.org> Reviewed-by: NBrian Masney <bmasney@redhat.com> Acked-by: NStanimir Varbanov <svarbanov@mm-sol.com>
-
由 Johan Hovold 提交于
The various IP versions have different configurations that are encoded in separate sets of operation callbacks. Currently, there is no need for also maintaining corresponding sets of data parameters, but it is conceivable that these may again be found useful (e.g. to implement minor variations of the operation callbacks). Rename the default configuration structures after the IP version they apply to so that they can more easily be reused by different SoCs. Note that SoC specific configurations can be added later if need arises (e.g. cfg_sc8280xp). Link: https://lore.kernel.org/r/20220714071348.6792-8-johan+linaro@kernel.orgSigned-off-by: NJohan Hovold <johan+linaro@kernel.org> Signed-off-by: NLorenzo Pieralisi <lpieralisi@kernel.org> Reviewed-by: NRob Herring <robh@kernel.org> Reviewed-by: NManivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Reviewed-by: NDmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: NBrian Masney <bmasney@redhat.com> Acked-by: NStanimir Varbanov <svarbanov@mm-sol.com>
-
由 Johan Hovold 提交于
The kernel is not a devicetree validator and does not need to re-encode information which is already available in the devicetree. This is specifically true for the optional PCIe clocks, some of which are really interconnect clocks. Treat also the 2.7.0 optional clocks as truly optional instead of maintaining a list of clocks per compatible (including two compatible strings for the two identical controllers on sm8450) just to validate the devicetree. Link: https://lore.kernel.org/r/20220714071348.6792-7-johan+linaro@kernel.orgSigned-off-by: NJohan Hovold <johan+linaro@kernel.org> Signed-off-by: NLorenzo Pieralisi <lpieralisi@kernel.org> Reviewed-by: NRob Herring <robh@kernel.org> Reviewed-by: NManivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Reviewed-by: NDmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: NBrian Masney <bmasney@redhat.com> Acked-by: NStanimir Varbanov <svarbanov@mm-sol.com>
-
由 Johan Hovold 提交于
The SA8540P platform has five PCIe controllers: two 4-lane, two 2-lane and one 1-lane. Add a new "qcom,pcie-sa8540p" compatible string and reuse the 1.9.0 ops. Note that like for SC8280XP, the SA8540P controllers need two or three interconnect clocks to be enabled. Link: https://lore.kernel.org/r/20220714071348.6792-6-johan+linaro@kernel.orgSigned-off-by: NJohan Hovold <johan+linaro@kernel.org> Signed-off-by: NLorenzo Pieralisi <lpieralisi@kernel.org> Reviewed-by: NRob Herring <robh@kernel.org> Reviewed-by: NManivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Reviewed-by: NBrian Masney <bmasney@redhat.com> Acked-by: NStanimir Varbanov <svarbanov@mm-sol.com>
-
由 Johan Hovold 提交于
The SC8280XP platform has seven PCIe controllers: two used with USB4, two 4-lane, two 2-lane and one 1-lane. Add a new "qcom,pcie-sc8280xp" compatible string and reuse the 1.9.0 ops. Note that the SC8280XP controllers need two or three interconnect clocks to be enabled. Model these as optional clocks to avoid encoding devicetree data in the PCIe driver. Note that the same could be done for the SM8450 interconnect clocks and possibly also for the TBU clocks. Link: https://lore.kernel.org/r/20220714071348.6792-5-johan+linaro@kernel.orgSigned-off-by: NJohan Hovold <johan+linaro@kernel.org> Signed-off-by: NLorenzo Pieralisi <lpieralisi@kernel.org> Reviewed-by: NManivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Acked-by: NStanimir Varbanov <svarbanov@mm-sol.com>
-
- 10 8月, 2022 1 次提交
-
-
由 Frank Li 提交于
ntb_mw_set_trans() will set memory map window after endpoint function driver bind. The inbound map address need be updated dynamically when using NTB by PCIe Root Port and PCIe Endpoint connection. Checking if iatu already assigned to the BAR, if yes, using assigned iatu number to update inbound address map and skip set BAR's register. Signed-off-by: NFrank Li <Frank.Li@nxp.com> Signed-off-by: NJon Mason <jdmason@kudzu.us>
-
- 02 8月, 2022 2 次提交
-
-
由 Richard Zhu 提交于
Support more than Gen2 speed link mode, since i.MX8MP PCIe supports up to Gen3 link speed. Link: https://lore.kernel.org/r/1658287576-26908-1-git-send-email-hongxing.zhu@nxp.comSigned-off-by: NRichard Zhu <hongxing.zhu@nxp.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Richard Zhu 提交于
The PCIE_DBI_RO_WR_EN bit should be set when write some DBI registers. To make sure that the DBI registers are writable, set the PCIE_DBI_RO_WR_EN properly when writing the DBI registers. Link: https://lore.kernel.org/r/1652866528-13220-1-git-send-email-hongxing.zhu@nxp.comSigned-off-by: NRichard Zhu <hongxing.zhu@nxp.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-