aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-10-12 11:41:27 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-10-12 11:41:27 -0400
commitbab5c80b211035739997ebd361a679fa85b39465 (patch)
tree2961b46722cb65e2ae69251fc6ae260fd7f84f91
parentf014ffb025c159fd51d19af8af0022a991aaa4f8 (diff)
parent3f4258bbe0363b3d5330b93de0e86b7796ff1a74 (diff)
Merge tag 'armsoc-fixes-4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Arnd writes: "ARM: SoC fixes for 4.19 Two last minute bugfixes, both for NXP platforms: * The Layerscape 'qbman' infrastructure suffers from probe ordering bugs in some configurations, a two-patch series adds a hotfix for this. 4.20 will have a longer set of patches to rework it. * The old imx53-qsb board regressed in 4.19 after the addition of cpufreq support, adding a set of explicit operating points fixes this." * tag 'armsoc-fixes-4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: soc: fsl: qman_portals: defer probe after qman's probe soc: fsl: qbman: add APIs to retrieve the probing status ARM: dts: imx53-qsb: disable 1.2GHz OPP
-rw-r--r--arch/arm/boot/dts/imx53-qsb-common.dtsi11
-rw-r--r--drivers/soc/fsl/qbman/bman_ccsr.c11
-rw-r--r--drivers/soc/fsl/qbman/qman_ccsr.c11
-rw-r--r--drivers/soc/fsl/qbman/qman_portal.c8
-rw-r--r--include/soc/fsl/bman.h8
-rw-r--r--include/soc/fsl/qman.h8
6 files changed, 57 insertions, 0 deletions
diff --git a/arch/arm/boot/dts/imx53-qsb-common.dtsi b/arch/arm/boot/dts/imx53-qsb-common.dtsi
index 7423d462d1e4..50dde84b72ed 100644
--- a/arch/arm/boot/dts/imx53-qsb-common.dtsi
+++ b/arch/arm/boot/dts/imx53-qsb-common.dtsi
@@ -123,6 +123,17 @@
123 }; 123 };
124}; 124};
125 125
126&cpu0 {
127 /* CPU rated to 1GHz, not 1.2GHz as per the default settings */
128 operating-points = <
129 /* kHz uV */
130 166666 850000
131 400000 900000
132 800000 1050000
133 1000000 1200000
134 >;
135};
136
126&esdhc1 { 137&esdhc1 {
127 pinctrl-names = "default"; 138 pinctrl-names = "default";
128 pinctrl-0 = <&pinctrl_esdhc1>; 139 pinctrl-0 = <&pinctrl_esdhc1>;
diff --git a/drivers/soc/fsl/qbman/bman_ccsr.c b/drivers/soc/fsl/qbman/bman_ccsr.c
index 05c42235dd41..7c3cc968053c 100644
--- a/drivers/soc/fsl/qbman/bman_ccsr.c
+++ b/drivers/soc/fsl/qbman/bman_ccsr.c
@@ -120,6 +120,7 @@ static void bm_set_memory(u64 ba, u32 size)
120 */ 120 */
121static dma_addr_t fbpr_a; 121static dma_addr_t fbpr_a;
122static size_t fbpr_sz; 122static size_t fbpr_sz;
123static int __bman_probed;
123 124
124static int bman_fbpr(struct reserved_mem *rmem) 125static int bman_fbpr(struct reserved_mem *rmem)
125{ 126{
@@ -166,6 +167,12 @@ static irqreturn_t bman_isr(int irq, void *ptr)
166 return IRQ_HANDLED; 167 return IRQ_HANDLED;
167} 168}
168 169
170int bman_is_probed(void)
171{
172 return __bman_probed;
173}
174EXPORT_SYMBOL_GPL(bman_is_probed);
175
169static int fsl_bman_probe(struct platform_device *pdev) 176static int fsl_bman_probe(struct platform_device *pdev)
170{ 177{
171 int ret, err_irq; 178 int ret, err_irq;
@@ -175,6 +182,8 @@ static int fsl_bman_probe(struct platform_device *pdev)
175 u16 id, bm_pool_cnt; 182 u16 id, bm_pool_cnt;
176 u8 major, minor; 183 u8 major, minor;
177 184
185 __bman_probed = -1;
186
178 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 187 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
179 if (!res) { 188 if (!res) {
180 dev_err(dev, "Can't get %pOF property 'IORESOURCE_MEM'\n", 189 dev_err(dev, "Can't get %pOF property 'IORESOURCE_MEM'\n",
@@ -255,6 +264,8 @@ static int fsl_bman_probe(struct platform_device *pdev)
255 return ret; 264 return ret;
256 } 265 }
257 266
267 __bman_probed = 1;
268
258 return 0; 269 return 0;
259}; 270};
260 271
diff --git a/drivers/soc/fsl/qbman/qman_ccsr.c b/drivers/soc/fsl/qbman/qman_ccsr.c
index 79cba58387a5..6fd5fef5f39b 100644
--- a/drivers/soc/fsl/qbman/qman_ccsr.c
+++ b/drivers/soc/fsl/qbman/qman_ccsr.c
@@ -273,6 +273,7 @@ static const struct qman_error_info_mdata error_mdata[] = {
273static u32 __iomem *qm_ccsr_start; 273static u32 __iomem *qm_ccsr_start;
274/* A SDQCR mask comprising all the available/visible pool channels */ 274/* A SDQCR mask comprising all the available/visible pool channels */
275static u32 qm_pools_sdqcr; 275static u32 qm_pools_sdqcr;
276static int __qman_probed;
276 277
277static inline u32 qm_ccsr_in(u32 offset) 278static inline u32 qm_ccsr_in(u32 offset)
278{ 279{
@@ -686,6 +687,12 @@ static int qman_resource_init(struct device *dev)
686 return 0; 687 return 0;
687} 688}
688 689
690int qman_is_probed(void)
691{
692 return __qman_probed;
693}
694EXPORT_SYMBOL_GPL(qman_is_probed);
695
689static int fsl_qman_probe(struct platform_device *pdev) 696static int fsl_qman_probe(struct platform_device *pdev)
690{ 697{
691 struct device *dev = &pdev->dev; 698 struct device *dev = &pdev->dev;
@@ -695,6 +702,8 @@ static int fsl_qman_probe(struct platform_device *pdev)
695 u16 id; 702 u16 id;
696 u8 major, minor; 703 u8 major, minor;
697 704
705 __qman_probed = -1;
706
698 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 707 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
699 if (!res) { 708 if (!res) {
700 dev_err(dev, "Can't get %pOF property 'IORESOURCE_MEM'\n", 709 dev_err(dev, "Can't get %pOF property 'IORESOURCE_MEM'\n",
@@ -828,6 +837,8 @@ static int fsl_qman_probe(struct platform_device *pdev)
828 if (ret) 837 if (ret)
829 return ret; 838 return ret;
830 839
840 __qman_probed = 1;
841
831 return 0; 842 return 0;
832} 843}
833 844
diff --git a/drivers/soc/fsl/qbman/qman_portal.c b/drivers/soc/fsl/qbman/qman_portal.c
index a120002b630e..3e9391d117c5 100644
--- a/drivers/soc/fsl/qbman/qman_portal.c
+++ b/drivers/soc/fsl/qbman/qman_portal.c
@@ -227,6 +227,14 @@ static int qman_portal_probe(struct platform_device *pdev)
227 int irq, cpu, err; 227 int irq, cpu, err;
228 u32 val; 228 u32 val;
229 229
230 err = qman_is_probed();
231 if (!err)
232 return -EPROBE_DEFER;
233 if (err < 0) {
234 dev_err(&pdev->dev, "failing probe due to qman probe error\n");
235 return -ENODEV;
236 }
237
230 pcfg = devm_kmalloc(dev, sizeof(*pcfg), GFP_KERNEL); 238 pcfg = devm_kmalloc(dev, sizeof(*pcfg), GFP_KERNEL);
231 if (!pcfg) 239 if (!pcfg)
232 return -ENOMEM; 240 return -ENOMEM;
diff --git a/include/soc/fsl/bman.h b/include/soc/fsl/bman.h
index eaaf56df4086..5b99cb2ea5ef 100644
--- a/include/soc/fsl/bman.h
+++ b/include/soc/fsl/bman.h
@@ -126,4 +126,12 @@ int bman_release(struct bman_pool *pool, const struct bm_buffer *bufs, u8 num);
126 */ 126 */
127int bman_acquire(struct bman_pool *pool, struct bm_buffer *bufs, u8 num); 127int bman_acquire(struct bman_pool *pool, struct bm_buffer *bufs, u8 num);
128 128
129/**
130 * bman_is_probed - Check if bman is probed
131 *
132 * Returns 1 if the bman driver successfully probed, -1 if the bman driver
133 * failed to probe or 0 if the bman driver did not probed yet.
134 */
135int bman_is_probed(void);
136
129#endif /* __FSL_BMAN_H */ 137#endif /* __FSL_BMAN_H */
diff --git a/include/soc/fsl/qman.h b/include/soc/fsl/qman.h
index d4dfefdee6c1..597783b8a3a0 100644
--- a/include/soc/fsl/qman.h
+++ b/include/soc/fsl/qman.h
@@ -1186,4 +1186,12 @@ int qman_alloc_cgrid_range(u32 *result, u32 count);
1186 */ 1186 */
1187int qman_release_cgrid(u32 id); 1187int qman_release_cgrid(u32 id);
1188 1188
1189/**
1190 * qman_is_probed - Check if qman is probed
1191 *
1192 * Returns 1 if the qman driver successfully probed, -1 if the qman driver
1193 * failed to probe or 0 if the qman driver did not probed yet.
1194 */
1195int qman_is_probed(void);
1196
1189#endif /* __FSL_QMAN_H */ 1197#endif /* __FSL_QMAN_H */