Skip to content

Commit b881532

Browse files
committed
PCI: imx6: Clean up comments and whitespace
For readability, fix typos and comments that needlessly exceed 80 columns. Link: https://lore.kernel.org/r/20250118210727.795559-1-helgaas@kernel.org Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Frank Li <Frank.Li@nxp.com>
1 parent 6dd24b0 commit b881532

File tree

1 file changed

+22
-19
lines changed

1 file changed

+22
-19
lines changed

drivers/pci/controller/dwc/pci-imx6.c

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -236,11 +236,11 @@ static void imx_pcie_configure_type(struct imx_pcie *imx_pcie)
236236

237237
id = imx_pcie->controller_id;
238238

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 */
240240
if (!drvdata->mode_mask[0])
241241
return;
242242

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 */
244244
if (!drvdata->mode_mask[id])
245245
id = 0;
246246

@@ -377,14 +377,15 @@ static int pcie_phy_write(struct imx_pcie *imx_pcie, int addr, u16 data)
377377

378378
static int imx8mq_pcie_init_phy(struct imx_pcie *imx_pcie)
379379
{
380-
/* TODO: Currently this code assumes external oscillator is being used */
380+
/* TODO: This code assumes external oscillator is being used */
381381
regmap_update_bits(imx_pcie->iomuxc_gpr,
382382
imx_pcie_grp_offset(imx_pcie),
383383
IMX8MQ_GPR_PCIE_REF_USE_PAD,
384384
IMX8MQ_GPR_PCIE_REF_USE_PAD);
385385
/*
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.
388389
*/
389390
if (imx_pcie->vph && regulator_get_voltage(imx_pcie->vph) > 3000000)
390391
regmap_update_bits(imx_pcie->iomuxc_gpr,
@@ -571,7 +572,7 @@ static int imx_pcie_attach_pd(struct device *dev)
571572
DL_FLAG_PM_RUNTIME |
572573
DL_FLAG_RPM_ACTIVE);
573574
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");
575576
return -EINVAL;
576577
}
577578

@@ -584,7 +585,7 @@ static int imx_pcie_attach_pd(struct device *dev)
584585
DL_FLAG_PM_RUNTIME |
585586
DL_FLAG_RPM_ACTIVE);
586587
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");
588589
return -EINVAL;
589590
}
590591

@@ -605,10 +606,10 @@ static int imx6q_pcie_enable_ref_clk(struct imx_pcie *imx_pcie, bool enable)
605606
/* power up core phy and enable ref clock */
606607
regmap_clear_bits(imx_pcie->iomuxc_gpr, IOMUXC_GPR1, IMX6Q_GPR1_PCIE_TEST_PD);
607608
/*
608-
* the async reset input need ref clock to sync internally,
609+
* The async reset input need ref clock to sync internally,
609610
* when the ref clock comes after reset, internal synced
610611
* reset time is too short, cannot meet the requirement.
611-
* add one ~10us delay here.
612+
* Add a ~10us delay here.
612613
*/
613614
usleep_range(10, 100);
614615
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)
880881

881882
if (imx_pcie->drvdata->flags &
882883
IMX_PCIE_FLAG_IMX_SPEED_CHANGE) {
884+
883885
/*
884886
* On i.MX7, DIRECT_SPEED_CHANGE behaves differently
885887
* from i.MX6 family when no link speed transition
@@ -888,7 +890,6 @@ static int imx_pcie_start_link(struct dw_pcie *pci)
888890
* which will cause the following code to report false
889891
* failure.
890892
*/
891-
892893
ret = imx_pcie_wait_for_speed_change(imx_pcie);
893894
if (ret) {
894895
dev_err(dev, "Failed to bring link up!\n");
@@ -1091,15 +1092,16 @@ static const struct pci_epc_features imx8q_pcie_epc_features = {
10911092
};
10921093

10931094
/*
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
11031105
*/
11041106
static const struct pci_epc_features imx95_pcie_epc_features = {
11051107
.msi_capable = true,
@@ -1260,6 +1262,7 @@ static int imx_pcie_resume_noirq(struct device *dev)
12601262
ret = imx_pcie_deassert_core_reset(imx_pcie);
12611263
if (ret)
12621264
return ret;
1265+
12631266
/*
12641267
* Using PCIE_TEST_PD seems to disable MSI and powers down the
12651268
* root complex. This is why we have to setup the rc again and

0 commit comments

Comments
 (0)