Commit 2ef13939 authored by Leonard Crestez's avatar Leonard Crestez Committed by Shawn Guo
Browse files

clk: imx8m: Suppress bind attrs



The clock drivers on imx8m series are registered as platform devices and
this opens the possibility of reloading the driver at runtime.

This doesn't actually work: clocks are never removed and attempting to
bind again results in registration errors and a crash. Almost all
devices depend on clocks anyway so rebinding is unlikely to ever be
useful

Fix this by explicitly suppressing bind attrs like several other
clock drivers.

Signed-off-by: default avatarLeonard Crestez <leonard.crestez@nxp.com>
Reviewed-by: default avatarPeng Fan <peng.fan@nxp.com>
Signed-off-by: default avatarShawn Guo <shawnguo@kernel.org>
parent c13f370d
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -621,6 +621,11 @@ static struct platform_driver imx8mm_clk_driver = {
	.probe = imx8mm_clocks_probe,
	.driver = {
		.name = "imx8mm-ccm",
		/*
		 * Disable bind attributes: clocks are not removed and
		 * reloading the driver will crash or break devices.
		 */
		.suppress_bind_attrs = true,
		.of_match_table = of_match_ptr(imx8mm_clk_of_match),
	},
};
+5 −0
Original line number Diff line number Diff line
@@ -578,6 +578,11 @@ static struct platform_driver imx8mn_clk_driver = {
	.probe = imx8mn_clocks_probe,
	.driver = {
		.name = "imx8mn-ccm",
		/*
		 * Disable bind attributes: clocks are not removed and
		 * reloading the driver will crash or break devices.
		 */
		.suppress_bind_attrs = true,
		.of_match_table = of_match_ptr(imx8mn_clk_of_match),
	},
};
+5 −0
Original line number Diff line number Diff line
@@ -613,6 +613,11 @@ static struct platform_driver imx8mq_clk_driver = {
	.probe = imx8mq_clocks_probe,
	.driver = {
		.name = "imx8mq-ccm",
		/*
		 * Disable bind attributes: clocks are not removed and
		 * reloading the driver will crash or break devices.
		 */
		.suppress_bind_attrs = true,
		.of_match_table = of_match_ptr(imx8mq_clk_of_match),
	},
};