Enables support for the PCIe controller host mode in the
iMX6/7/8 SoCs to work in endpoint mode.
-config PCI_IMX6_COMPLIANCE_TEST
- bool "Enable pcie compliance tests on imx6"
- depends on PCI_IMX6_HOST
- default n
- help
- Say Y here if you want do the compliance tests on imx6 pcie rc found
- on FSL iMX SoCs.
-
config PCI_IMX6_EP
bool "Freescale i.MX6/7/8 PCIe controller endpoint mode"
depends on ARCH_MXC || COMPILE_TEST
#define IMX8MM_GPR_PCIE_POWER_OFF BIT(17)
#define IMX8MM_GPR_PCIE_SSC_EN BIT(16)
+static int imx6_pcie_cz_enabled;
static void imx6_pcie_ltssm_disable(struct device *dev);
static bool imx6_pcie_readable_reg(struct device *dev, unsigned int reg)
* started in Gen2 mode, there is a possibility the devices on the
* bus will not be detected at all. This happens with PCIe switches.
*/
- if (!IS_ENABLED(CONFIG_PCI_IMX6_COMPLIANCE_TEST)) {
+ if (!imx6_pcie_cz_enabled) {
tmp = dw_pcie_readl_dbi(pci, offset + PCI_EXP_LNKCAP);
tmp &= ~PCI_EXP_LNKCAP_SLS;
tmp |= PCI_EXP_LNKCAP_SLS_2_5GB;
dw_pcie_readl_dbi(pci, PCIE_PORT_DEBUG0),
dw_pcie_readl_dbi(pci, PCIE_PORT_DEBUG1));
imx6_pcie_reset_phy(imx6_pcie);
- if (!IS_ENABLED(CONFIG_PCI_IMX6_COMPLIANCE_TEST)) {
+ if (!imx6_pcie_cz_enabled) {
imx6_pcie_clk_disable(imx6_pcie);
if (imx6_pcie->vpcie != NULL)
regulator_disable(imx6_pcie->vpcie);
imx6_pcie_resume_noirq)
};
+static int __init imx6_pcie_compliance_test_enable(char *str)
+{
+ if (!strcmp(str, "yes")) {
+ pr_info("Enable the i.MX PCIe compliance tests mode.\n");
+ imx6_pcie_cz_enabled = 1;
+ }
+ return 1;
+}
+
+__setup("pcie_cz_enabled=", imx6_pcie_compliance_test_enable);
+
static int imx6_pcie_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
ret = imx6_add_pcie_port(imx6_pcie, pdev);
if (ret < 0) {
- if (IS_ENABLED(CONFIG_PCI_IMX6_COMPLIANCE_TEST)) {
+ if (imx6_pcie_cz_enabled) {
/* The PCIE clocks wouldn't be turned off */
dev_info(dev, "To do the compliance tests.\n");
ret = 0;