@@ -236,11 +236,11 @@ static void imx_pcie_configure_type(struct imx_pcie *imx_pcie)
236
236
237
237
id = imx_pcie -> controller_id ;
238
238
239
- /* If mode_mask is 0, then generic PHY driver is used to set the mode */
239
+ /* If mode_mask is 0, generic PHY driver is used to set the mode */
240
240
if (!drvdata -> mode_mask [0 ])
241
241
return ;
242
242
243
- /* If mode_mask[id] is zero, means each controller have its individual gpr */
243
+ /* If mode_mask[id] is 0, each controller has its individual GPR */
244
244
if (!drvdata -> mode_mask [id ])
245
245
id = 0 ;
246
246
@@ -377,14 +377,15 @@ static int pcie_phy_write(struct imx_pcie *imx_pcie, int addr, u16 data)
377
377
378
378
static int imx8mq_pcie_init_phy (struct imx_pcie * imx_pcie )
379
379
{
380
- /* TODO: Currently this code assumes external oscillator is being used */
380
+ /* TODO: This code assumes external oscillator is being used */
381
381
regmap_update_bits (imx_pcie -> iomuxc_gpr ,
382
382
imx_pcie_grp_offset (imx_pcie ),
383
383
IMX8MQ_GPR_PCIE_REF_USE_PAD ,
384
384
IMX8MQ_GPR_PCIE_REF_USE_PAD );
385
385
/*
386
- * Regarding the datasheet, the PCIE_VPH is suggested to be 1.8V. If the PCIE_VPH is
387
- * supplied by 3.3V, the VREG_BYPASS should be cleared to zero.
386
+ * Per the datasheet, the PCIE_VPH is suggested to be 1.8V. If the
387
+ * PCIE_VPH is supplied by 3.3V, the VREG_BYPASS should be cleared
388
+ * to zero.
388
389
*/
389
390
if (imx_pcie -> vph && regulator_get_voltage (imx_pcie -> vph ) > 3000000 )
390
391
regmap_update_bits (imx_pcie -> iomuxc_gpr ,
@@ -571,7 +572,7 @@ static int imx_pcie_attach_pd(struct device *dev)
571
572
DL_FLAG_PM_RUNTIME |
572
573
DL_FLAG_RPM_ACTIVE );
573
574
if (!link ) {
574
- dev_err (dev , "Failed to add device_link to pcie pd. \n" );
575
+ dev_err (dev , "Failed to add device_link to pcie pd\n" );
575
576
return - EINVAL ;
576
577
}
577
578
@@ -584,7 +585,7 @@ static int imx_pcie_attach_pd(struct device *dev)
584
585
DL_FLAG_PM_RUNTIME |
585
586
DL_FLAG_RPM_ACTIVE );
586
587
if (!link ) {
587
- dev_err (dev , "Failed to add device_link to pcie_phy pd. \n" );
588
+ dev_err (dev , "Failed to add device_link to pcie_phy pd\n" );
588
589
return - EINVAL ;
589
590
}
590
591
@@ -605,10 +606,10 @@ static int imx6q_pcie_enable_ref_clk(struct imx_pcie *imx_pcie, bool enable)
605
606
/* power up core phy and enable ref clock */
606
607
regmap_clear_bits (imx_pcie -> iomuxc_gpr , IOMUXC_GPR1 , IMX6Q_GPR1_PCIE_TEST_PD );
607
608
/*
608
- * the async reset input need ref clock to sync internally,
609
+ * The async reset input need ref clock to sync internally,
609
610
* when the ref clock comes after reset, internal synced
610
611
* reset time is too short, cannot meet the requirement.
611
- * add one ~10us delay here.
612
+ * Add a ~10us delay here.
612
613
*/
613
614
usleep_range (10 , 100 );
614
615
regmap_set_bits (imx_pcie -> iomuxc_gpr , IOMUXC_GPR1 , IMX6Q_GPR1_PCIE_REF_CLK_EN );
@@ -880,6 +881,7 @@ static int imx_pcie_start_link(struct dw_pcie *pci)
880
881
881
882
if (imx_pcie -> drvdata -> flags &
882
883
IMX_PCIE_FLAG_IMX_SPEED_CHANGE ) {
884
+
883
885
/*
884
886
* On i.MX7, DIRECT_SPEED_CHANGE behaves differently
885
887
* from i.MX6 family when no link speed transition
@@ -888,7 +890,6 @@ static int imx_pcie_start_link(struct dw_pcie *pci)
888
890
* which will cause the following code to report false
889
891
* failure.
890
892
*/
891
-
892
893
ret = imx_pcie_wait_for_speed_change (imx_pcie );
893
894
if (ret ) {
894
895
dev_err (dev , "Failed to bring link up!\n" );
@@ -1091,15 +1092,16 @@ static const struct pci_epc_features imx8q_pcie_epc_features = {
1091
1092
};
1092
1093
1093
1094
/*
1094
- * BAR# | Default BAR enable | Default BAR Type | Default BAR Size | BAR Sizing Scheme
1095
- * ================================================================================================
1096
- * BAR0 | Enable | 64-bit | 1 MB | Programmable Size
1097
- * BAR1 | Disable | 32-bit | 64 KB | Fixed Size
1098
- * BAR1 should be disabled if BAR0 is 64bit.
1099
- * BAR2 | Enable | 32-bit | 1 MB | Programmable Size
1100
- * BAR3 | Enable | 32-bit | 64 KB | Programmable Size
1101
- * BAR4 | Enable | 32-bit | 1M | Programmable Size
1102
- * BAR5 | Enable | 32-bit | 64 KB | Programmable Size
1095
+ * | Default | Default | Default | BAR Sizing
1096
+ * BAR# | Enable? | Type | Size | Scheme
1097
+ * =======================================================
1098
+ * BAR0 | Enable | 64-bit | 1 MB | Programmable Size
1099
+ * BAR1 | Disable | 32-bit | 64 KB | Fixed Size
1100
+ * (BAR1 should be disabled if BAR0 is 64-bit)
1101
+ * BAR2 | Enable | 32-bit | 1 MB | Programmable Size
1102
+ * BAR3 | Enable | 32-bit | 64 KB | Programmable Size
1103
+ * BAR4 | Enable | 32-bit | 1 MB | Programmable Size
1104
+ * BAR5 | Enable | 32-bit | 64 KB | Programmable Size
1103
1105
*/
1104
1106
static const struct pci_epc_features imx95_pcie_epc_features = {
1105
1107
.msi_capable = true,
@@ -1260,6 +1262,7 @@ static int imx_pcie_resume_noirq(struct device *dev)
1260
1262
ret = imx_pcie_deassert_core_reset (imx_pcie );
1261
1263
if (ret )
1262
1264
return ret ;
1265
+
1263
1266
/*
1264
1267
* Using PCIE_TEST_PD seems to disable MSI and powers down the
1265
1268
* root complex. This is why we have to setup the rc again and
0 commit comments