RE: [PATCH] clk:aspeed:Fix reset driver probe from builtin_platform to core_initcal

From: Ryan Chen
Date: Sun Oct 17 2021 - 21:00:20 EST


Hello,
> -----Original Message-----
> From: Stephen Boyd <sboyd@xxxxxxxxxx>
> Sent: Sunday, October 17, 2021 9:45 AM
> To: Andrew Jeffery <andrew@xxxxxxxx>; Joel Stanley <joel@xxxxxxxxx>; Michael
> Turquette <mturquette@xxxxxxxxxxxx>; linux-clk@xxxxxxxxxxxxxxx;
> linux-kernel@xxxxxxxxxxxxxxx; Ryan Chen <ryan_chen@xxxxxxxxxxxxxx>
> Subject: Re: [PATCH] clk:aspeed:Fix reset driver probe from builtin_platform to
> core_initcal
>
> Quoting Ryan Chen (2021-10-04 23:45:13)
> > Change the reset probe sequence from builtin_platform to core_initcal.
> > For avoid some driver is probe but failed due to reset driver not probe.
>
> I don't get it. Does something never try probe again because it can't get the
> reset it wants? I understand that builtin_platform_driver() moves the initcall
> level later than core_initcall() so this is a workaround for some driver probe
> ordering problem?
The most of driver have reset function in probe. if driver probe need do the reset
(ex: devm_reset_control_get_shared) but reset driver not ready (devm_reset_controller_register),
that driver probe will cause the fail, than after reset driver probe, there will have second probe In driver.
That the reason I put reset probe in core_initcall.
And also you can see that the reason most soc chip do the devm_reset_controller_register in core_initcall.

>
> >
> > Fixes: d3d04f6c330a ("clk: Add support for AST2600 SoC")
> > Signed-off-by: Ryan Chen <ryan_chen@xxxxxxxxxxxxxx>