aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2018-10-04 11:37:17 -0400
committerArnd Bergmann <arnd@arndb.de>2018-10-04 12:01:20 -0400
commit3f4258bbe0363b3d5330b93de0e86b7796ff1a74 (patch)
tree23a3018c9811fabb530a566c026098e1f256497f
parent30a0af8826942cc6b1277f89a6ed3e3b986d1643 (diff)
parent5a1eb8b9542884592a018829bb1ff20c9695d925 (diff)
Merge tag 'soc-fsl-fix-v4.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/leo/linux into fixes
NXP/FSL SoC driver fixes for v4.19 round 2 - Fix crash of qman_portal by deferring its probe if qman is not probed * tag 'soc-fsl-fix-v4.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/leo/linux: soc: fsl: qman_portals: defer probe after qman's probe soc: fsl: qbman: add APIs to retrieve the probing status soc: fsl: qe: Fix copy/paste bug in ucc_get_tdm_sync_shift() soc: fsl: qbman: qman: avoid allocating from non existing gen_pool ARM: dts: BCM63xx: Fix incorrect interrupt specifiers MAINTAINERS: update the Annapurna Labs maintainer email ARM: dts: sun8i: drop A64 HDMI PHY fallback compatible from R40 DT ARM: dts: at91: sama5d2_ptc_ek: fix nand pinctrl Signed-off-by: Arnd Bergmann <arnd@arndb.de>
-rw-r--r--MAINTAINERS2
-rw-r--r--arch/arm/boot/dts/at91-sama5d2_ptc_ek.dts2
-rw-r--r--arch/arm/boot/dts/bcm63138.dtsi14
-rw-r--r--arch/arm/boot/dts/sun8i-r40.dtsi3
-rw-r--r--drivers/soc/fsl/qbman/bman_ccsr.c11
-rw-r--r--drivers/soc/fsl/qbman/qman.c3
-rw-r--r--drivers/soc/fsl/qbman/qman_ccsr.c11
-rw-r--r--drivers/soc/fsl/qbman/qman_portal.c8
-rw-r--r--drivers/soc/fsl/qe/ucc.c2
-rw-r--r--include/soc/fsl/bman.h8
-rw-r--r--include/soc/fsl/qman.h8
11 files changed, 62 insertions, 10 deletions
diff --git a/MAINTAINERS b/MAINTAINERS
index b22e7fdfd2ea..42a2f31b7334 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1251,7 +1251,7 @@ N: meson
1251 1251
1252ARM/Annapurna Labs ALPINE ARCHITECTURE 1252ARM/Annapurna Labs ALPINE ARCHITECTURE
1253M: Tsahee Zidenberg <tsahee@annapurnalabs.com> 1253M: Tsahee Zidenberg <tsahee@annapurnalabs.com>
1254M: Antoine Tenart <antoine.tenart@free-electrons.com> 1254M: Antoine Tenart <antoine.tenart@bootlin.com>
1255L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) 1255L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
1256S: Maintained 1256S: Maintained
1257F: arch/arm/mach-alpine/ 1257F: arch/arm/mach-alpine/
diff --git a/arch/arm/boot/dts/at91-sama5d2_ptc_ek.dts b/arch/arm/boot/dts/at91-sama5d2_ptc_ek.dts
index b10dccd0958f..3b1baa8605a7 100644
--- a/arch/arm/boot/dts/at91-sama5d2_ptc_ek.dts
+++ b/arch/arm/boot/dts/at91-sama5d2_ptc_ek.dts
@@ -11,6 +11,7 @@
11#include "sama5d2-pinfunc.h" 11#include "sama5d2-pinfunc.h"
12#include <dt-bindings/mfd/atmel-flexcom.h> 12#include <dt-bindings/mfd/atmel-flexcom.h>
13#include <dt-bindings/gpio/gpio.h> 13#include <dt-bindings/gpio/gpio.h>
14#include <dt-bindings/pinctrl/at91.h>
14 15
15/ { 16/ {
16 model = "Atmel SAMA5D2 PTC EK"; 17 model = "Atmel SAMA5D2 PTC EK";
@@ -299,6 +300,7 @@
299 <PIN_PA30__NWE_NANDWE>, 300 <PIN_PA30__NWE_NANDWE>,
300 <PIN_PB2__NRD_NANDOE>; 301 <PIN_PB2__NRD_NANDOE>;
301 bias-pull-up; 302 bias-pull-up;
303 atmel,drive-strength = <ATMEL_PIO_DRVSTR_ME>;
302 }; 304 };
303 305
304 ale_cle_rdy_cs { 306 ale_cle_rdy_cs {
diff --git a/arch/arm/boot/dts/bcm63138.dtsi b/arch/arm/boot/dts/bcm63138.dtsi
index 43ee992ccdcf..6df61518776f 100644
--- a/arch/arm/boot/dts/bcm63138.dtsi
+++ b/arch/arm/boot/dts/bcm63138.dtsi
@@ -106,21 +106,23 @@
106 global_timer: timer@1e200 { 106 global_timer: timer@1e200 {
107 compatible = "arm,cortex-a9-global-timer"; 107 compatible = "arm,cortex-a9-global-timer";
108 reg = <0x1e200 0x20>; 108 reg = <0x1e200 0x20>;
109 interrupts = <GIC_PPI 11 IRQ_TYPE_LEVEL_HIGH>; 109 interrupts = <GIC_PPI 11 IRQ_TYPE_EDGE_RISING>;
110 clocks = <&axi_clk>; 110 clocks = <&axi_clk>;
111 }; 111 };
112 112
113 local_timer: local-timer@1e600 { 113 local_timer: local-timer@1e600 {
114 compatible = "arm,cortex-a9-twd-timer"; 114 compatible = "arm,cortex-a9-twd-timer";
115 reg = <0x1e600 0x20>; 115 reg = <0x1e600 0x20>;
116 interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_HIGH>; 116 interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(2) |
117 IRQ_TYPE_EDGE_RISING)>;
117 clocks = <&axi_clk>; 118 clocks = <&axi_clk>;
118 }; 119 };
119 120
120 twd_watchdog: watchdog@1e620 { 121 twd_watchdog: watchdog@1e620 {
121 compatible = "arm,cortex-a9-twd-wdt"; 122 compatible = "arm,cortex-a9-twd-wdt";
122 reg = <0x1e620 0x20>; 123 reg = <0x1e620 0x20>;
123 interrupts = <GIC_PPI 14 IRQ_TYPE_LEVEL_HIGH>; 124 interrupts = <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(2) |
125 IRQ_TYPE_LEVEL_HIGH)>;
124 }; 126 };
125 127
126 armpll: armpll { 128 armpll: armpll {
@@ -158,7 +160,7 @@
158 serial0: serial@600 { 160 serial0: serial@600 {
159 compatible = "brcm,bcm6345-uart"; 161 compatible = "brcm,bcm6345-uart";
160 reg = <0x600 0x1b>; 162 reg = <0x600 0x1b>;
161 interrupts = <GIC_SPI 32 0>; 163 interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
162 clocks = <&periph_clk>; 164 clocks = <&periph_clk>;
163 clock-names = "periph"; 165 clock-names = "periph";
164 status = "disabled"; 166 status = "disabled";
@@ -167,7 +169,7 @@
167 serial1: serial@620 { 169 serial1: serial@620 {
168 compatible = "brcm,bcm6345-uart"; 170 compatible = "brcm,bcm6345-uart";
169 reg = <0x620 0x1b>; 171 reg = <0x620 0x1b>;
170 interrupts = <GIC_SPI 33 0>; 172 interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
171 clocks = <&periph_clk>; 173 clocks = <&periph_clk>;
172 clock-names = "periph"; 174 clock-names = "periph";
173 status = "disabled"; 175 status = "disabled";
@@ -180,7 +182,7 @@
180 reg = <0x2000 0x600>, <0xf0 0x10>; 182 reg = <0x2000 0x600>, <0xf0 0x10>;
181 reg-names = "nand", "nand-int-base"; 183 reg-names = "nand", "nand-int-base";
182 status = "disabled"; 184 status = "disabled";
183 interrupts = <GIC_SPI 38 0>; 185 interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
184 interrupt-names = "nand"; 186 interrupt-names = "nand";
185 }; 187 };
186 188
diff --git a/arch/arm/boot/dts/sun8i-r40.dtsi b/arch/arm/boot/dts/sun8i-r40.dtsi
index ffd9f00f74a4..5f547c161baf 100644
--- a/arch/arm/boot/dts/sun8i-r40.dtsi
+++ b/arch/arm/boot/dts/sun8i-r40.dtsi
@@ -800,8 +800,7 @@
800 }; 800 };
801 801
802 hdmi_phy: hdmi-phy@1ef0000 { 802 hdmi_phy: hdmi-phy@1ef0000 {
803 compatible = "allwinner,sun8i-r40-hdmi-phy", 803 compatible = "allwinner,sun8i-r40-hdmi-phy";
804 "allwinner,sun50i-a64-hdmi-phy";
805 reg = <0x01ef0000 0x10000>; 804 reg = <0x01ef0000 0x10000>;
806 clocks = <&ccu CLK_BUS_HDMI1>, <&ccu CLK_HDMI_SLOW>, 805 clocks = <&ccu CLK_BUS_HDMI1>, <&ccu CLK_HDMI_SLOW>,
807 <&ccu 7>, <&ccu 16>; 806 <&ccu 7>, <&ccu 16>;
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.c b/drivers/soc/fsl/qbman/qman.c
index ecb22749df0b..8cc015183043 100644
--- a/drivers/soc/fsl/qbman/qman.c
+++ b/drivers/soc/fsl/qbman/qman.c
@@ -2729,6 +2729,9 @@ static int qman_alloc_range(struct gen_pool *p, u32 *result, u32 cnt)
2729{ 2729{
2730 unsigned long addr; 2730 unsigned long addr;
2731 2731
2732 if (!p)
2733 return -ENODEV;
2734
2732 addr = gen_pool_alloc(p, cnt); 2735 addr = gen_pool_alloc(p, cnt);
2733 if (!addr) 2736 if (!addr)
2734 return -ENOMEM; 2737 return -ENOMEM;
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/drivers/soc/fsl/qe/ucc.c b/drivers/soc/fsl/qe/ucc.c
index c646d8713861..681f7d4b7724 100644
--- a/drivers/soc/fsl/qe/ucc.c
+++ b/drivers/soc/fsl/qe/ucc.c
@@ -626,7 +626,7 @@ static u32 ucc_get_tdm_sync_shift(enum comm_dir mode, u32 tdm_num)
626{ 626{
627 u32 shift; 627 u32 shift;
628 628
629 shift = (mode == COMM_DIR_RX) ? RX_SYNC_SHIFT_BASE : RX_SYNC_SHIFT_BASE; 629 shift = (mode == COMM_DIR_RX) ? RX_SYNC_SHIFT_BASE : TX_SYNC_SHIFT_BASE;
630 shift -= tdm_num * 2; 630 shift -= tdm_num * 2;
631 631
632 return shift; 632 return shift;
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 */