- 07 9月, 2017 3 次提交
-
-
由 Bjorn Helgaas 提交于
Use tabs (not spaces) for indentation. No functional change intended. Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Bjorn Helgaas 提交于
Apparently the PCIe capability is at address 0x40 in config space of X-Gene v1 Root Ports. Add a definition of that and use the generic PCI_EXP_RTCTL offset into the capability. No functional change intended. Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Fabio Estevam 提交于
When platform_get_irq() fails we should propagate the real error value instead of always returning -EINVAL. Signed-off-by: NFabio Estevam <fabio.estevam@nxp.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Cc: Duc Dang <dhdang@apm.com>
-
- 06 9月, 2017 11 次提交
-
-
由 Fabio Estevam 提交于
When platform_get_irq() fails we should propagate the real error value instead of always returning -EINVAL. Signed-off-by: NFabio Estevam <fabio.estevam@nxp.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Cc: Michal Simek <michal.simek@xilinx.com>
-
由 Fabio Estevam 提交于
When platform_get_irq() fails we should propagate the real error value instead of always returning -EINVAL. Signed-off-by: NFabio Estevam <fabio.estevam@nxp.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Cc: Shawn Lin <shawn.lin@rock-chips.com>
-
由 Fabio Estevam 提交于
platform_get_irq() returns a negative number on failure, so adjust the logic to detect such condition and propagate the real error value on failure. Signed-off-by: NFabio Estevam <fabio.estevam@nxp.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Cc: Ley Foon Tan <lftan@altera.com>
-
由 Fabio Estevam 提交于
platform_get_irq() returns a negative number on failure, so adjust the logic to detect such condition and propagate the real error value on failure. Signed-off-by: NFabio Estevam <fabio.estevam@nxp.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Cc: Pratyush Anand <pratyush.anand@gmail.com>
-
由 Fabio Estevam 提交于
platform_get_irq() returns a negative number on failure, so adjust the logic to detect such condition and propagate the real error value on failure. Signed-off-by: NFabio Estevam <fabio.estevam@nxp.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NNiklas Cassel <niklas.cassel@axis.com>
-
由 Fabio Estevam 提交于
platform_get_irq() returns a negative number on failure, so adjust the logic to detect such condition and propagate the real error value on failure. Signed-off-by: NFabio Estevam <fabio.estevam@nxp.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-
由 Fabio Estevam 提交于
When platform_get_irq() fails we should propagate the real error value instead of always returning -EINVAL. Signed-off-by: NFabio Estevam <fabio.estevam@nxp.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NKishon Vijay Abraham I <kishon@ti.com>
-
由 Fabio Estevam 提交于
platform_get_irq() returns a negative number on failure, so adjust the logic to detect such condition and propagate the real error value on failure. Reported-by: NBjorn Helgaas <helgaas@kernel.org> Signed-off-by: NFabio Estevam <fabio.estevam@nxp.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NJingoo Han <jingoohan1@gmail.com>
-
由 Bjorn Helgaas 提交于
Use tabs (not spaces) for indentation. No functional change intended. Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Bjorn Helgaas 提交于
PCI_EXP_CAP is an iProc-specific value, so rename it to IPROC_PCI_EXP_CAP to make it obvious that it's not related to the generic values like PCI_EXP_RTCTL, etc. No functional change intended. Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Oza Pawandeep 提交于
During soft reset (e.g., "reboot" from Linux) on some iProc-based SOCs, the LCPLL clock and PERST both go off simultaneously. This seems in accordance with the PCIe Card Electromechanical spec, r2.0, sec 2.2.3, which says the clock goes inactive after PERST# goes active, but doesn't specify how long the clock should be valid after PERST#. However, we have observed that with the iProc Stingray, some Intel NVMe endpoints, e.g., the P3700 400GB series, are not detected correctly upon the next boot sequence unless the clock remains valid for some time after PERST# is asserted. Delay 500ms after asserting PERST# before performing a reboot. The 500ms is experimentally determined. Signed-off-by: NOza Pawandeep <oza.oza@broadcom.com> [bhelgaas: changelog, add spec reference, fold in iproc_pcie_shutdown() export from Arnd Bergmann <arnd@arndb.de>] Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Reviewed-by: NRay Jui <ray.jui@broadcom.com> Reviewed-by: NScott Branden <scott.branden@broadcom.com>
-
- 31 8月, 2017 2 次提交
-
-
由 Jon Derrick 提交于
VMD currently only exists for Intel x86 products, so move the VMD quirk to arch/x86. Signed-off-by: NJon Derrick <jonathan.derrick@intel.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Keith Busch 提交于
VMD hardware has to share its vectors among child devices in its PCI domain so we should allocate as many as possible rather than just ones that can be affinitized. pci_alloc_irq_vectors_affinity() limits the number of affinitized IRQs to the number of present CPUs (see irq_calc_affinity_vectors()). But we'd prefer to have more vectors, even if they aren't distributed across the CPUs, so use pci_alloc_irq_vectors() instead. Reported-by: NBrad Goodman <Bradley.Goodman@dell.com> Signed-off-by: NKeith Busch <keith.busch@intel.com> [bhelgaas: add irq_calc_affinity_vectors() reference to changelog] Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
- 30 8月, 2017 24 次提交
-
-
由 Honghui Zhang 提交于
Switch from using custom INTX_NUM macro to the generic PCI_NUM_INTX definition for the number of INTx interrupts. Signed-off-by: NHonghui Zhang <honghui.zhang@mediatek.com> [bhelgaas: use subject/changelog from similar patches] Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Honghui Zhang 提交于
MT2712 and MT7622's PCIe host controller support MSI, but only 32-bit MSI addresses are supported. It connects to GIC with the same IRQ number as the INTx IRQ, so it shares the same IRQ with INTx IRQ. Add MSI support for MT2712 and MT7622. Signed-off-by: NHonghui Zhang <honghui.zhang@mediatek.com> [bhelgaas: changes to follow rcar & tegra: rename to mtk_pcie_msi_alloc(), add mtk_pcie_msi_free(), free hwirq if irq_create_mapping() fails, call irq_dispose_mapping() from mtk_msi_teardown_irq()] Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NRyder Lee <ryder.lee@mediatek.com>
-
由 Honghui Zhang 提交于
75983c6d1f38 ("PCI: mediatek: Add controller support for MT2712 and MT7622") has put the mtk_pcie * into bus->sysdata. Take advantage of that to get the private data and simplify the code. Signed-off-by: NHonghui Zhang <honghui.zhang@mediatek.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NRyder Lee <ryder.lee@mediatek.com>
-
由 Ryder Lee 提交于
MT2712 and MT7622 using a new IP block of Gen2 controller which has two root ports and shares the same probing flow with MT2701/MT7623. Both MT2712 and MT7622 have the same per-port control registers, but there are slight differences between them: - MT7622 has more clocks than MT2712. - MT7622 has shared control registers which are used to enable LTSSM and ASPM while MT2712 does not. Add host controller support for MT2712/MT7622. Signed-off-by: NRyder Lee <ryder.lee@mediatek.com> Signed-off-by: NHonghui Zhang <honghui.zhang@mediatek.com> [bhelgaas: folded in fix from http://lkml.kernel.org/r/1502715868-17651-2-git-send-email-honghui.zhang@mediatek.com] Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Ryder Lee 提交于
This is a transitional patch. We currently use platfarm_get_resource() for retrieving the IOMEM resources, but there might be some chips don't have subsys/shared registers part, which depends on platform design, and these will be introduced in further patches. Switch this function to use the platform_get_resource_byname() so that the binding can be agnostic of the resource order. Signed-off-by: NRyder Lee <ryder.lee@mediatek.com> Signed-off-by: NHonghui Zhang <honghui.zhang@mediatek.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Honghui Zhang 提交于
Introduce a structure "mtk_pcie_soc" to abstract the differences between controller generations, and the .startup() hook is used to encapsulate some SoC-dependent related setting. In doing so, the common code which will be reused by future chips. Signed-off-by: NRyder Lee <ryder.lee@mediatek.com> Signed-off-by: NHonghui Zhang <honghui.zhang@mediatek.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Honghui Zhang 提交于
Rename "port->index" to "port->slot" since the ports are hardwired at PCI_SLOT. Also rename "mtk_pcie_parse_ports()" to "mtk_pcie_parse_port()" since it parses one port each time. No functional change in this patch. Signed-off-by: NHonghui Zhang <honghui.zhang@mediatek.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Ryder Lee 提交于
Wait for Gen2 training with readl_poll_timeout(), and simplify the hardware assert logical by merging it into a new mtk_pcie_startup_port() interface. Signed-off-by: NRyder Lee <ryder.lee@mediatek.com> Signed-off-by: NHonghui Zhang <honghui.zhang@mediatek.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Philipp Zabel 提交于
Commit a53e35db ("reset: Ensure drivers are explicit when requesting reset lines") started to transition the reset control request API calls to explicitly state whether the driver needs exclusive or shared reset control behavior. Convert all drivers requesting exclusive resets to the explicit API call so the temporary transition helpers can be removed. No functional changes. Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Cc: Ryder Lee <ryder.lee@mediatek.com> Cc: Matthias Brugger <matthias.bgg@gmail.com>
-
由 Hou Zhiqiang 提交于
Add support for ls1088a. Signed-off-by: NHou Zhiqiang <Zhiqiang.Hou@nxp.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NMinghuan Lian <minghuan.Lian@nxp.com>
-
由 Hou Zhiqiang 提交于
The ls2088a PCIe controller's register addresses are different from ls2080a, so add a match entry to identify ls2088a PCIe. Signed-off-by: NHou Zhiqiang <Zhiqiang.Hou@nxp.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NMinghuan Lian <minghuan.Lian@nxp.com>
-
由 Hou Zhiqiang 提交于
Previously we enabled writes to the DBI read-only registers so the Class Code fix in dw_pcie_setup_rc() would work. But now dw_pcie_setup_rc() enables write permission itself, so we don't need to do it here. Stop enabling writes to the DBI read-only registers. Signed-off-by: NHou Zhiqiang <Zhiqiang.Hou@nxp.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NRoy Zang <tie-fei.zang@freescale.com>
-
由 Hou Zhiqiang 提交于
Now that the Class Code fixup in dw_pcie_setup_rc() works, remove the fixup from the Layerscape driver. Signed-off-by: NHou Zhiqiang <Zhiqiang.Hou@nxp.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NRoy Zang <tie-fei.zang@freescale.com>
-
由 Hou Zhiqiang 提交于
dw_pcie_setup_rc() contains fixes to update the Class Code and Interrupt Pin registers, but the fixes don't actually work because these registers are read-only. Enable write permission before updating the Class Code and Interrupt Pin. Signed-off-by: NHou Zhiqiang <Zhiqiang.Hou@nxp.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NJoao Pinto <jpinto@synopsys.com> Acked-by: NRoy Zang <tie-fei.zang@freescale.com>
-
由 Hou Zhiqiang 提交于
The read-only DBI registers can be written only when the "Write to RO Registers Using DBI" (DBI_RO_WR_EN) field of MISC_CONTROL_1_OFF is set. Add accessors to enable and disable write permission, and use them instead of accessing MISC_CONTROL_1_OFF directly. Signed-off-by: NHou Zhiqiang <Zhiqiang.Hou@nxp.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NJoao Pinto <jpinto@synopsys.com> Acked-by: NRoy Zang <tie-fei.zang@freescale.com>
-
由 Hou Zhiqiang 提交于
Disable all the outbound windows to avoid one transaction hitting multiple outbound windows. dw_pcie_setup_rc() will reconfigure the outbound windows, which may conflict with windows configured by the bootloader. Signed-off-by: NHou Zhiqiang <Zhiqiang.Hou@nxp.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NRoy Zang <tie-fei.zang@freescale.com>
-
由 Hou Zhiqiang 提交于
ls1021_pcie_host_init() duplicated the code in the generic ls_pcie_host_init(). Call ls_pcie_host_init() instead of duplicating the code. Signed-off-by: NHou Zhiqiang <Zhiqiang.Hou@nxp.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NRoy Zang <tie-fei.zang@freescale.com>
-
由 Kishon Vijay Abraham I 提交于
Some platforms like K2G has reserved use of BAR_0 which shouldn't be disabled by software. Avoid disabling all BARs during initialization. Signed-off-by: NKishon Vijay Abraham I <kishon@ti.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Kishon Vijay Abraham I 提交于
dra7xx has all base address registers (BAR) enabled by default. Reset all BARs during initialization and so that BARs are enabled only if they are actually used. Signed-off-by: NKishon Vijay Abraham I <kishon@ti.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Kishon Vijay Abraham I 提交于
Use the newly introduced __pci_epc_mem_init() instead of pci_epc_mem_init() to provide page_size to pci_epc_mem. This is in preparation for adding EP support to K2G which has a restriction that the address region should be either divided into 1MB/2MB/4MB or 8MB sizes (Ref: 11.14.4.9.1 Outbound Address Translation in K2G TRM SPRUHY8F January 2016 – Revised May 2017). Signed-off-by: NKishon Vijay Abraham I <kishon@ti.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Shawn Lin 提交于
epf_test is allocated using devm_kzalloc(). Hence it's not required to explicitly free it in remove() callback. Since ->remove() callback doesn't do anything other than freeing epf_test, remove the ->remove() callback. Signed-off-by: NShawn Lin <shawn.lin@rock-chips.com> Signed-off-by: NKishon Vijay Abraham I <kishon@ti.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Kishon Vijay Abraham I 提交于
Certain platforms like TI's K2G doesn't support link-up notification. Add support to poll early (without waiting for the linkup notification) for commands from the host. Signed-off-by: NKishon Vijay Abraham I <kishon@ti.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Kishon Vijay Abraham I 提交于
pci_epf_test always maps the PCI_ENDPOINT_TEST registers to BAR_0. But if BAR_0 is reserved for some other purpose (like in TI's K2G BAR_0 is mapped to application registers and cannot be used to map any other regions), PCI_ENDPOINT_TEST registers cannot be mapped making pci_epf_test unusable. Add support to use any BAR to map PCI_ENDPOINT_TEST registers. Signed-off-by: NKishon Vijay Abraham I <kishon@ti.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Kishon Vijay Abraham I 提交于
pci_epf_test_cmd_handler() is the delayed work function which reads *command* (set by the host) and performs various actions requested by the host periodically. If the value in *command* is '0', it goes to the reset_handler where it resets *command* to '0' and queues pci_epf_test_cmd_handler(). However if the host writes a value to the *command* just after the pci-epf-test driver checks *command* for '0' and before the control goes to reset_handler, the *command* will be reset to '0' and the pci-epf-test driver won't be able to perform the actions requested by the host. Fix it here by not resetting the *command* in the reset_handler. Signed-off-by: NKishon Vijay Abraham I <kishon@ti.com> Signed-off-by: NSekhar Nori <nsekhar@ti.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-