Tegra: fix clock init
Subsystems (3)
cover Tegra: fix clock init
This should fix https://lore.kernel.org/all/20241201164810.GT3600562@bill-the-cat/T/#m2b62b471fd37e4c9725c98547e2a919cf11db5e5
Svyatoslav Ryhel (1):
driver: clk: tegra: init basic clocks on probe
drivers/clk/tegra/tegra-car-clk.c | 3 +++ 1 file changed, 3 insertions(+)
Signature · 1 line
2.43.0
PATCH 1/1 driver: clk: tegra: init basic clocks on probe
In case DM drivers probe earlier than board clock setup is done init of basic clocks should be done in CAR driver probe as well. Add it to avoid possible clock related problems.
--- drivers/clk/tegra/tegra-car-clk.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/clk/tegra/tegra-car-clk.c +3 -0
@@ -111,6 +111,9 @@ static int tegra_car_clk_probe(struct udevice *dev) {debug ("%s(dev=%p)\n" , __func__, dev); +clock_init (); +clock_verify (); +return 0 ; }
Signature · 1 line
2.43.0
Re: [PATCH v1 1/1] driver: clk: tegra: init basic clocks on probe
пт, 6 груд. 2024 р. о 08:01 Svyatoslav Ryhel <[email protected]> пише:
Quoted 25 lines
In case DM drivers probe earlier than board clock setup is done init of basic clocks should be done in CAR driver probe as well. Add it to avoid possible clock related problems.
Signed-off-by Svyatoslav Ryhel <[email protected]>--- drivers/clk/tegra/tegra-car-clk.c | 3 +++ 1 file changed, 3 insertions(+)drivers/clk/tegra/tegra-car-clk.c +3
-1@@ -111,6 +111,9 @@ static int tegra_car_clk_probe(struct udevice *dev) {debug ("%s(dev=%p)\n" , __func__, dev); +clock_init (); +clock_verify (); +return 0 ; } --
Quoted 2 lines
2.43.0
Simon, please test this commit and it it works for you, it can replace
this revert https://lore.kernel.org/all/20241201164810.GT3600562@bill-the-cat/T/#m2b62b471fd37e4c9725c98547e2a919cf11db5e5
Re: [PATCH v1 1/1] driver: clk: tegra: init basic clocks on probe
In reply to Svyatoslav RyhelQuoted 14 lines · Svyatoslav Ryhel
In case DM drivers probe earlier than board clock setup is done init of basic clocks should be done in CAR driver probe as well. Add it to avoid possible clock related problems.
Signed-off-by Svyatoslav Ryhel <[email protected]>--- drivers/clk/tegra/tegra-car-clk.c | 3 +++ 1 file changed, 3 insertions(+)drivers/clk/tegra/tegra-car-clk.c +0
-0
drivers/clk/tegra/tegra-car-clk.c static int tegra_car_clk_probe(struct udevice *dev) · line 119
Quoted 9 lines
drivers/clk/tegra/tegra-car-clk.c +3
-0@@ -111,6 +111,9 @@ static int tegra_car_clk_probe(struct udevice *dev) {debug ("%s(dev=%p)\n" , __func__, dev); +clock_init (); +clock_verify (); +return 0 ; }
Is this called before arch/arm/mach-tegra/board2.c::board_init()? Thanks.
Signature · 1 line
Tom
Re: [PATCH v1 1/1] driver: clk: tegra: init basic clocks on probe
пт, 6 груд. 2024 р. о 16:20 Tom Rini <[email protected]> пише:
Quoted 30 lines · Svyatoslav Ryhel
Quoted 15 lines
In case DM drivers probe earlier than board clock setup is done init of basic clocks should be done in CAR driver probe as well. Add it to avoid possible clock related problems.
Signed-off-by Svyatoslav Ryhel <[email protected]>--- drivers/clk/tegra/tegra-car-clk.c | 3 +++ 1 file changed, 3 insertions(+)drivers/clk/tegra/tegra-car-clk.c +0
-0drivers/clk/tegra/tegra-car-clk.c static int tegra_car_clk_probe(struct udevice *dev) · line 119
Quoted 9 lines
drivers/clk/tegra/tegra-car-clk.c +3
-0@@ -111,6 +111,9 @@ static int tegra_car_clk_probe(struct udevice *dev) {debug ("%s(dev=%p)\n" , __func__, dev); +clock_init (); +clock_verify (); +return 0 ; }Is this called before arch/arm/mach-tegra/board2.c::board_init()? Thanks.
Quoted 2 lines
--
Tom
It does if the device uses pmic with dm driver and has any of pmic regulators set as always-on or boot-on
Re: [PATCH v1 1/1] driver: clk: tegra: init basic clocks on probe
Quoted 31 lines · Svyatoslav Ryhel
пт, 6 груд. 2024 р. о 16:20 Tom Rini <[email protected]> пише:
Quoted 20 lines · Svyatoslav Ryhel
Quoted 18 lines
In case DM drivers probe earlier than board clock setup is done init of basic clocks should be done in CAR driver probe as well. Add it to avoid possible clock related problems.
Signed-off-by Svyatoslav Ryhel <[email protected]>--- drivers/clk/tegra/tegra-car-clk.c | 3 +++ 1 file changed, 3 insertions(+)drivers/clk/tegra/tegra-car-clk.c +0
-0@@ -111,6 +111,9 @@ static int tegra_car_clk_probe(struct udevice *dev) {debug ("%s(dev=%p)\n" , __func__, dev);Quoted 9 lines
drivers/clk/tegra/tegra-car-clk.c static int tegra_car_clk_probe(struct udevice *dev) · line 119
Quoted 6 lines
drivers/clk/tegra/tegra-car-clk.c +3
-0+clock_init (); +clock_verify (); +return 0 ; }Is this called before arch/arm/mach-tegra/board2.c::board_init()? Thanks.
Quoted 2 lines
It does if the device uses pmic with dm driver and has any of pmic regulators set as always-on or boot-on
Ah, OK. I'll wait and see what Simon has to say next, thanks.
Signature · 1 line
Tom