PCI: qcom: Add basic interconnect support
Subsystems (5)
v2 cover PCI: qcom: Add basic interconnect support
On Qualcomm platforms like SC8280XP and SA8540P interconnect bandwidth must be requested before enabling interconnect clocks.
Add basic support for managing an optional "pcie-mem" interconnect path by setting a low constraint before enabling clocks and updating it after the link is up.
This is specifically needed to prevent a crash on SC8280XP/SA8540P when the interconnect constraints are enforced during boot.
As support for these platforms was added in 6.1-rc1 it would be nice to have this merged as a fix for 6.1, but deferring for 6.2 works as well.
Johan
Changes in v2
- update the bindings so that the interconnect-names constraints apply to all platforms (Krzysztof)
Johan Hovold (2):
dt-bindings: PCI: qcom: Add SC8280XP/SA8540P interconnects
PCI: qcom: Add basic interconnect support
.../devicetree/bindings/pci/qcom,pcie.yaml | 20 +++++ drivers/pci/controller/dwc/pcie-qcom.c | 76 +++++++++++++++++++ 2 files changed, 96 insertions(+)
Signature · 1 line
2.37.3
PATCH v2 1/2 dt-bindings: PCI: qcom: Add SC8280XP/SA8540P interconnects
Add the missing SC8280XP/SA8540P "pcie-mem" and "cpu-pcie" interconnect paths to the bindings.
--- .../devicetree/bindings/pci/qcom,pcie.yaml | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+)
Documentation/devicetree/bindings/pci/qcom,pcie.yaml +20 -0
@@ -62,6 +62,14 @@ properties: minItems: 3 maxItems: 13 + interconnects: + maxItems: 2 + + interconnect-names: + items: + - const: pcie-mem + - const: cpu-pcie + resets: minItems: 1 maxItems: 12
@@ -631,6 +639,18 @@ allOf: items: - const: pci # PCIe core reset + - if: + properties: + compatible: + contains: + enum: + - qcom,pcie-sa8540p + - qcom,pcie-sc8280xp + then: + required: + - interconnects + - interconnect-names + - if: not: properties:
Signature · 1 line
2.37.3
Re: [PATCH v2 1/2] dt-bindings: PCI: qcom: Add SC8280XP/SA8540P interconnects
Quoted 10 lines · Johan Hovold
Add the missing SC8280XP/SA8540P "pcie-mem" and "cpu-pcie" interconnect paths to the bindings.
Fixes 76d777ae045e ("dt-bindings: PCI: qcom: Add SC8280XP to binding")Fixes 76c4207f4085 ("dt-bindings: PCI: qcom: Add SA8540P to binding")Signed-off-by Johan Hovold <[email protected]>--- .../devicetree/bindings/pci/qcom,pcie.yaml | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+)
Re: [PATCH v2 1/2] dt-bindings: PCI: qcom: Add SC8280XP/SA8540P interconnects
In reply to Johan HovoldQuoted 6 lines · Johan Hovold
Add the missing SC8280XP/SA8540P "pcie-mem" and "cpu-pcie" interconnect paths to the bindings.
Fixes 76d777ae045e ("dt-bindings: PCI: qcom: Add SC8280XP to binding")Fixes 76c4207f4085 ("dt-bindings: PCI: qcom: Add SA8540P to binding")Signed-off-by Johan Hovold <[email protected]>
Thanks,
Mani
Quoted 45 lines
--- .../devicetree/bindings/pci/qcom,pcie.yaml | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+)Documentation/devicetree/bindings/pci/qcom,pcie.yaml +20
-0@@ -62,6 +62,14 @@ properties: minItems: 3 maxItems: 13 + interconnects: + maxItems: 2 + + interconnect-names: + items: + - const: pcie-mem + - const: cpu-pcie + resets: minItems: 1 maxItems: 12@@ -631,6 +639,18 @@ allOf: items: - const: pci # PCIe core reset + - if: + properties: + compatible: + contains: + enum: + - qcom,pcie-sa8540p + - qcom,pcie-sc8280xp + then: + required: + - interconnects + - interconnect-names + - if: not: properties:Signature · 1 line
2.37.3
Signature · 1 line
மணிவண்ணன் சதாசிவம்
PATCH v2 2/2 PCI: qcom: Add basic interconnect support
In reply to Johan HovoldOn Qualcomm platforms like SC8280XP and SA8540P, interconnect bandwidth must be requested before enabling interconnect clocks.
Add basic support for managing an optional "pcie-mem" interconnect path by setting a low constraint before enabling clocks and updating it after the link is up.
Note that it is not possible for a controller driver to set anything but a maximum peak bandwidth as expected average bandwidth will vary with use case and actual use (and power policy?). This very much remains an unresolved problem with the interconnect framework.
Also note that no constraint is set for the SC8280XP/SA8540P "cpu-pcie" path for now as it is not clear what an appropriate constraint would be (and the system does not crash when left unspecified).
--- drivers/pci/controller/dwc/pcie-qcom.c | 76 ++++++++++++++++++++++++++ 1 file changed, 76 insertions(+)
drivers/pci/controller/dwc/pcie-qcom.c +76 -0
@@ -12,6 +12,7 @@#include <linux/crc8.h> #include <linux/delay.h> #include <linux/gpio/consumer.h> +#include <linux/interconnect.h> #include <linux/interrupt.h> #include <linux/io.h> #include <linux/iopoll.h>
@@ -224,6 +225,7 @@ struct qcom_pcie {union qcom_pcie_resources res;struct phy *phy;struct gpio_desc *reset; +struct icc_path *icc_mem;const struct qcom_pcie_cfg *cfg; };
@@ -1644,6 +1646,74 @@ static const struct dw_pcie_ops dw_pcie_ops = { .start_link = qcom_pcie_start_link, }; +static int qcom_pcie_icc_init (struct qcom_pcie *pcie) +{ +struct dw_pcie *pci = pcie->pci; +int ret; + + pcie->icc_mem =devm_of_icc_get (pci->dev,"pcie-mem" ); +if (IS_ERR (pcie->icc_mem)) { + ret =PTR_ERR (pcie->icc_mem); +return ret; + } + +/* +* Some Qualcomm platforms require interconnect bandwidth constraints +* to be set before enabling interconnect clocks. +* +* Set an initial peak bandwidth corresponding to single-lane Gen 1 +* for the pcie-mem path. +*/ + ret =icc_set_bw (pcie->icc_mem,0 ,MBps_to_icc (250 )); +if (ret) { +dev_err (pci->dev,"failed to set interconnect bandwidth: %d\n" , + ret); +return ret; + } + +return 0 ; +} + +static void qcom_pcie_icc_update (struct qcom_pcie *pcie) +{ +struct dw_pcie *pci = pcie->pci; +u32 offset, status, bw; +int speed, width; +int ret; + +if (!pcie->icc_mem) +return ; + + offset =dw_pcie_find_capability (pci,PCI_CAP_ID_EXP ); + status =readw (pci->dbi_base + offset +PCI_EXP_LNKSTA ); + +/* Only update constraints if link is up. */ +if (!(status &PCI_EXP_LNKSTA_DLLLA )) +return ; + + speed =FIELD_GET (PCI_EXP_LNKSTA_CLS , status); + width =FIELD_GET (PCI_EXP_LNKSTA_NLW , status); + +switch (speed) { +case 1 : + bw =MBps_to_icc (250 ); +break ; +case 2 : + bw =MBps_to_icc (500 ); +break ; +default : +case 3 : + bw =MBps_to_icc (985 ); +break ; + } + + ret =icc_set_bw (pcie->icc_mem,0 , width * bw); +if (ret) { +dev_err (pci->dev,"failed to set interconnect bandwidth: %d\n" , + ret); + } +} +static int qcom_pcie_probe (struct platform_device *pdev) {struct device *dev = &pdev->dev;
@@ -1704,6 +1774,10 @@ static int qcom_pcie_probe(struct platform_device *pdev) goto err_pm_runtime_put; } + ret =qcom_pcie_icc_init (pcie); +if (ret) + goto err_pm_runtime_put; + ret = pcie->cfg->ops->get_resources (pcie);if (ret) goto err_pm_runtime_put;
@@ -1722,6 +1796,8 @@ static int qcom_pcie_probe(struct platform_device *pdev) goto err_phy_exit; } +qcom_pcie_icc_update (pcie); +return 0 ; err_phy_exit:
Signature · 1 line
2.37.3
Thanks for the patches, Johan!
Quoted 12 lines · Johan Hovold
On Qualcomm platforms like SC8280XP and SA8540P, interconnect bandwidth must be requested before enabling interconnect clocks.
Add basic support for managing an optional "pcie-mem" interconnect path by setting a low constraint before enabling clocks and updating it after the link is up.
Note that it is not possible for a controller driver to set anything but a maximum peak bandwidth as expected average bandwidth will vary with use case and actual use (and power policy?). This very much remains an unresolved problem with the interconnect framework.
Quoted 7 lines
Also note that no constraint is set for the SC8280XP/SA8540P "cpu-pcie" path for now as it is not clear what an appropriate constraint would be (and the system does not crash when left unspecified).
Fixes 70574511f3fc ("PCI: qcom: Add support for SC8280XP")Reviewed-by Brian Masney <[email protected]>Signed-off-by Johan Hovold <[email protected]>
Also CC-ing Stan's new e-mail address.
Thanks,
Georgi
Quoted 119 lines
--- drivers/pci/controller/dwc/pcie-qcom.c | 76 ++++++++++++++++++++++++++ 1 file changed, 76 insertions(+)drivers/pci/controller/dwc/pcie-qcom.c +76
-0@@ -12,6 +12,7 @@#include <linux/crc8.h> #include <linux/delay.h> #include <linux/gpio/consumer.h> +#include <linux/interconnect.h> #include <linux/interrupt.h> #include <linux/io.h> #include <linux/iopoll.h> @@ -224,6 +225,7 @@ struct qcom_pcie {union qcom_pcie_resources res;struct phy *phy;struct gpio_desc *reset; +struct icc_path *icc_mem;const struct qcom_pcie_cfg *cfg; };@@ -1644,6 +1646,74 @@ static const struct dw_pcie_ops dw_pcie_ops = { .start_link = qcom_pcie_start_link, }; +static int qcom_pcie_icc_init (struct qcom_pcie *pcie) +{ +struct dw_pcie *pci = pcie->pci; +int ret; + + pcie->icc_mem =devm_of_icc_get (pci->dev,"pcie-mem" ); +if (IS_ERR (pcie->icc_mem)) { + ret =PTR_ERR (pcie->icc_mem); +return ret; + } + +/* +* Some Qualcomm platforms require interconnect bandwidth constraints +* to be set before enabling interconnect clocks. +* +* Set an initial peak bandwidth corresponding to single-lane Gen 1 +* for the pcie-mem path. +*/ + ret =icc_set_bw (pcie->icc_mem,0 ,MBps_to_icc (250 )); +if (ret) { +dev_err (pci->dev,"failed to set interconnect bandwidth: %d\n" , + ret); +return ret; + } + +return 0 ; +} + +static void qcom_pcie_icc_update (struct qcom_pcie *pcie) +{ +struct dw_pcie *pci = pcie->pci; +u32 offset, status, bw; +int speed, width; +int ret; + +if (!pcie->icc_mem) +return ; + + offset =dw_pcie_find_capability (pci,PCI_CAP_ID_EXP ); + status =readw (pci->dbi_base + offset +PCI_EXP_LNKSTA ); + +/* Only update constraints if link is up. */ +if (!(status &PCI_EXP_LNKSTA_DLLLA )) +return ; + + speed =FIELD_GET (PCI_EXP_LNKSTA_CLS , status); + width =FIELD_GET (PCI_EXP_LNKSTA_NLW , status); + +switch (speed) { +case 1 : + bw =MBps_to_icc (250 ); +break ; +case 2 : + bw =MBps_to_icc (500 ); +break ; +default : +case 3 : + bw =MBps_to_icc (985 ); +break ; + } + + ret =icc_set_bw (pcie->icc_mem,0 , width * bw); +if (ret) { +dev_err (pci->dev,"failed to set interconnect bandwidth: %d\n" , + ret); + } +} +static int qcom_pcie_probe (struct platform_device *pdev) {struct device *dev = &pdev->dev;@@ -1704,6 +1774,10 @@ static int qcom_pcie_probe(struct platform_device *pdev) goto err_pm_runtime_put; } + ret =qcom_pcie_icc_init (pcie); +if (ret) + goto err_pm_runtime_put; + ret = pcie->cfg->ops->get_resources (pcie);if (ret) goto err_pm_runtime_put;@@ -1722,6 +1796,8 @@ static int qcom_pcie_probe(struct platform_device *pdev) goto err_phy_exit; } +qcom_pcie_icc_update (pcie); +return 0 ; err_phy_exit:
Manivannan Sadhasivam
maintainerQuoted 7 lines · Johan Hovold
On Qualcomm platforms like SC8280XP and SA8540P, interconnect bandwidth must be requested before enabling interconnect clocks.
Add basic support for managing an optional "pcie-mem" interconnect path by setting a low constraint before enabling clocks and updating it after the link is up.
Quoted 9 lines
Note that it is not possible for a controller driver to set anything but a maximum peak bandwidth as expected average bandwidth will vary with use case and actual use (and power policy?). This very much remains an unresolved problem with the interconnect framework.
Also note that no constraint is set for the SC8280XP/SA8540P "cpu-pcie" path for now as it is not clear what an appropriate constraint would be (and the system does not crash when left unspecified).
I initially thought we should move this to dwc core but I'm not sure if the interconnect path is going to be the same for all platforms. So keeping it within Qcom driver is good for now.
Quoted 30 lines
Fixes 70574511f3fc ("PCI: qcom: Add support for SC8280XP")Reviewed-by Brian Masney <[email protected]>Signed-off-by Johan Hovold <[email protected]>--- drivers/pci/controller/dwc/pcie-qcom.c | 76 ++++++++++++++++++++++++++ 1 file changed, 76 insertions(+)drivers/pci/controller/dwc/pcie-qcom.c +2
-0@@ -12,6 +12,7 @@#include <linux/crc8.h> #include <linux/delay.h> #include <linux/gpio/consumer.h> +#include <linux/interconnect.h> #include <linux/interrupt.h> #include <linux/io.h> #include <linux/iopoll.h> @@ -224,6 +225,7 @@ struct qcom_pcie {union qcom_pcie_resources res;struct phy *phy;struct gpio_desc *reset; +struct icc_path *icc_mem;const struct qcom_pcie_cfg *cfg; };@@ -1644,6 +1646,74 @@ static const struct dw_pcie_ops dw_pcie_ops = { .start_link = qcom_pcie_start_link, };
drivers/pci/controller/dwc/pcie-qcom.c static const struct dw_pcie_ops dw_pcie_ops = { · line 1657
Quoted 10 lines
drivers/pci/controller/dwc/pcie-qcom.c +9
-0+static int qcom_pcie_icc_init (struct qcom_pcie *pcie) +{ +struct dw_pcie *pci = pcie->pci; +int ret; + + pcie->icc_mem =devm_of_icc_get (pci->dev,"pcie-mem" ); +if (IS_ERR (pcie->icc_mem)) { + ret =PTR_ERR (pcie->icc_mem); +return ret;
return PTR_ERR(pcie->icc_mem);
drivers/pci/controller/dwc/pcie-qcom.c static const struct dw_pcie_ops dw_pcie_ops = { · line 1670
Quoted 13 lines
drivers/pci/controller/dwc/pcie-qcom.c +13
-0+ } + +/* +* Some Qualcomm platforms require interconnect bandwidth constraints +* to be set before enabling interconnect clocks. +* +* Set an initial peak bandwidth corresponding to single-lane Gen 1 +* for the pcie-mem path. +*/ + ret =icc_set_bw (pcie->icc_mem,0 ,MBps_to_icc (250 )); +if (ret) { +dev_err (pci->dev,"failed to set interconnect bandwidth: %d\n" , + ret);
Move "ret);" to prior line. No need to keep up within 80 columns.
Quoted 12 lines
drivers/pci/controller/dwc/pcie-qcom.c +12
-0+return ret; + } + +return 0 ; +} + +static void qcom_pcie_icc_update (struct qcom_pcie *pcie) +{ +struct dw_pcie *pci = pcie->pci; +u32 offset, status, bw; +int speed, width; +int ret;
drivers/pci/controller/dwc/pcie-qcom.c static const struct dw_pcie_ops dw_pcie_ops = { · line 1692
Quoted 10 lines
drivers/pci/controller/dwc/pcie-qcom.c +10
-0+ +if (!pcie->icc_mem) +return ; + + offset =dw_pcie_find_capability (pci,PCI_CAP_ID_EXP ); + status =readw (pci->dbi_base + offset +PCI_EXP_LNKSTA ); + +/* Only update constraints if link is up. */ +if (!(status &PCI_EXP_LNKSTA_DLLLA )) +return ;
What if the link comes back later? I'd suggest to call this function from qcom_pcie_link_up(), whenever link is up.
drivers/pci/controller/dwc/pcie-qcom.c static const struct dw_pcie_ops dw_pcie_ops = { · line 1705
Quoted 13 lines
drivers/pci/controller/dwc/pcie-qcom.c +13
-0+ + speed =FIELD_GET (PCI_EXP_LNKSTA_CLS , status); + width =FIELD_GET (PCI_EXP_LNKSTA_NLW , status); + +switch (speed) { +case 1 : + bw =MBps_to_icc (250 ); +break ; +case 2 : + bw =MBps_to_icc (500 ); +break ; +default : +case 3 :
Why do you need explicit "case 3" and not just default case?
drivers/pci/controller/dwc/pcie-qcom.c static const struct dw_pcie_ops dw_pcie_ops = { · line 1713
Quoted 8 lines
drivers/pci/controller/dwc/pcie-qcom.c +8
-0+ bw =MBps_to_icc (985 ); +break ; + } + + ret =icc_set_bw (pcie->icc_mem,0 , width * bw); +if (ret) { +dev_err (pci->dev,"failed to set interconnect bandwidth: %d\n" , + ret);
Move "ret);" to prior line and save braces.
Thanks,
Mani
Quoted 29 lines
drivers/pci/controller/dwc/pcie-qcom.c +9
-0+ } +} +static int qcom_pcie_probe (struct platform_device *pdev) {struct device *dev = &pdev->dev;@@ -1704,6 +1774,10 @@ static int qcom_pcie_probe(struct platform_device *pdev) goto err_pm_runtime_put; } + ret =qcom_pcie_icc_init (pcie); +if (ret) + goto err_pm_runtime_put; + ret = pcie->cfg->ops->get_resources (pcie);if (ret) goto err_pm_runtime_put;@@ -1722,6 +1796,8 @@ static int qcom_pcie_probe(struct platform_device *pdev) goto err_phy_exit; } +qcom_pcie_icc_update (pcie); +return 0 ; err_phy_exit:Signature · 1 line
2.37.3
Signature · 1 line
மணிவண்ணன் சதாசிவம்
Quoted 17 lines · Manivannan Sadhasivam
Quoted 15 lines · Johan Hovold
On Qualcomm platforms like SC8280XP and SA8540P, interconnect bandwidth must be requested before enabling interconnect clocks.
Add basic support for managing an optional "pcie-mem" interconnect path by setting a low constraint before enabling clocks and updating it after the link is up.
Note that it is not possible for a controller driver to set anything but a maximum peak bandwidth as expected average bandwidth will vary with use case and actual use (and power policy?). This very much remains an unresolved problem with the interconnect framework.
Also note that no constraint is set for the SC8280XP/SA8540P "cpu-pcie" path for now as it is not clear what an appropriate constraint would be (and the system does not crash when left unspecified).
Quoted 11 lines
drivers/pci/controller/dwc/pcie-qcom.c static const struct dw_pcie_ops dw_pcie_ops = { · line 1657
Quoted 9 lines
drivers/pci/controller/dwc/pcie-qcom.c +9
-0+static int qcom_pcie_icc_init (struct qcom_pcie *pcie) +{ +struct dw_pcie *pci = pcie->pci; +int ret; + + pcie->icc_mem =devm_of_icc_get (pci->dev,"pcie-mem" ); +if (IS_ERR (pcie->icc_mem)) { + ret =PTR_ERR (pcie->icc_mem); +return ret;return
PTR_ERR(pcie->icc_mem);
Sure.
Quoted 7 lines
Quoted 7 lines
drivers/pci/controller/dwc/pcie-qcom.c +7
-0+ } + +/* +* Some Qualcomm platforms require interconnect bandwidth constraints +* to be set before enabling interconnect clocks. +* +* Set an initial peak bandwidth corresponding to single-lane Gen 1
Quoted 8 lines
drivers/pci/controller/dwc/pcie-qcom.c static const struct dw_pcie_ops dw_pcie_ops = { · line 1670
Quoted 6 lines
drivers/pci/controller/dwc/pcie-qcom.c +6
-0+* for the pcie-mem path. +*/ + ret =icc_set_bw (pcie->icc_mem,0 ,MBps_to_icc (250 )); +if (ret) { +dev_err (pci->dev,"failed to set interconnect bandwidth: %d\n" , + ret);Move "ret);" to prior line. No need to keep up within 80 columns.
80 chars is still a soft limit and in this case there's no real gain in terms of readability from breaking it.
But sure, I can remove the line break.
Quoted 17 lines
Quoted 17 lines
drivers/pci/controller/dwc/pcie-qcom.c +17
-0+return ret; + } + +return 0 ; +} + +static void qcom_pcie_icc_update (struct qcom_pcie *pcie) +{ +struct dw_pcie *pci = pcie->pci; +u32 offset, status, bw; +int speed, width; +int ret; + +if (!pcie->icc_mem) +return ; + + offset =dw_pcie_find_capability (pci,PCI_CAP_ID_EXP );
Quoted 8 lines
drivers/pci/controller/dwc/pcie-qcom.c static const struct dw_pcie_ops dw_pcie_ops = { · line 1692
Quoted 5 lines
drivers/pci/controller/dwc/pcie-qcom.c +5
-0+ status =readw (pci->dbi_base + offset +PCI_EXP_LNKSTA ); + +/* Only update constraints if link is up. */ +if (!(status &PCI_EXP_LNKSTA_DLLLA )) +return ;What if the link comes back later? I'd suggest to call this function from
qcom_pcie_link_up(), whenever link is up.
I actually tried that initially but realised it doesn't work.
First, the link-up callback can be called in atomic context which prevents using icc_set_bw() directly (this can be worked around of course).
Second, the link-up callback isn't even called if the link comes up later.
If anyone needs this to deal with FPGA-type use cases when the link comes up later, then dwc3 core would need to be extended first.
Quoted 7 lines
Quoted 7 lines
drivers/pci/controller/dwc/pcie-qcom.c +7
-0+ + speed =FIELD_GET (PCI_EXP_LNKSTA_CLS , status); + width =FIELD_GET (PCI_EXP_LNKSTA_NLW , status); + +switch (speed) { +case 1 : + bw =MBps_to_icc (250 );
Quoted 8 lines
drivers/pci/controller/dwc/pcie-qcom.c static const struct dw_pcie_ops dw_pcie_ops = { · line 1705
Quoted 6 lines
drivers/pci/controller/dwc/pcie-qcom.c +6
-0+break ; +case 2 : + bw =MBps_to_icc (500 ); +break ; +default : +case 3 :Why do you need explicit "case 3" and not just default case?
Because it's the gen3 bandwidth which is set in case the controller ever reports anything else but the supported gen1, gen2 or gen3 speed here.
I first had a WARN_ON_ONCE() here as an aid to anyone ever extending the driver with support for gen4, but then removed it in case there are any misbehaving controllers out there. I guess I can add it back and see if anyone complains.
Quoted 8 lines
drivers/pci/controller/dwc/pcie-qcom.c static const struct dw_pcie_ops dw_pcie_ops = { · line 1713
Quoted 8 lines
drivers/pci/controller/dwc/pcie-qcom.c +8
-0+ bw =MBps_to_icc (985 ); +break ; + } + + ret =icc_set_bw (pcie->icc_mem,0 , width * bw); +if (ret) { +dev_err (pci->dev,"failed to set interconnect bandwidth: %d\n" , + ret);
Johan
Quoted 34 lines · Johan Hovold
Quoted 17 lines · Manivannan Sadhasivam
Quoted 15 lines · Johan Hovold
On Qualcomm platforms like SC8280XP and SA8540P, interconnect bandwidth must be requested before enabling interconnect clocks.
Add basic support for managing an optional "pcie-mem" interconnect path by setting a low constraint before enabling clocks and updating it after the link is up.
Note that it is not possible for a controller driver to set anything but a maximum peak bandwidth as expected average bandwidth will vary with use case and actual use (and power policy?). This very much remains an unresolved problem with the interconnect framework.
Also note that no constraint is set for the SC8280XP/SA8540P "cpu-pcie" path for now as it is not clear what an appropriate constraint would be (and the system does not crash when left unspecified).
Quoted 15 lines
drivers/pci/controller/dwc/pcie-qcom.c static const struct dw_pcie_ops dw_pcie_ops = { · line 1670
Quoted 13 lines
drivers/pci/controller/dwc/pcie-qcom.c +13
-0+ } + +/* +* Some Qualcomm platforms require interconnect bandwidth constraints +* to be set before enabling interconnect clocks. +* +* Set an initial peak bandwidth corresponding to single-lane Gen 1 +* for the pcie-mem path. +*/ + ret =icc_set_bw (pcie->icc_mem,0 ,MBps_to_icc (250 )); +if (ret) { +dev_err (pci->dev,"failed to set interconnect bandwidth: %d\n" , + ret);Move "ret);" to prior line. No need to keep up within 80 columns.
Quoted 4 lines
80 chars is still a soft limit and in this case there's no real gain in terms of readability from breaking it.
But sure, I can remove the line break.
After looking at the result, I changed my mind here and will stick to the 80 char limit.
Johan