Commit 0044966c authored by Frank Li's avatar Frank Li Committed by Lorenzo Pieralisi

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/20240220161924.3871774-13-Frank.Li@nxp.comSigned-off-by: default avatarFrank Li <Frank.Li@nxp.com>
Signed-off-by: default avatarLorenzo Pieralisi <lpieralisi@kernel.org>
Reviewed-by: default avatarManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
parent 1bd0d43d
...@@ -99,6 +99,7 @@ struct imx6_pcie_drvdata { ...@@ -99,6 +99,7 @@ struct imx6_pcie_drvdata {
const u32 ltssm_mask; const u32 ltssm_mask;
const u32 mode_off[IMX6_PCIE_MAX_INSTANCES]; const u32 mode_off[IMX6_PCIE_MAX_INSTANCES];
const u32 mode_mask[IMX6_PCIE_MAX_INSTANCES]; const u32 mode_mask[IMX6_PCIE_MAX_INSTANCES];
const struct pci_epc_features *epc_features;
int (*init_phy)(struct imx6_pcie *pcie); int (*init_phy)(struct imx6_pcie *pcie);
}; };
...@@ -1046,7 +1047,10 @@ static const struct pci_epc_features imx8m_pcie_epc_features = { ...@@ -1046,7 +1047,10 @@ static const struct pci_epc_features imx8m_pcie_epc_features = {
static const struct pci_epc_features* static const struct pci_epc_features*
imx6_pcie_ep_get_features(struct dw_pcie_ep *ep) imx6_pcie_ep_get_features(struct dw_pcie_ep *ep)
{ {
return &imx8m_pcie_epc_features; struct dw_pcie *pci = to_dw_pcie_from_ep(ep);
struct imx6_pcie *imx6_pcie = to_imx6_pcie(pci);
return imx6_pcie->drvdata->epc_features;
} }
static const struct dw_pcie_ep_ops pcie_ep_ops = { static const struct dw_pcie_ep_ops pcie_ep_ops = {
...@@ -1527,6 +1531,7 @@ static const struct imx6_pcie_drvdata drvdata[] = { ...@@ -1527,6 +1531,7 @@ static const struct imx6_pcie_drvdata drvdata[] = {
.mode_mask[0] = IMX6Q_GPR12_DEVICE_TYPE, .mode_mask[0] = IMX6Q_GPR12_DEVICE_TYPE,
.mode_off[1] = IOMUXC_GPR12, .mode_off[1] = IOMUXC_GPR12,
.mode_mask[1] = IMX8MQ_GPR12_PCIE2_CTRL_DEVICE_TYPE, .mode_mask[1] = IMX8MQ_GPR12_PCIE2_CTRL_DEVICE_TYPE,
.epc_features = &imx8m_pcie_epc_features,
.init_phy = imx8mq_pcie_init_phy, .init_phy = imx8mq_pcie_init_phy,
}, },
[IMX8MM_EP] = { [IMX8MM_EP] = {
...@@ -1538,6 +1543,7 @@ static const struct imx6_pcie_drvdata drvdata[] = { ...@@ -1538,6 +1543,7 @@ static const struct imx6_pcie_drvdata drvdata[] = {
.clks_cnt = ARRAY_SIZE(imx8mm_clks), .clks_cnt = ARRAY_SIZE(imx8mm_clks),
.mode_off[0] = IOMUXC_GPR12, .mode_off[0] = IOMUXC_GPR12,
.mode_mask[0] = IMX6Q_GPR12_DEVICE_TYPE, .mode_mask[0] = IMX6Q_GPR12_DEVICE_TYPE,
.epc_features = &imx8m_pcie_epc_features,
}, },
[IMX8MP_EP] = { [IMX8MP_EP] = {
.variant = IMX8MP_EP, .variant = IMX8MP_EP,
...@@ -1548,6 +1554,7 @@ static const struct imx6_pcie_drvdata drvdata[] = { ...@@ -1548,6 +1554,7 @@ static const struct imx6_pcie_drvdata drvdata[] = {
.clks_cnt = ARRAY_SIZE(imx8mm_clks), .clks_cnt = ARRAY_SIZE(imx8mm_clks),
.mode_off[0] = IOMUXC_GPR12, .mode_off[0] = IOMUXC_GPR12,
.mode_mask[0] = IMX6Q_GPR12_DEVICE_TYPE, .mode_mask[0] = IMX6Q_GPR12_DEVICE_TYPE,
.epc_features = &imx8m_pcie_epc_features,
}, },
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment