[PATCH 2/2] clk: renesas: Tear clock controller down last before booting OS

Marek Vasut marek.vasut at gmail.com
Sun Oct 11 18:03:18 CEST 2020


Once all the other drivers got torn down in preparation for the OS
to start, tear down the clock controller last. The clock controller
must be torn down last as some of the clock which get turned off
might have still been needed during the teardown stage of the other
drivers.

Signed-off-by: Marek Vasut <marek.vasut+renesas at gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu at nigauri.org>
Cc: Simon Glass <sjg at chromium.org>
Cc: Tom Rini <trini at konsulko.com>
---
 drivers/clk/renesas/r8a7795-cpg-mssr.c  | 1 +
 drivers/clk/renesas/r8a7796-cpg-mssr.c  | 1 +
 drivers/clk/renesas/r8a77965-cpg-mssr.c | 1 +
 drivers/clk/renesas/r8a77970-cpg-mssr.c | 1 +
 drivers/clk/renesas/r8a77980-cpg-mssr.c | 1 +
 drivers/clk/renesas/r8a77990-cpg-mssr.c | 1 +
 drivers/clk/renesas/r8a77995-cpg-mssr.c | 1 +
 7 files changed, 7 insertions(+)

diff --git a/drivers/clk/renesas/r8a7795-cpg-mssr.c b/drivers/clk/renesas/r8a7795-cpg-mssr.c
index feb41b120d..12b181dcf8 100644
--- a/drivers/clk/renesas/r8a7795-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a7795-cpg-mssr.c
@@ -377,4 +377,5 @@ U_BOOT_DRIVER(clk_r8a7795) = {
 	.ops		= &gen3_clk_ops,
 	.probe		= gen3_clk_probe,
 	.remove		= gen3_clk_remove,
+	.flags		= DM_FLAG_OS_PREPARE | DM_FLAG_REMOVE_LATE,
 };
diff --git a/drivers/clk/renesas/r8a7796-cpg-mssr.c b/drivers/clk/renesas/r8a7796-cpg-mssr.c
index ef7c554ac6..5ecd906b3a 100644
--- a/drivers/clk/renesas/r8a7796-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a7796-cpg-mssr.c
@@ -355,4 +355,5 @@ U_BOOT_DRIVER(clk_r8a7796) = {
 	.ops		= &gen3_clk_ops,
 	.probe		= gen3_clk_probe,
 	.remove		= gen3_clk_remove,
+	.flags		= DM_FLAG_OS_PREPARE | DM_FLAG_REMOVE_LATE,
 };
diff --git a/drivers/clk/renesas/r8a77965-cpg-mssr.c b/drivers/clk/renesas/r8a77965-cpg-mssr.c
index f8d954242d..08c51ff183 100644
--- a/drivers/clk/renesas/r8a77965-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a77965-cpg-mssr.c
@@ -353,4 +353,5 @@ U_BOOT_DRIVER(clk_r8a77965) = {
 	.ops		= &gen3_clk_ops,
 	.probe		= gen3_clk_probe,
 	.remove		= gen3_clk_remove,
+	.flags		= DM_FLAG_OS_PREPARE | DM_FLAG_REMOVE_LATE,
 };
diff --git a/drivers/clk/renesas/r8a77970-cpg-mssr.c b/drivers/clk/renesas/r8a77970-cpg-mssr.c
index c1e9b91b0d..613575900d 100644
--- a/drivers/clk/renesas/r8a77970-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a77970-cpg-mssr.c
@@ -230,4 +230,5 @@ U_BOOT_DRIVER(clk_r8a77970) = {
 	.ops		= &gen3_clk_ops,
 	.probe		= gen3_clk_probe,
 	.remove		= gen3_clk_remove,
+	.flags		= DM_FLAG_OS_PREPARE | DM_FLAG_REMOVE_LATE,
 };
diff --git a/drivers/clk/renesas/r8a77980-cpg-mssr.c b/drivers/clk/renesas/r8a77980-cpg-mssr.c
index e291774791..d41dd348cd 100644
--- a/drivers/clk/renesas/r8a77980-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a77980-cpg-mssr.c
@@ -253,4 +253,5 @@ U_BOOT_DRIVER(clk_r8a77980) = {
 	.ops		= &gen3_clk_ops,
 	.probe		= gen3_clk_probe,
 	.remove		= gen3_clk_remove,
+	.flags		= DM_FLAG_OS_PREPARE | DM_FLAG_REMOVE_LATE,
 };
diff --git a/drivers/clk/renesas/r8a77990-cpg-mssr.c b/drivers/clk/renesas/r8a77990-cpg-mssr.c
index a990251ac5..b3ea96a077 100644
--- a/drivers/clk/renesas/r8a77990-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a77990-cpg-mssr.c
@@ -312,4 +312,5 @@ U_BOOT_DRIVER(clk_r8a77990) = {
 	.ops		= &gen3_clk_ops,
 	.probe		= gen3_clk_probe,
 	.remove		= gen3_clk_remove,
+	.flags		= DM_FLAG_OS_PREPARE | DM_FLAG_REMOVE_LATE,
 };
diff --git a/drivers/clk/renesas/r8a77995-cpg-mssr.c b/drivers/clk/renesas/r8a77995-cpg-mssr.c
index c49a5ffae8..b66b0b46df 100644
--- a/drivers/clk/renesas/r8a77995-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a77995-cpg-mssr.c
@@ -251,4 +251,5 @@ U_BOOT_DRIVER(clk_r8a77995) = {
 	.ops		= &gen3_clk_ops,
 	.probe		= gen3_clk_probe,
 	.remove		= gen3_clk_remove,
+	.flags		= DM_FLAG_OS_PREPARE | DM_FLAG_REMOVE_LATE,
 };
-- 
2.28.0



More information about the U-Boot mailing list