[pci:next 15/20] drivers/pci/controller/dwc/pci-imx6.c:1224:35: error: use of undeclared identifier 'IMX_PCIE_FLAG_CPU_ADDR_FIXUP'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git next
head:   19501c8805572d695bc694a761b3e61f0aa32ae4
commit: 7a6f84fed4abbee48ea03897340040dfced9ceee [15/20] Merge branch 'controller/imx6'
config: arm-randconfig-002-20250115 (https://download.01.org/0day-ci/archive/20250115/202501151913.zNl1cXD5-lkp@xxxxxxxxx/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project f5cd181ffbb7cb61d582fe130d46580d5969d47a)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250115/202501151913.zNl1cXD5-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202501151913.zNl1cXD5-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

   In file included from drivers/pci/controller/dwc/pci-imx6.c:22:
   In file included from include/linux/pci.h:1647:
   In file included from include/linux/dmapool.h:14:
   In file included from include/linux/scatterlist.h:8:
   In file included from include/linux/mm.h:2223:
   include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     518 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
   drivers/pci/controller/dwc/pci-imx6.c:1109:11: warning: variable 'sid' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
    1109 |         else if (!err_m)
         |                  ^~~~~~
   drivers/pci/controller/dwc/pci-imx6.c:1112:41: note: uninitialized use occurs here
    1112 |         return imx_pcie_add_lut(imx_pcie, rid, sid);
         |                                                ^~~
   drivers/pci/controller/dwc/pci-imx6.c:1109:7: note: remove the 'if' if its condition is always true
    1109 |         else if (!err_m)
         |              ^~~~~~~~~~~
    1110 |                 sid = sid_m & IMX95_SID_MASK;
   drivers/pci/controller/dwc/pci-imx6.c:1037:9: note: initialize the variable 'sid' to silence this warning
    1037 |         u32 sid;
         |                ^
         |                 = 0
>> drivers/pci/controller/dwc/pci-imx6.c:1224:35: error: use of undeclared identifier 'IMX_PCIE_FLAG_CPU_ADDR_FIXUP'
    1224 |         if (!(imx_pcie->drvdata->flags & IMX_PCIE_FLAG_CPU_ADDR_FIXUP))
         |                                          ^
   drivers/pci/controller/dwc/pci-imx6.c:1360:34: warning: shift count >= width of type [-Wshift-count-overflow]
    1360 |                 dma_set_mask_and_coherent(dev, DMA_BIT_MASK(64));
         |                                                ^~~~~~~~~~~~~~~~
   include/linux/dma-mapping.h:73:54: note: expanded from macro 'DMA_BIT_MASK'
      73 | #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
         |                                                      ^ ~~~
   drivers/pci/controller/dwc/pci-imx6.c:1790:5: error: use of undeclared identifier 'IMX_PCIE_FLAG_CPU_ADDR_FIXUP'
    1790 |                          IMX_PCIE_FLAG_CPU_ADDR_FIXUP |
         |                          ^
   3 warnings and 2 errors generated.


vim +/IMX_PCIE_FLAG_CPU_ADDR_FIXUP +1224 drivers/pci/controller/dwc/pci-imx6.c

bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1028  
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1029  static int imx_pcie_enable_device(struct pci_host_bridge *bridge,
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1030  				  struct pci_dev *pdev)
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1031  {
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1032  	struct imx_pcie *imx_pcie = to_imx_pcie(to_dw_pcie_from_pp(bridge->sysdata));
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1033  	u32 sid_i, sid_m, rid = pci_dev_id(pdev);
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1034  	struct device_node *target;
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1035  	struct device *dev;
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1036  	int err_i, err_m;
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1037  	u32 sid;
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1038  
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1039  	dev = imx_pcie->pci->dev;
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1040  
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1041  	target = NULL;
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1042  	err_i = of_map_id(dev->of_node, rid, "iommu-map", "iommu-map-mask",
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1043  			  &target, &sid_i);
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1044  	if (target) {
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1045  		of_node_put(target);
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1046  	} else {
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1047  		/*
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1048  		 * "target == NULL && err_i == 0" means RID out of map range.
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1049  		 * Use 1:1 map RID to streamID. Hardware can't support this
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1050  		 * because the streamID is only 6 bits
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1051  		 */
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1052  		err_i = -EINVAL;
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1053  	}
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1054  
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1055  	target = NULL;
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1056  	err_m = of_map_id(dev->of_node, rid, "msi-map", "msi-map-mask",
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1057  			  &target, &sid_m);
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1058  
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1059  	/*
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1060  	 *   err_m      target
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1061  	 *	0	NULL		RID out of range. Use 1:1 map RID to
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1062  	 *				streamID, Current hardware can't
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1063  	 *				support it, so return -EINVAL.
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1064  	 *      != 0    NULL		msi-map does not exist, use built-in MSI
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1065  	 *	0	!= NULL		Get correct streamID from RID
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1066  	 *	!= 0	!= NULL		Invalid combination
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1067  	 */
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1068  	if (!err_m && !target)
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1069  		return -EINVAL;
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1070  	else if (target)
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1071  		of_node_put(target); /* Find streamID map entry for RID in msi-map */
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1072  
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1073  	/*
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1074  	 * msi-map        iommu-map
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1075  	 *   N                N            DWC MSI Ctrl
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1076  	 *   Y                Y            ITS + SMMU, require the same SID
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1077  	 *   Y                N            ITS
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1078  	 *   N                Y            DWC MSI Ctrl + SMMU
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1079  	 */
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1080  	if (err_i && err_m)
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1081  		return 0;
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1082  
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1083  	if (!err_i && !err_m) {
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1084  		/*
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1085  		 *	    Glue Layer
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1086  		 *          <==========>
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1087  		 * ┌─────┐                  ┌──────────┐
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1088  		 * │ LUT │ 6-bit streamID   │          │
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1089  		 * │     │─────────────────►│  MSI     │
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1090  		 * └─────┘   2-bit ctrl ID  │          │
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1091  		 *             ┌───────────►│          │
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1092  		 *  (i.MX95)   │            │          │
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1093  		 *  00 PCIe0   │            │          │
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1094  		 *  01 ENETC   │            │          │
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1095  		 *  10 PCIe1   │            │          │
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1096  		 *             │            └──────────┘
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1097  		 * The MSI glue layer auto adds 2 bits controller ID ahead of
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1098  		 * streamID, so mask these 2 bits to get streamID. The
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1099  		 * IOMMU glue layer doesn't do that.
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1100  		 */
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1101  		if (sid_i != (sid_m & IMX95_SID_MASK)) {
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1102  			dev_err(dev, "iommu-map and msi-map entries mismatch!\n");
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1103  			return -EINVAL;
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1104  		}
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1105  	}
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1106  
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1107  	if (!err_i)
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1108  		sid = sid_i;
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14 @1109  	else if (!err_m)
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1110  		sid = sid_m & IMX95_SID_MASK;
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1111  
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1112  	return imx_pcie_add_lut(imx_pcie, rid, sid);
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1113  }
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1114  
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1115  static void imx_pcie_disable_device(struct pci_host_bridge *bridge,
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1116  				    struct pci_dev *pdev)
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1117  {
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1118  	struct imx_pcie *imx_pcie;
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1119  
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1120  	imx_pcie = to_imx_pcie(to_dw_pcie_from_pp(bridge->sysdata));
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1121  	imx_pcie_remove_lut(imx_pcie, pci_dev_id(pdev));
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1122  }
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1123  
d657ea28d55037 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2024-07-29  1124  static int imx_pcie_host_init(struct dw_pcie_rp *pp)
fa33a6d87eac1a drivers/pci/host/pci-imx6.c           Marek Vasut            2013-12-12  1125  {
442ec4c04d1235 drivers/pci/dwc/pci-imx6.c            Kishon Vijay Abraham I 2017-02-15  1126  	struct dw_pcie *pci = to_dw_pcie_from_pp(pp);
9751f65db025a1 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu            2022-07-14  1127  	struct device *dev = pci->dev;
d657ea28d55037 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2024-07-29  1128  	struct imx_pcie *imx_pcie = to_imx_pcie(pci);
9751f65db025a1 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu            2022-07-14  1129  	int ret;
bb38919ec56e07 drivers/pci/host/pci-imx6.c           Sean Cross             2013-09-26  1130  
d657ea28d55037 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2024-07-29  1131  	if (imx_pcie->vpcie) {
d657ea28d55037 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2024-07-29  1132  		ret = regulator_enable(imx_pcie->vpcie);
f0691e326b270d drivers/pci/controller/dwc/pci-imx6.c Richard Zhu            2022-07-14  1133  		if (ret) {
f0691e326b270d drivers/pci/controller/dwc/pci-imx6.c Richard Zhu            2022-07-14  1134  			dev_err(dev, "failed to enable vpcie regulator: %d\n",
f0691e326b270d drivers/pci/controller/dwc/pci-imx6.c Richard Zhu            2022-07-14  1135  				ret);
f0691e326b270d drivers/pci/controller/dwc/pci-imx6.c Richard Zhu            2022-07-14  1136  			return ret;
f0691e326b270d drivers/pci/controller/dwc/pci-imx6.c Richard Zhu            2022-07-14  1137  		}
f0691e326b270d drivers/pci/controller/dwc/pci-imx6.c Richard Zhu            2022-07-14  1138  	}
f0691e326b270d drivers/pci/controller/dwc/pci-imx6.c Richard Zhu            2022-07-14  1139  
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1140  	if (pp->bridge && imx_check_flag(imx_pcie, IMX_PCIE_FLAG_HAS_LUT)) {
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1141  		pp->bridge->enable_device = imx_pcie_enable_device;
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1142  		pp->bridge->disable_device = imx_pcie_disable_device;
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1143  	}
bc92494deb1c40 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2025-01-14  1144  
d657ea28d55037 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2024-07-29  1145  	imx_pcie_assert_core_reset(imx_pcie);
21ad80b0e0ce5f drivers/pci/controller/dwc/pci-imx6.c Frank Li               2024-02-20  1146  
d657ea28d55037 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2024-07-29  1147  	if (imx_pcie->drvdata->init_phy)
d657ea28d55037 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2024-07-29  1148  		imx_pcie->drvdata->init_phy(imx_pcie);
21ad80b0e0ce5f drivers/pci/controller/dwc/pci-imx6.c Frank Li               2024-02-20  1149  
d657ea28d55037 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2024-07-29  1150  	imx_pcie_configure_type(imx_pcie);
cf236e0c0d59b3 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu            2022-07-14  1151  
d657ea28d55037 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2024-07-29  1152  	ret = imx_pcie_clk_enable(imx_pcie);
835a345b18b013 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu            2022-07-14  1153  	if (ret) {
835a345b18b013 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu            2022-07-14  1154  		dev_err(dev, "unable to enable pcie clocks: %d\n", ret);
835a345b18b013 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu            2022-07-14  1155  		goto err_reg_disable;
835a345b18b013 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu            2022-07-14  1156  	}
835a345b18b013 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu            2022-07-14  1157  
d657ea28d55037 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2024-07-29  1158  	if (imx_pcie->phy) {
d657ea28d55037 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2024-07-29  1159  		ret = phy_init(imx_pcie->phy);
cf236e0c0d59b3 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu            2022-07-14  1160  		if (ret) {
cf236e0c0d59b3 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu            2022-07-14  1161  			dev_err(dev, "pcie PHY power up failed\n");
835a345b18b013 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu            2022-07-14  1162  			goto err_clk_disable;
cf236e0c0d59b3 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu            2022-07-14  1163  		}
cf236e0c0d59b3 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu            2022-07-14  1164  
0dafa2a5c9e14e drivers/pci/controller/dwc/pci-imx6.c Frank Li               2024-11-19  1165  		ret = phy_set_mode_ext(imx_pcie->phy, PHY_MODE_PCIE,
0dafa2a5c9e14e drivers/pci/controller/dwc/pci-imx6.c Frank Li               2024-11-19  1166  				       imx_pcie->drvdata->mode == DW_PCIE_EP_TYPE ?
0dafa2a5c9e14e drivers/pci/controller/dwc/pci-imx6.c Frank Li               2024-11-19  1167  						PHY_MODE_PCIE_EP : PHY_MODE_PCIE_RC);
8026f2d8e8a95a drivers/pci/controller/dwc/pci-imx6.c Frank Li               2024-07-29  1168  		if (ret) {
8026f2d8e8a95a drivers/pci/controller/dwc/pci-imx6.c Frank Li               2024-07-29  1169  			dev_err(dev, "unable to set PCIe PHY mode\n");
8026f2d8e8a95a drivers/pci/controller/dwc/pci-imx6.c Frank Li               2024-07-29  1170  			goto err_phy_exit;
8026f2d8e8a95a drivers/pci/controller/dwc/pci-imx6.c Frank Li               2024-07-29  1171  		}
8026f2d8e8a95a drivers/pci/controller/dwc/pci-imx6.c Frank Li               2024-07-29  1172  
d657ea28d55037 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2024-07-29  1173  		ret = phy_power_on(imx_pcie->phy);
cf236e0c0d59b3 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu            2022-07-14  1174  		if (ret) {
cf236e0c0d59b3 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu            2022-07-14  1175  			dev_err(dev, "waiting for PHY ready timeout!\n");
5b04d44d5c74e4 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2024-07-29  1176  			goto err_phy_exit;
cf236e0c0d59b3 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu            2022-07-14  1177  		}
cf236e0c0d59b3 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu            2022-07-14  1178  	}
ae6b9a65af4801 drivers/pci/controller/dwc/pci-imx6.c Sascha Hauer           2022-11-01  1179  
d657ea28d55037 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2024-07-29  1180  	ret = imx_pcie_deassert_core_reset(imx_pcie);
ae6b9a65af4801 drivers/pci/controller/dwc/pci-imx6.c Sascha Hauer           2022-11-01  1181  	if (ret < 0) {
ae6b9a65af4801 drivers/pci/controller/dwc/pci-imx6.c Sascha Hauer           2022-11-01  1182  		dev_err(dev, "pcie deassert core reset failed: %d\n", ret);
ae6b9a65af4801 drivers/pci/controller/dwc/pci-imx6.c Sascha Hauer           2022-11-01  1183  		goto err_phy_off;
ae6b9a65af4801 drivers/pci/controller/dwc/pci-imx6.c Sascha Hauer           2022-11-01  1184  	}
ae6b9a65af4801 drivers/pci/controller/dwc/pci-imx6.c Sascha Hauer           2022-11-01  1185  
d657ea28d55037 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2024-07-29  1186  	imx_setup_phy_mpll(imx_pcie);
4a301766f5263d drivers/pci/dwc/pci-imx6.c            Bjorn Andersson        2017-07-15  1187  
4a301766f5263d drivers/pci/dwc/pci-imx6.c            Bjorn Andersson        2017-07-15  1188  	return 0;
f0691e326b270d drivers/pci/controller/dwc/pci-imx6.c Richard Zhu            2022-07-14  1189  
cf236e0c0d59b3 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu            2022-07-14  1190  err_phy_off:
d657ea28d55037 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2024-07-29  1191  	phy_power_off(imx_pcie->phy);
5b04d44d5c74e4 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2024-07-29  1192  err_phy_exit:
d657ea28d55037 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2024-07-29  1193  	phy_exit(imx_pcie->phy);
835a345b18b013 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu            2022-07-14  1194  err_clk_disable:
d657ea28d55037 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2024-07-29  1195  	imx_pcie_clk_disable(imx_pcie);
f0691e326b270d drivers/pci/controller/dwc/pci-imx6.c Richard Zhu            2022-07-14  1196  err_reg_disable:
d657ea28d55037 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2024-07-29  1197  	if (imx_pcie->vpcie)
d657ea28d55037 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2024-07-29  1198  		regulator_disable(imx_pcie->vpcie);
f0691e326b270d drivers/pci/controller/dwc/pci-imx6.c Richard Zhu            2022-07-14  1199  	return ret;
bb38919ec56e07 drivers/pci/host/pci-imx6.c           Sean Cross             2013-09-26  1200  }
bb38919ec56e07 drivers/pci/host/pci-imx6.c           Sean Cross             2013-09-26  1201  
d657ea28d55037 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2024-07-29  1202  static void imx_pcie_host_exit(struct dw_pcie_rp *pp)
835a345b18b013 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu            2022-07-14  1203  {
835a345b18b013 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu            2022-07-14  1204  	struct dw_pcie *pci = to_dw_pcie_from_pp(pp);
d657ea28d55037 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2024-07-29  1205  	struct imx_pcie *imx_pcie = to_imx_pcie(pci);
835a345b18b013 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu            2022-07-14  1206  
d657ea28d55037 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2024-07-29  1207  	if (imx_pcie->phy) {
d657ea28d55037 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2024-07-29  1208  		if (phy_power_off(imx_pcie->phy))
835a345b18b013 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu            2022-07-14  1209  			dev_err(pci->dev, "unable to power off PHY\n");
d657ea28d55037 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2024-07-29  1210  		phy_exit(imx_pcie->phy);
835a345b18b013 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu            2022-07-14  1211  	}
d657ea28d55037 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2024-07-29  1212  	imx_pcie_clk_disable(imx_pcie);
835a345b18b013 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu            2022-07-14  1213  
d657ea28d55037 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2024-07-29  1214  	if (imx_pcie->vpcie)
d657ea28d55037 drivers/pci/controller/dwc/pci-imx6.c Frank Li               2024-07-29  1215  		regulator_disable(imx_pcie->vpcie);
835a345b18b013 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu            2022-07-14  1216  }
835a345b18b013 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu            2022-07-14  1217  
c2699778e6be47 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu            2024-07-29  1218  static u64 imx_pcie_cpu_addr_fixup(struct dw_pcie *pcie, u64 cpu_addr)
c2699778e6be47 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu            2024-07-29  1219  {
c2699778e6be47 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu            2024-07-29  1220  	struct imx_pcie *imx_pcie = to_imx_pcie(pcie);
c2699778e6be47 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu            2024-07-29  1221  	struct dw_pcie_rp *pp = &pcie->pp;
c2699778e6be47 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu            2024-07-29  1222  	struct resource_entry *entry;
c2699778e6be47 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu            2024-07-29  1223  
c2699778e6be47 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu            2024-07-29 @1224  	if (!(imx_pcie->drvdata->flags & IMX_PCIE_FLAG_CPU_ADDR_FIXUP))
c2699778e6be47 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu            2024-07-29  1225  		return cpu_addr;
c2699778e6be47 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu            2024-07-29  1226  
c2699778e6be47 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu            2024-07-29  1227  	entry = resource_list_first_type(&pp->bridge->windows, IORESOURCE_MEM);
c2699778e6be47 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu            2024-07-29  1228  	if (!entry)
c2699778e6be47 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu            2024-07-29  1229  		return cpu_addr;
c2699778e6be47 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu            2024-07-29  1230  
c2699778e6be47 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu            2024-07-29  1231  	return cpu_addr - entry->offset;
c2699778e6be47 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu            2024-07-29  1232  }
c2699778e6be47 drivers/pci/controller/dwc/pci-imx6.c Richard Zhu            2024-07-29  1233  

:::::: The code at line 1224 was first introduced by commit
:::::: c2699778e6be4757ee0b16449ab8777c6b46e6d0 PCI: imx6: Add i.MX8Q PCIe Root Complex (RC) support

:::::: TO: Richard Zhu <hongxing.zhu@xxxxxxx>
:::::: CC: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux