Skip to content

Commit 0044966

Browse files
nxpfrankliLorenzo Pieralisi
authored andcommitted
PCI: imx6: Add epc_features in imx6_pcie_drvdata
The i.MX EP exhibits variations in epc_features among different EP configurations. This introduces the addition of epc_features in imx6_pcie_drvdata to accommodate these differences. It's important to note that there are no functional changes in this commit; instead, it lays the groundwork for supporting i.MX95 EP functions. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Frank Li <[email protected]> Signed-off-by: Lorenzo Pieralisi <[email protected]> Reviewed-by: Manivannan Sadhasivam <[email protected]>
1 parent 1bd0d43 commit 0044966

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ struct imx6_pcie_drvdata {
9999
const u32 ltssm_mask;
100100
const u32 mode_off[IMX6_PCIE_MAX_INSTANCES];
101101
const u32 mode_mask[IMX6_PCIE_MAX_INSTANCES];
102+
const struct pci_epc_features *epc_features;
102103
int (*init_phy)(struct imx6_pcie *pcie);
103104
};
104105

@@ -1046,7 +1047,10 @@ static const struct pci_epc_features imx8m_pcie_epc_features = {
10461047
static const struct pci_epc_features*
10471048
imx6_pcie_ep_get_features(struct dw_pcie_ep *ep)
10481049
{
1049-
return &imx8m_pcie_epc_features;
1050+
struct dw_pcie *pci = to_dw_pcie_from_ep(ep);
1051+
struct imx6_pcie *imx6_pcie = to_imx6_pcie(pci);
1052+
1053+
return imx6_pcie->drvdata->epc_features;
10501054
}
10511055

10521056
static const struct dw_pcie_ep_ops pcie_ep_ops = {
@@ -1527,6 +1531,7 @@ static const struct imx6_pcie_drvdata drvdata[] = {
15271531
.mode_mask[0] = IMX6Q_GPR12_DEVICE_TYPE,
15281532
.mode_off[1] = IOMUXC_GPR12,
15291533
.mode_mask[1] = IMX8MQ_GPR12_PCIE2_CTRL_DEVICE_TYPE,
1534+
.epc_features = &imx8m_pcie_epc_features,
15301535
.init_phy = imx8mq_pcie_init_phy,
15311536
},
15321537
[IMX8MM_EP] = {
@@ -1538,6 +1543,7 @@ static const struct imx6_pcie_drvdata drvdata[] = {
15381543
.clks_cnt = ARRAY_SIZE(imx8mm_clks),
15391544
.mode_off[0] = IOMUXC_GPR12,
15401545
.mode_mask[0] = IMX6Q_GPR12_DEVICE_TYPE,
1546+
.epc_features = &imx8m_pcie_epc_features,
15411547
},
15421548
[IMX8MP_EP] = {
15431549
.variant = IMX8MP_EP,
@@ -1548,6 +1554,7 @@ static const struct imx6_pcie_drvdata drvdata[] = {
15481554
.clks_cnt = ARRAY_SIZE(imx8mm_clks),
15491555
.mode_off[0] = IOMUXC_GPR12,
15501556
.mode_mask[0] = IMX6Q_GPR12_DEVICE_TYPE,
1557+
.epc_features = &imx8m_pcie_epc_features,
15511558
},
15521559
};
15531560

0 commit comments

Comments
 (0)