mbox series

[0/4] clk: imx8m: Fix incorrect parents

Message ID cover.1565715590.git.leonard.crestez@nxp.com (mailing list archive)
Headers show
Series clk: imx8m: Fix incorrect parents | expand

Message

Leonard Crestez Aug. 13, 2019, 5:05 p.m. UTC
No checks are made to ensure the parents in the _sels arrays actually
exist and it turns out that several are incorrect.

I found the errors using a hack to clk core, is there a better way?
Link: https://github.com/cdleonard/linux/commit/da32c2e76eb373e8a03aec905af2eef28a7997a7

Also add imx8mn GIC clock while we're at it because otherwise parent
could get disabled and lock the system.

Leonard Crestez (4):
  clk: imx8mq: Fix sys3 pll references
  clk: imx8mm: Fix incorrect parents
  clk: imx8mn: Fix incorrect parents
  clk: imx8mn: Add GIC clock

 drivers/clk/imx/clk-imx8mm.c             |   8 +-
 drivers/clk/imx/clk-imx8mn.c             |  19 ++--
 drivers/clk/imx/clk-imx8mq.c             | 112 +++++++++++------------
 include/dt-bindings/clock/imx8mn-clock.h |   3 +-
 4 files changed, 74 insertions(+), 68 deletions(-)

Comments

Stephen Boyd Aug. 15, 2019, 7:36 p.m. UTC | #1
Quoting Leonard Crestez (2019-08-13 10:05:27)
> No checks are made to ensure the parents in the _sels arrays actually
> exist and it turns out that several are incorrect.
> 
> I found the errors using a hack to clk core, is there a better way?
> Link: https://github.com/cdleonard/linux/commit/da32c2e76eb373e8a03aec905af2eef28a7997a7

Maybe you can make it into some sort of Kconfig option that's behind a
debug flag. Or you can use the possible parent debugfs files and check
for parents from userspace with some script.
Shawn Guo Aug. 19, 2019, 11:55 a.m. UTC | #2
On Tue, Aug 13, 2019 at 08:05:27PM +0300, Leonard Crestez wrote:
> No checks are made to ensure the parents in the _sels arrays actually
> exist and it turns out that several are incorrect.
> 
> I found the errors using a hack to clk core, is there a better way?
> Link: https://github.com/cdleonard/linux/commit/da32c2e76eb373e8a03aec905af2eef28a7997a7
> 
> Also add imx8mn GIC clock while we're at it because otherwise parent
> could get disabled and lock the system.
> 
> Leonard Crestez (4):
>   clk: imx8mq: Fix sys3 pll references
>   clk: imx8mm: Fix incorrect parents
>   clk: imx8mn: Fix incorrect parents
>   clk: imx8mn: Add GIC clock

Applied all, thanks.