Skip to contentSkip to conversation

media: aspeed: Fix driver probe failure

PATCH In review Haiyue Wang 2 participants 4 messages Feb 27

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 media: aspeed: Fix driver probe failure

The aspeed video (be compatible for ast2400, ast2500, ast2600) now needs the reset DTS handle specified, otherwise it will fail to load:

[    0.000000] OF: reserved mem: initialized node video, compatible id shared-dma-pool
[    0.000000] OF: reserved mem: 0xbb000000..0xbeffffff (65536 KiB) map reusable video
[    0.377039] videodev: Linux video capture interface: v2.00
[    4.809494] aspeed-video 1e700000.video: irq 57
[    4.809977] aspeed-video 1e700000.video: Unable to get reset
[    4.810341] aspeed-video 1e700000.video: probe with driver aspeed-video failed with error -2
Fixes e83f8dd668ea ("media: aspeed: Fix dram hang at res-change")
---
 arch/arm/boot/dts/aspeed/aspeed-g4.dtsi   | 1 +
 arch/arm/boot/dts/aspeed/aspeed-g5.dtsi   | 1 +
 arch/arm/boot/dts/aspeed/aspeed-g6.dtsi   | 1 +
 include/dt-bindings/clock/ast2600-clock.h | 1 +
 4 files changed, 4 insertions(+)
arch/arm/boot/dts/aspeed/aspeed-g4.dtsi +1 -0
index c3d4d916c69b..1547e28d77e2 100644
@@ -242,6 +242,7 @@ video: video@1e700000 {
 					 <&syscon ASPEED_CLK_GATE_ECLK>;
 				clock-names = "vclk", "eclk";
 				interrupts = <7>;
+				resets = <&syscon ASPEED_RESET_VIDEO>;
 				status = "disabled";
 			};
 
arch/arm/boot/dts/aspeed/aspeed-g5.dtsi +1 -0
index 39500bdb4747..793570ca2518 100644
@@ -296,6 +296,7 @@ video: video@1e700000 {
 					 <&syscon ASPEED_CLK_GATE_ECLK>;
 				clock-names = "vclk", "eclk";
 				interrupts = <7>;
+				resets = <&syscon ASPEED_RESET_VIDEO>;
 				status = "disabled";
 			};
 
arch/arm/boot/dts/aspeed/aspeed-g6.dtsi +1 -0
index 189bc3bbb47c..3adf48987a17 100644
@@ -428,6 +428,7 @@ video: video@1e700000 {
 					 <&syscon ASPEED_CLK_GATE_ECLK>;
 				clock-names = "vclk", "eclk";
 				interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
+				resets = <&syscon ASPEED_RESET_VIDEO>;
 				status = "disabled";
 			};
 
include/dt-bindings/clock/ast2600-clock.h +1 -0
index f60fff261130..7b9b80c38a8b 100644
@@ -124,6 +124,7 @@
 #define ASPEED_RESET_PCIE_RC_OEN	18
 #define ASPEED_RESET_MAC2		12
 #define ASPEED_RESET_MAC1		11
+#define ASPEED_RESET_VIDEO		6
 #define ASPEED_RESET_PCI_DP		5
 #define ASPEED_RESET_HACE		4
 #define ASPEED_RESET_AHB		1
Signature · 1 line
2.53.0
#1 lore raw
Quoted 10 lines · Haiyue Wang

The aspeed video (be compatible for ast2400, ast2500, ast2600) now needs the reset DTS handle specified, otherwise it will fail to load:

[    0.000000] OF: reserved mem: initialized node video, compatible id shared-dma-pool
[    0.000000] OF: reserved mem: 0xbb000000..0xbeffffff (65536 KiB) map reusable video
[    0.377039] videodev: Linux video capture interface: v2.00
[    4.809494] aspeed-video 1e700000.video: irq 57
[    4.809977] aspeed-video 1e700000.video: Unable to get reset
[    4.810341] aspeed-video 1e700000.video: probe with driver aspeed-video failed with error -2
Quoted 7 lines
Fixes e83f8dd668ea ("media: aspeed: Fix dram hang at res-change")
---
 arch/arm/boot/dts/aspeed/aspeed-g4.dtsi   | 1 +
 arch/arm/boot/dts/aspeed/aspeed-g5.dtsi   | 1 +
 arch/arm/boot/dts/aspeed/aspeed-g6.dtsi   | 1 +
 include/dt-bindings/clock/ast2600-clock.h | 1 +

Please run scripts/checkpatch.pl on the patches and fix reported warnings. After that, run also 'scripts/checkpatch.pl --strict' on the patches and (probably) fix more warnings. Some warnings can be ignored, especially from --strict run, but the code here looks like it needs a fix. Feel free to get in touch if the warning is not clear.

Please use subject prefixes matching the subsystem. You can get them for example with git log --oneline -- DIRECTORY_OR_FILE on the directory your patch is touching. For bindings, the preferred subjects are explained here:
https://www.kernel.org/doc/html/latest/devicetree/bindings/submitting-patches.html#i-for-patch-submitters

Quoted 1 line
 4 files changed, 4 insertions(+)

Best regards,
Krzysztof

#2 lore raw
Quoted 26 lines · Krzysztof Kozlowski
Quoted 10 lines · Haiyue Wang

The aspeed video (be compatible for ast2400, ast2500, ast2600) now needs the reset DTS handle specified, otherwise it will fail to load:

[    0.000000] OF: reserved mem: initialized node video, compatible id shared-dma-pool
[    0.000000] OF: reserved mem: 0xbb000000..0xbeffffff (65536 KiB) map reusable video
[    0.377039] videodev: Linux video capture interface: v2.00
[    4.809494] aspeed-video 1e700000.video: irq 57
[    4.809977] aspeed-video 1e700000.video: Unable to get reset
[    4.810341] aspeed-video 1e700000.video: probe with driver aspeed-video failed with error -2
Quoted 7 lines
Fixes e83f8dd668ea ("media: aspeed: Fix dram hang at res-change")
---
  arch/arm/boot/dts/aspeed/aspeed-g4.dtsi   | 1 +
  arch/arm/boot/dts/aspeed/aspeed-g5.dtsi   | 1 +
  arch/arm/boot/dts/aspeed/aspeed-g6.dtsi   | 1 +
  include/dt-bindings/clock/ast2600-clock.h | 1 +

Please run scripts/checkpatch.pl on the patches and fix reported warnings. After that, run also 'scripts/checkpatch.pl --strict' on the patches and (probably) fix more warnings. Some warnings can be ignored, especially from --strict run, but the code here looks like it needs a fix. Feel free to get in touch if the warning is not clear.

Quoted 6 lines

Please use subject prefixes matching the subsystem. You can get them for example with git log --oneline -- DIRECTORY_OR_FILE on the directory your patch is touching. For bindings, the preferred subjects are explained here:
https://www.kernel.org/doc/html/latest/devicetree/bindings/submitting-patches.html#i-for-patch-submitters

Seperated into two patches in v2, please help to review.

Quoted 5 lines
Quoted 1 line
  4 files changed, 4 insertions(+)

Best regards,
Krzysztof

#3 lore raw
Quoted 29 lines · Haiyue Wang
Quoted 26 lines · Krzysztof Kozlowski
Quoted 10 lines · Haiyue Wang

The aspeed video (be compatible for ast2400, ast2500, ast2600) now needs the reset DTS handle specified, otherwise it will fail to load:

[    0.000000] OF: reserved mem: initialized node video, compatible id shared-dma-pool
[    0.000000] OF: reserved mem: 0xbb000000..0xbeffffff (65536 KiB) map reusable video
[    0.377039] videodev: Linux video capture interface: v2.00
[    4.809494] aspeed-video 1e700000.video: irq 57
[    4.809977] aspeed-video 1e700000.video: Unable to get reset
[    4.810341] aspeed-video 1e700000.video: probe with driver aspeed-video failed with error -2
Quoted 7 lines
Fixes e83f8dd668ea ("media: aspeed: Fix dram hang at res-change")
---
  arch/arm/boot/dts/aspeed/aspeed-g4.dtsi   | 1 +
  arch/arm/boot/dts/aspeed/aspeed-g5.dtsi   | 1 +
  arch/arm/boot/dts/aspeed/aspeed-g6.dtsi   | 1 +
  include/dt-bindings/clock/ast2600-clock.h | 1 +

Please run scripts/checkpatch.pl on the patches and fix reported warnings. After that, run also 'scripts/checkpatch.pl --strict' on the patches and (probably) fix more warnings. Some warnings can be ignored, especially from --strict run, but the code here looks like it needs a fix. Feel free to get in touch if the warning is not clear.

Quoted 8 lines
Quoted 6 lines

Please use subject prefixes matching the subsystem. You can get them for example with git log --oneline -- DIRECTORY_OR_FILE on the directory your patch is touching. For bindings, the preferred subjects are explained here:
https://www.kernel.org/doc/html/latest/devicetree/bindings/submitting-patches.html#i-for-patch-submitters

Seperated into two patches in v2, please help to review.

No, please wait. One posting per day. We have enough of other patches to review.

Best regards,
Krzysztof